Convert from parallel to serial IO for pfaffian, which should be much safer and more robust