On 4/26/2018 4:56 AM, Jaromir Jakacki wrote:
> Dears,
> I have data that has been written using one record length and would like to read them and then write using another record length (fortran direct access). I use Intel compiler that use default length unit is 4 bytes word. But i am able to use compiler flat '-assume byterecl' and in this case the record length will be 4bytes*2 (for double precision). Is it possible to use both record lengths in one fortran script?
> Thank you in advance for your help
> with best regards,
> Jaromir
>
As you pointed out, -assume byterecl is one of the options ifort
requires for Fortran standard compliance. I'm not certain whether this
is the primary point of your question.
If you are copying a direct access file, OPENing separate UNITs should
permit you to specify RECL individually. If you are changing all data
items to double their width, and you wish the new file to contain the
same number of records, the new RECL would be twice the old one.
I don't know why you bring up the number of bytes of storage of an
individual datum. Unless the old file was written with, for example,
RECL=4, the normal situation would be a RECL of at least 132.
I'm not certain that Intel specifies a default value of RECL. In
general, the old file would require reading by the same compiler with
the same RECL used when it was written.
--
Tim Prince
|