large array problem with write

I think, that I have found a bug concerned with large arrays. The following test program fails with access violation, even if i compile it with -Mlarge_arrays.

program test
  real, allocatable :: A(:,:)
  allocate(A(320000000,3))
  A = 1
  Munit = 20
  open( UNIT=Munit, file='dat',FORM='UNFORMATTED')
  WRITE(Munit) A
  close(Munit)
  deallocate(A)
end

However, if I split write operations, program finishes good.

program test
  real, allocatable :: A(:,:)
  allocate(A(320000000,3))
  A = 1
  Munit = 20
  open( UNIT=Munit, file='dat',FORM='UNFORMATTED')
  WRITE(Munit) A(:,1)
  WRITE(Munit) A(:,2)
  WRITE(Munit) A(:,3)
  close(Munit)
  deallocate(A)
end

Looks like some underlying function doesn’t support large array, so it fails in spite of use of -Mlarge_arrays flag.

Compiler is 13.10, win7.

Thanks Senya. I added a problem report (TPR#19732) and sent it on to engineering for investigation. I’m not sure if it’s a bug or some limitation in Windows but will let you know what they determine.

  • Mat

TPR 19732 - UF: Writing large file on Windows cause seg fault
has been fixed in the 15.5 release.

thanks,
dave