This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: 64 bit fortran unformatted on Opteron -- incompatible with 32unformatted
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: tunaboy2 at verizon dot net
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 15 Jun 2004 23:57:58 +0200
- Subject: Re: 64 bit fortran unformatted on Opteron -- incompatible with 32unformatted
- Organization: Moene Computational Physics, Maartensdijk, NL
- References: <200406150959.25428.kyon@verizon.net>
Kyon wrote:
> I figured this out by writing a similar little stub
program to make a fortran unformatted file, noting that I can read -m64
generated unformatted with -m64 code, and -m32 generated unformatted with
-m32 code, but I could not switch them. I then looked at the generated files
and noted that the first either 4 or 8 bytes was the record length for -m32
and -m64 respectively, and then the files were identical from that point on.
Yep, unfortunately, we figured this out too late to fix it: It would
make it impossible for people on 64-bit systems using GCC/g77 version n
to read their files generated by programs compiled by GCC/g77 version
n-1. We thought this was the lesser problem of the two, so we kept the
(unfortunate) code in libf2c.
Now an interesting question is how we are going to treat this with
gfortran: On the one hand we can do it right (use one record length
size on 32-bit and 64-bit systems), but then people on 64-bit systems
can't read their g77 generated unformatted files - or we could do the
same as libf2c and be stuck with the above problem.
On the third hand, I have received requests for 64-bit record lengths on
either system so that larger-than-2-Gbyte records are possible.
So many choices, so little time ....
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/