Reading unformatted files

Tobias Burnus burnus@net-b.de
Thu Apr 24 14:42:00 GMT 2008


Hi Joan,

First of all, gfortran 4.0.0 is really old. It is the first release of 
gfortran and gfortran was known to have still several bugs that time; 
even later 4.0.x releases such as 4.0.4 had still some known problems. 
(4.0.0 was released 3 years ago which makes it really old.)

The first usable version was 4.1, which is also no longer officially 
supported; it was released more than 2 years ago.

The latest release of gfortran is 4.3.0, but also 4.2.x is supported.
The current developer release 4.4.0, which is also quite usable.

I would strongly suggest to update. Binaries and build instructions can 
be found at http://gcc.gnu.org/wiki/GFortranBinaries

But also newer versions of Fedora contain a newer version of gfortran.

 * * *

The reasons for your problems could be:
a) Bug in gfortran 4.0.0
b) Endian problems
c) Subrecord lenths.

You should really update gfortran before trying (b) or (c).

Regarding (b): If you created the file on a different CPU architecture, 
the endianess might be different. Try -fconvert=swap

Regardins (c): Try -frecord-marker=4 or =8.

Tobias



More information about the Fortran mailing list