Re: Error in reading large Fortran unformatted files [message #75135 is a reply to message #75068] |
Thu, 17 February 2011 00:24   |
OM
Messages: 12 Registered: February 2011
|
Junior Member |
|
|
On Feb 16, 5:44 pm, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> In article
> < 69299e37-2172-46f3-ade9-3a04fa211...@s11g2000yqc.googlegroup s.com >,
>
> OM <metu...@gmail.com> wrote:
>> There's really not much to it...
>> I do it all from the command line:
>> f='name_of_file'
>> d=FLTARR(1024,1024,1024)
>> OPENR, 1, f, /F77_UNFORMATTED
>> READU, 1, d
>
>> At that point I get the error. Again, for 512 this worked fine.
>
> I have always had better luck not setting the /F77_UNFORMATTED
> flag and reading the length words myself.
>
> That is,
>
> nb1 = 0
> nb2 = 0
> OPENR, 1, f
> READU, 1, nb1, f, nb2
Well, I get:
nb1=9
nb2=21461
I have no idea what any of this means...
> In any case, I suspect that you have a 64-bit filesystem, but that
> Fortran only writes 32-bit record lengths. In this case, your variable
> is 4 GB, which will not fit into 32 bits.
From what I understand, that's not the case:
IDL> PRINT, !VERSION.FILE_OFFSET_BITS
64
> The file may be OK, and you can just ignore nb1 and nb2, since
> you know how big the record is in the file.
> Have a look at nb1 and nb2 and see what you find.
>
> Ken Bowman
Thanks for taking an interest!
Ofer.
|
|
|