- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 17.0.4.210.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
andrew_4619 wrote:
And now I am confused as the examples in this thread use real(8) and not the defunct real*8. I don't get Surely removing IOSTAT= that means I program crashes on error rather than you being able to handle the error.
Running a program from the command window sometimes generates useful run-time detail on a crash - but in this case, the IOSTAT already seemed to be pretty clear.
I will try to be more careful in the future, when copying code snippets to the forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »