This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 64 bit fortran unformatted on Opteron -- incompatible with32unformatted

Toon Moene wrote:

> 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.

as of right now, the gfortran approach is like this:

each sequential, unformatted record is prefixed with a byte count, of
type off_t.  off_t is a 64 bit number on FreeBSD and is a 32 bit number
on Linux (without using the LFS routines).

sequential, unformatted I/O is also broken, the lower level write
routine that spaces back to write this byte count doesn't work;  these
facts are only marginally applicable to this discussion:=)

i like the idea that the default is 64 bits for either case, but for
users with an off_t of only 32 bits, they would be restricted to a
record size < 2^32.  the run-time could give an error message
"unformatted record size too big" or something.

this of course means you cannot read g77 unformatted files.

--bud davis

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]