Re: memory allocate problem

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri, 16 Jun 2006 08:47:55 -0600

Hi Jerry,

(58 years * 365 days) + 31 days = 21201 days

If you are reading NCEP/NCAR Reanalysis temperature from CDC then I
believe your grid is 73 lat x 144 lon.

So:
21201 * 73 * 144 * 4 bytes = ~891MB

So I would expect var_new to be 891MB in size. var (being of type short)
is probably 445MB in size, so converting var->var_new involves handling
1345MB of data.

In your system specs you say that you have 2GB of memory. Other system
processes are likely taking up the remainder of your systems RAM.

As far as what your options are, you can always parse up your script to
try to limit its' memory use. (By only analyzing all the January data at
once, then the Feb data, etc) But I would try to run the script on a
different machine if possible, that would be the easiest solution.

On a sidenote, if anyone has had issues with memory errors during a plot
call, make sure that you have a .hluresfile set that will increase the
default graphics memory in ncl:

*wsMaximumSize : 50000000
see:
http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml

Good luck,
Adam

> hi
>
> I read a daily data with 3 dimensions T1000(time , lat , lon)¡Athe time is
> from 19480101 to 20060131.
>
> The code is below
>
> begin
>
> f =
> addfile("http://172.16.66.34/cgi-bin/nph-dods/data_online/........../NCEPRE-Daily_T1000_d.nc"
> , "r")
> var = f->T1000
> var_new = short2flt(var)
>
> end
>
> When the code runs to var_new = short2flt(var)¡Ait get the error
> message¡G
>
> fatal¡GNclmalloc Failed¡G[ error=12 ]¡GCannot allocate memory
> fatal¡GCould not coerce values for operation
> fatal¡GExecute¡GError occurred at or near line 1340 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
>
> So i make the time range shorter ¡G
>
> begin
>
> f =
> addfile("http://172.16.66.34/cgi-bin/nph-dods/data_online/........../NCEPRE-Daily_T1000_d.nc"
> , "r")
> var = f->T1000(0:3650, : , :) ; the time only chose 10 years
> var_new = short2flt(var)
>
> end
>
> And the scripts will work complete.
>
> But i need to read the whole data , how can i do ?
> Thank you
>
> NCL version¡G4.2.0.a33
> OS¡GRed Hat Linux ES 3.0
> RAM¡G2G_______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 16 2006 - 08:47:55 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 16 2006 - 13:51:09 MDT