io library bug?

Tobias Burnus burnus@net-b.de
Thu May 27 12:59:00 GMT 2010


On 05/27/2010 02:18 PM, N.M. Maclaren wrote:
> Some compilers have the option to select between 4- and 8-byte header
> and trailers.

gfortran does not internally use 8-bytes for the RECL= argument of OPEN,
but for the records themselves gfortran allows records larger than 2 GB.
>From the GCC 4.2 release notes:

"The GNU Fortran compiler now uses 4-byte record markers by default for
unformatted files to be compatible with g77 and most other compilers.
The implementation allows for records greater than 2 GB and is
compatible with several other compilers. Older versions of gfortran used
8-byte record markers by default (on most systems). In order to change
the length of the record markers, e.g. to read unformatted files created
by older gfortran versions, the -frecord-marker=8 option can be used."

And I can imagine that one also changes libgfortran to allow for RECL=
8-byte integers. Nevertheless, I see only limited used for RECL="6.4
GiB" due to memory constraints. (At least I have mostly to do with
systems which have very little memory per core/process but one which
programs are used that run on many tens (hundreds) of cores.)

By the way, I have now filled a bugreport,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44292, to track this issue.
However, it will take a while until it will get fixed as it breaks the
ABI of libgfortran. It is expected that the big array-descriptor change
will be done during the 4.6 development [which kind of forces an ABI
breakage]; taking the opportunity, some additional changes will then be
made as well, cf. http://gcc.gnu.org/wiki/LibgfortranAbiCleanup)

Tobias,
who somehow dislikes both ABI breakage and stalled development due to
ABI compatibility. (E.g. the maximal rank of arrays is still 7 and not
15 because the arrays descriptor just has 3 bits for the rank (2^3 = 8,
thus rank 0 to 7) and changing it will break the ABI :-(



More information about the Fortran mailing list