Unformatted file size limit?

Manuel Gimond mgimond@colby.edu
Mon Nov 30 16:43:00 GMT 2009


I cannot create an unformatted file greater than 2.1 GB. This
occurs with an executable compiled with either gfortran 32-bit (on XP 32-bit ) and with gfortran 64-bit (on Win 7 64-bit using -m64).
Snippets of the code follow:

INTEGER :: incr
REAL :: dflist
.
.
INQUIRE(IOLENGTH = length_dflist)dflist
OPEN(UNIT=55, file="scratch_dflist.bin",ACCESS='DIRECT', FORM='UNFORMATTED', &
STATUS="REPLACE",RECL=length_dflist)
.
DO ...
  WRITE(55, REC = incr) dflist
END DO

length_dflist  equals 4 in both the 32-bit and 64-bit versions .

I get the following error:
"At line 612 of file code.f90 (unit = 55, file = 'scratch_dflist.bin') Fortran runtime error: Record number too large"

I don't encounter the error when the file size ends up being less than 2GB. Is the 2GB limit intentionally set? 



More information about the Fortran mailing list