I am running my python code in parallel using mpi4py
mpirun -np 2 python main.py
However when it starts reading a binary file produced by another fortran code I get the following error
scipy.io._fortran.FortranFormattingError: End of file in the middle of a record
However if I run it in serial
mpirun -np 1 python main.py
the program completes successfully