Re: End of record marker - 32 vs. 64 bit
- From: "Chris Theis" <chris.theis@n o s p am.cern.ch>
- Date: Wed, 28 Feb 2007 22:38:25 +0100
"Steve Lionel" <steve.lionel@xxxxxxxxx> wrote in message news:1172686448.055419.253580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[SNIP]
My question is whether the record
length marker is specified to be of integer size in the standard or what the
FORTRAN standard says on this issue?
The Fortran standard is completely silent on this issue. It is an
implementation detail, and there exist platforms (VMS is one that
comes to mind) where record lengths are handled by the file system and
not written out as data. It is true that across UNIX, Linux and
Windows compilers, the use of record lengths in the data is very
common, but it is not universal nor is it specified by the standard.
I didn't know that record lengths could be handled by the file system and not be embedded in the data. Thanks for pointing this out as well as what the standard says (or rather doesn't say) on this.
You say you are using g77. I am aware that g77 made the unfortunate
choice of using straight 64-bit record lengths on platforms with 64-
bit virtual addresses. As you discovered, this makes that combination
incompatible with platforms that use 32-bit lengths. I don't know if
g77 has an option to use 32-bit lengths. I do know that Intel
Fortran, DEC/Compaq Fortran and gfortran use a scheme where 32-bit
lengths are used and very long records are split into segments with
specially encoded length values. This preserves compatibility with 32-
bit platforms for nearly all cases, but still allows longer records to
be written and read. I think that gfortran, which recently switched
to the segment scheme, has an option to use 64-bit lengths.
I'm not sure why you feel you are locked to g77.
I've seen that some compilers adopted this splitting scheme or have switches for this problem. The choice of g77 is actually not mine but rather made by the developers, who provide the package we're working with. As a user one can only implement single routines and compile & link them to an existing framework. So I'm bound to whatever decision the developers of that software make.
Thanks a lot for the insight
Chris
.
- Follow-Ups:
- Re: End of record marker - 32 vs. 64 bit
- From: Steve Lionel
- Re: End of record marker - 32 vs. 64 bit
- References:
- End of record marker - 32 vs. 64 bit
- From: Chris Theis
- Re: End of record marker - 32 vs. 64 bit
- From: Steve Lionel
- End of record marker - 32 vs. 64 bit
- Prev by Date: Re: Array Constructors
- Next by Date: IBM XL Fortran
- Previous by thread: Re: End of record marker - 32 vs. 64 bit
- Next by thread: Re: End of record marker - 32 vs. 64 bit
- Index(es):