My application has recently stopped being able to read unformatted files that are greater than 2.1GB in size. Specifically, the read command of the following subroutine fails (iostat=-1) if jj = 2900 (file size 2.15GB), but works (iostat=0) if jj=2800 (file size 2.08GB).
ii = 95000 jj = 4000 allocate ( store_huge(ii, jj), STAT = istat ) store_huge = 0.0 open( newunit = file_id, file = outputfilename, form = 'unformatted', action='write', iostat = istat ) write(file_id, IOSTAT=istat) store_huge close(file_id) store_huge = 1.0 open(newunit=file_id, FILE=outputfilename, form = 'unformatted', action='read', iostat = istat) read(file_id, IOSTAT=istat) store_huge close(file_id) deallocate( store_huge )
This problem only appeared recently, and may be due to a recent Windows update (which we can no longer control, and which have been driving me crazy). I have Windows 10 (including the most recent automated updates), am using VS2017 (which may be the problem, though I have been using this for a couple of months without issue), and Visual Fortran Compiler 184.108.40.206.