Re: Error in reading large Fortran unformatted files [message #75063 is a reply to message #75062] |
Wed, 16 February 2011 05:11   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
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.
|
|
|