This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Reading unformatted files
- From: Tobias Burnus <burnus at net-b dot de>
- To: Joan Ballester Claramunt <joanballester at gmail dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Thu, 24 Apr 2008 11:45:08 +0200
- Subject: Re: Reading unformatted files
- References: <cf6dd5930804240140o10ff3c9l71fd9cf7d6cbc1ab@mail.gmail.com>
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