Memory Allocation Error: grid storage
Chris Butenhoff
cbutenhoff at YAHOO.COM
Wed Jan 28 21:33:18 EST 2009
Dear Arlindo:
Thanks for the response.
You might be right. My original thought was that since the file contains 1
byte char values, it would only use ~600 Mb of memory when read into Grads.
So Grads converts all input data into 4 byte floats? Which as you said, puts
me close to my memory limit. If that is correct, then there is no way around
this except to divide the input file into smaller chunks.
Thanks.
_Chris
My 600 Mb binary file is composed of 1 byte values. I use the tag "-1,40,1"
>> On my attempt to display a variable in Grads v1.9b4 I receive the following
>> message:
>>
>> >>>Memory Allocation Error: grid storage
>> >>>Data Request Error: Error for variable 'lc'
>>
>> The open file is about 600 Mb in size and has a lon/lat grid of
>> 40320x16353.
>>
>
>Let's do the math. The size of the file hardly matters as it may include
>compression. Grads v1.9b4 holds gridded data in 4 byte floats. So, a
>singlevariable at your grid resolution would require:
>
>40320*16353*4/(1024*1024) ~ 2.5 GB
>
>So, you could be very close to your memory limit of 3GB. The particular
>format also matters; there is a known memory leak with some form of
>netcdf/hdf file.
>
>
>>
>> My machine has over 3 Gb of RAM so I assume the memory limit must be set in
>> Grads.
>>
>> Searching the archives I find the following info:
>
>
>> >>> "The limit of the cache size is (for now) hard-coded in gaio around
>> >>> line 76:
>> >>> #define MAXG2CACHE 500100100
>> >>> You can change this and recompile if you want to limit or expand your
>> >>> memory usage."
>>
>> Before attempting, does anyone have experience with this problem, and is
>> this the right fix?
>>
>
> This is a Grib-2 specific issue, certainly not an issue with v1.9b4 which
>does not support Grib-2.
>
>--
>Arlindo da Silva
>dasilva at alum.mit.edu
>
More information about the gradsusr
mailing list