http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60956

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-05-01
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The attached test executes without error when compiled with 4.3.1 (~232s), but
fails with all the revisions I have tried starting at 4.5 (no exhaustive
tests). From pr44292: "gfortran currently fails if the RECL= is larger than 2
GB", so the failure seems expected.

Work-around: 
(1) use unformatted files

    OPEN(UNIT=100, FILE='dummy.txt', ACTION='WRITE', STATUS='REPLACE',
FORM='UNFORMATTED',  ACCESS='STREAM')
    WRITE(100) u
    CLOSE(100)

    OPEN(UNIT=101, FILE='dummy.txt', ACTION='READ', STATUS='OLD',
FORM='UNFORMATTED',  ACCESS='STREAM')
    READ(101) v
    CLOSE(101)

runtime is ~3.6s CPU time and ~6.3s real time, the file size is 1.6Gb.

(2) use several records

    OPEN(UNIT=100, FILE='dummy.txt', ACTION='WRITE', STATUS='REPLACE')
    do i = 1, n-1, n/100
      write(100,*) u(i:i+n/100-1)
    end do
    CLOSE(100)

    OPEN(UNIT=101, FILE='dummy.txt', ACTION='READ', STATUS='OLD')
    do i = 1, n-1, n/100
      read(101,*) v(i:i+n/100-1)
    end do
    CLOSE(101)

runtime is ~166s and the file size is 5.4Gb.

Reply via email to