Re: Error in reading large Fortran unformatted files [message #75123 is a reply to message #75068] |
Thu, 17 February 2011 08:16   |
Nigel Wade
Messages: 286 Registered: March 1998
|
Senior Member |
|
|
On 17/02/11 15:02, Kenneth P. Bowman wrote:
> In article
> <45a7d29c-1223-4e0e-8390-5a549f91cd02@s11g2000yqh.googlegroups.com>,
> OM <metukio@gmail.com> wrote:
>
>> The output is now:
>> nb1=2147483657
>> nb2=995288272
>>
>> I still have no idea what this means.
>
> nb1 is the largest possible positive 32-bit signed integer
>
> IDL> print, 2L^31 - 1
> 2147483647
>
The value quoted is 2147483657, which is 10 more than that. Assuming OM
cut'n'pasted the output, so it's not just a typo, it's a number which
has no immediate significance that I can think of.
I do, however, agree that the problem is almost certainly due to trying
to write 4GB of data as a single FORTRAN unformatted record. I doubt
that when the FORTRAN unformatted format was devised it was never
envisioned that someone would try to output that much data in a single
write statement. The record length is a 32bit quantity. I don't see that
that can be altered based on platform, the format must be the same for
32bit and 64bit platforms, and applications. I think the max. you can
possibly write in a single record is 2GB-1. To write 4GB will require at
least 3 records.
--
Nigel Wade
|
|
|