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 #75062] Wed, 16 February 2011 05:16 Go to previous message
OM is currently offline  OM
Messages: 12
Registered: February 2011
Junior Member
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.

Ofer.

On Feb 16, 3:11 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> Can you show the IDL code you are using to read the file?
>
> On Feb 16, 10:00 am, OM <metu...@gmail.com> wrote:
>
>> Hello everyone,
>
>> I'm new to this group, but I hope I won't look too silly...
>> I've recently started doing calculations in Fortran that result in
>> files containing an n^3 real (single precision) array. As long as n
>> was up to 512, everything worked fine, and I could read the result
>> file with IDL just fine. As long as I switched to n=1024, though...
>> (array sizes must be powers of 2, for the FFT that is yet to come).
>> I can open the file, and I can assign an array of the proper size, but
>> as soon as I try to read the file into the array, I get the error:
>> % READU: Corrupted f77 unformatted file detected. Unit: 2
>
>> I checked, and according to here (http://www.physics.nyu.edu/grierlab/
>> idl_html_help/files10.html) the size of the file should be within
>> limits (it's too big for 32 bit systems, but I made sure that I'm
>> running a 64 bit version of IDL on a 64 bit machine). It's not a
>> question of endianess, since I'm running the same Fortran code on the
>> same dataset, and the only thing that changes is the size of the grid.
>> Just to be sure of that point, I also made sure I can read the result
>> file correctly with Fortran and tried opening the file with the /
>> SWAP_ENDIAN and /SWAP_IF_LITTLE_ENDIAN keywords (not at the same time,
>> of course), and I still get the same error.
>> I'm out of ideas by this point... I'll really appreciate any kind of
>> help.
>
>> Thanks,
>> Ofer.
>
>
[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: Wed Oct 08 18:19:18 PDT 2025

Total time taken to generate the page: 0.00452 seconds