Bug (or mis-feature) in g77 sequential file format
Juan Rivero
juanr@averroes.ivic.ve
Tue Sep 22 11:48:00 GMT 1998
On Tue, Sep 22, 1998 at 07:51:54AM -0400, Craig Burley wrote:
> >It turns out that this version of g77 for the alpha uses 8 bytes for the
> >record's header and trailer (which hold the record length), while the very
> >same g77 version on my PC running FreeBSD uses 4 bytes. The standard DEC
> >Fortran compiler also uses 4-byte headers and trailers. This means that I
> >cannot share binary files.
>
> I'm afraid that's a general problem in the computer industry. Some
> compiler vendors work around it, causing other problems in the process
> (e.g. by wasting space on 32-bit systems like PCs, or by not
> supporting records longer than 2^32 bytes on 64-bit systems like
> Alphas).
> [snip]
> The upshot is, for portable I/O, use either formatted I/O or hand-roll
> binary I/O using libU77 and/or C code. Neither is ideal, however,
> which is why it'd be nice to have g77 offer some better choices
> someday.
>
One platform-independent possibility is to use NCSA's Hierarchical Data
Format, available from
http://hdf.ncsa.uiuc.edu/
(Can use it right now; no need to wait for g77 to do something about
unformatted I/O.)
JR
------------------------------------------------------------------------
Dr. Juan Rivero email juanr@averroes.ivic.ve
Centro de Quimica WWW http://averroes.ivic.ve/
Instituto Venezolano de Investigaciones Cientificas (IVIC)
AP 21827, Caracas 1020A, Venezuela
+582-504-1772. Fax +582-504-1350 Cel. +5814-933 93 88
------------------------------------------------------------------------
More information about the Gcc-bugs
mailing list