> On 4/26/2018 4:56 AM, Jaromir Jakacki wrote:
>> 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,
> 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.
The inquire by I/O list was added into the language to address these
problems. As well as not knowing how much memory an I/O item occupies,
the system may waste small amounts of memory to ensure that objects are
aligned for efficient execution. The statement takes the form
where len is an integer variable and iolist is the relevant I/O list.
This does no I/O but sets len to the record length needed in an open
You will need to do this twice, once for the old file and once for the
Hope this helps,