- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get the following message
forrtl: severe (98): cannot allocate memory for the file buffer - out of memory, unit 22, file D:BIGmensola.VIR
when I try to read a record from an unformatted file.
In a subroutine I write a 'big' record of integer*4
write(vir) ia(1:n)
where N=97.954.383
Next in the program, I try to read the record and I get the error in the subject.
The length of the 'record' is 97954383*4*8 = 3.134.540.256 bit > HUGE(1) = 2**31.
Why I can write the roecord and I cannot read it?
There is some limit to the 'lenght' in bit of a record?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve.
??> The length of the 'record' is 97954383*4*8 = 3.134.540.256 bit > HUGE(1) = 2**31.
Would this imply that file I/O is bit granular? Or at least record size is bit granular?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The real code, for writing the file is the following:
c
c we store on VIR file for future usage
c
nfvir=iunit ('VIR',nerror) rewind (nfvir)c
c 1.st record on VIR : master record
c
write(nfvir)neq,ntotec
c 2.nd record on VIR : columns (1,...,NTOTE)
c (currently unuseful)
c
c write(nfvir)(iarea (k,1),k=1,ntote)
call writearr( nfvir, iarea, ntote)c
where the subroutine WRITEARR is the following:
subroutine writearr( iunit, ia, n ) dimension ia(n) write(iunit) ia return endReally, I must skip the record, and my original source code is:
c
c get info on the nfvir file
c
rewind (nfvir) read (nfvir)i,j ! neq, nonz read (nfvir)! (iarea (k,1),k=1,ntote)c read (nfvir)(ipoint(l),l=1,neq+1)
read (nfvir) ipointI get the error on the 2nd READ, when I try to skyp the 'big' record.
I tried to do it with the following code:
read (nfvir)idum! (iarea (k,1),k=1,ntote)
but I get always the error message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I compiled my program as 64 bit application and the code works without problem: the 'big' record is skipped.
- 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