Re: 64 bit fortran unformatted on Opteron -- incompatible with 32unformatted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux