Search code examples
compiler-errorsfortranintel-fortrandata-management

maximum reclen ifort 18 vs ifort 19


Running this small program

program main
  implicit none

  integer(8) :: irecl
  irecl= 4147483646_8
  open(3,file='STORE.data',form='unformatted',access='direct',recl=irecl)
end

compiled with ifort 19.0.0.117 gives me no problems, but with ifort 18.0.1 gives me a forrtl: severe (118). I know this is because ifort has a maximum record length (at least the 18 version does). I can't find anything about the maximum record length for ifort 19. Is it gone? Or how high is it? It seems to be lower than the range of an int*8 (9223372036854775807).


Solution

  • Comparing the Intel documentation between versions 18 and 19, I see that the limit on a value for record length was removed. (The documentation isn't entirely clear on this, as it refers to formatted records, but I think it also applies here.) Practically speaking, you'll be limited for direct access to a byte offset that fits in a signed 64-bit integer. Note that, by default, the RECL= units in the OPEN you show is 4-byte units (unless you have enabled the "assume byterecl" option (also implied by standard_semantics).

    I recall from my time at Intel that there was a bug where the compiler and the run-time library didn't agree on their support for RECL values greater than 2**32. That was fixed, perhaps in version 19.

    I agree with Vladimir F that you'd do well to ask Intel directly. You can ask in the Intel forum and will probably get a knowledgeable response, though it may take a while.