I have the following problem with ifort 22.214.171.124 Build 20150121. Even when using "-integer-size 64" I can not create record lager then integer(4) (2^32-1). For the older release of ifort Version 126.96.36.199 Build 20130121 this works just fine. For example
integer :: reclsize
end program recltest
the second open statement works with ifort 13 ( using ifort -integer-size 64 -assume byterecl test.f90 ), while it does not work with ifort 15, giving me the following error message
forrtl: severe (118): The 'RECL=' value in an OPEN statement for unit 123, file test.dat, exceeds the maximum allowed for the file's record type.
Is this a bug or am I doing something wrong ?
Using integer(4), 2**31 = 0x80000000 = -2147483648, that -1 = +2147483647
The integer size for RECL= is integer(4), at least per the Reference Guide information.
Please use smaller record size and read/write in manageable chunks. This will conserve memory for an unnecessarily large record buffer.
Thank you for the answer. I am aware that if I am using integer(4) it will not work but for integer(8) (compiling with -integer-size 64 ) I would have expected it to work as it did in the previous ifort version 13 and ifort 14. Actually the largest record size I can define with ifort 15 is 2**29, so not even full integer(4). Is this now an intentional limitation introduced in ifort 15 ?
It didn't work in the older version - only the low 32 bits of the value were silently used. We fixed that bug. The documented RECL limits are typically 2**31-1 (see the documentation of RECL= in OPEN for details.)
Note that you can read and write longer records using sequential unformatted I/O. But not direct access.
Marius B. wrote:
Actually the largest record size I can define with ifort 15 is 2**29, so not even full integer(4). Is this now an intentional limitation introduced in ifort 15 ?
By default, IFort uses an I/O unit of 1 longword (4 bytes) for unformatted files, unless you specify /assume:byterecl. Since 229 longwords = 231 bytes, the value that you found is at the limit of signed 32-bit integers.