Re: READ-statement and a segmentation fault
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Fri, 13 Oct 2006 17:02:00 +0000 (UTC)
In article <4p8vnfFhusv8U2@xxxxxxxxxxxxxx>,
Jan Vorbrüggen <jvorbrueggen@xxxxxxxxxxxxxxx> writes:
How is the 'binary' data file generated (ie., by some other code
compiled with an old Fortran compiler)? I'd guess that you're
getting hit by gfortran's 64-bit recorder marker whereas many/most
non-modern compilers use a 32-bit recorder marker.
For such incompatible changes, the DEC compiler RTLs tended to have an
elaborate set of ways of setting such parameters. You could specify the
default at compile time, use an environment variable to set or override,
if you will, at run time, and in at least one case override again on a
LUN-specific basis, again per environment variable.
Is there an extension to OPEN to set the size of the record marker in gfortran?
There is a -frecord-marker option, but IIRC it has some issues
`-frecord-marker=LENGTH'
Specify the length of record markers for unformatted files. Valid
values for LENGTH are 4 and 8. Default is whatever `off_t' is
specified to be on that particular system. Note that specifying
LENGTH as 4 limits the record length of unformatted files to 2 GB.
This option does not extend the maximum possible record length on
systems where `off_t' is a four_byte quantity.
A patch was posted a few months ago. It hasn't made its way
into the code base (due to copyright assignment issues and
the patch submitter relocation). A fairly long thread
concerning the issues starts at
http://gcc.gnu.org/ml/fortran/2006-07/msg00221.html
The technical discussion that followed was trying to get everyone
to agree on the best approach to "fixing" the incompatibility.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- References:
- READ-statement and a segmentation fault
- From: rncdnet
- Re: READ-statement and a segmentation fault
- From: Steven G. Kargl
- Re: READ-statement and a segmentation fault
- From: Jan Vorbrüggen
- READ-statement and a segmentation fault
- Prev by Date: Re: Allocatables in derived types and functions
- Next by Date: Re: Allocatables in derived types and functions
- Previous by thread: Re: READ-statement and a segmentation fault
- Next by thread: Re: READ-statement and a segmentation fault
- Index(es):
Relevant Pages
|