comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Error in reading large Fortran unformatted files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Error in reading large Fortran unformatted files [message #75155 is a reply to message #75062] Wed, 16 February 2011 07:44 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<69299e37-2172-46f3-ade9-3a04fa2115d7@s11g2000yqc.googlegroups.com>,
OM <metukio@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

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.

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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Problem using IDLBridge with virtual machine
Next Topic: Re: Problem using IDLBridge with virtual machine

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:08:32 PDT 2025

Total time taken to generate the page: 0.80105 seconds