[MPICH] MPI-IO, reading in c++ from fortran generated file

Rob Ross rross at mcs.anl.gov
Mon Apr 23 21:07:24 CDT 2007


Hi Russell,

Sure you can read them, it's just that MPI-IO doesn't have any mechanism 
for *interpreting* whatever "stuff" fortran is putting in there.

Note that there is no standard for unformatted fortran files, so just 
doing this in MPI-IO would be difficult, especially if one wanted to be 
able to read an unformatted fortran file from another system/compiler 
(which people would invariably try to do). Looks like your version of 
fortran uses the "surround records with byte lengths" system, which is 
where those 4s and 12s come from.

Regards,

Rob

Russell L. Carter wrote:
> Now that I've looked into it, unformatted fortran files become
> even more complicated to deal with because of the record header/
> trailers when implementing collective IO.  Just in case I've
> missed something, is it true there is no way to read unformatted
> fortran files with MPI-IO?
> 
> It's obvious once you think about it, but it would have been nice
> to have that pointed out in the "Using MPI-2" book.  (Maybe it is?)
> 
> Thanks,
> Russell
> 




More information about the mpich-discuss mailing list