Re: fatal:NclMalloc Failed:[errno=12] fatal:New: could not create new array:[errno=12] fatal:Execute: Error occurred at or near line 17 in file del2.ncl

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat, 26 Sep 2009 08:24:15 -0600

I have no problem running the script.

    last = 4748
    nValues = last*nlon*nlat
    nBytes = 4*nValues
    print("nValues="+nValues+" nBytes="+nBytes)

yields

(0) nValues=307670400 nBytes=1230681600

======

prec is 1.23GB. NCL (currently) allows variables up to 2GB.
What is the available memory ?

======
Note: You do not need to preallocate memory for "time".
Eliminate the ' time=new(last,"integer") '

The function 'ispan' will automatically create the array.

Good Luck

Sabeerali(sebi) wrote:
>
> Helloo,
> I am getting the following error when I run the below code. I think
> it is because of crossing memory limit...Is there any solution for this?
>
> Any help would be appreciated...Thanks in advance...
>
> fatal:NclMalloc Failed:[errno=12]
> fatal:New: could not create new array:[errno=12]
> fatal:Execute: Error occurred at or near line 17 in file del2.ncl
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> begin
> nlon=360
> nlat=180
> a=ut_inv_calendar(2008,12,31,0,0,0,"days after 1996-01-01 00:00:00",0)
> last=doubletoint(a)
> lat=latGlobeFo(nlat,"lat","latitude","degrees_north")
> lon=lonGlobeFo(nlon,"lon","longitude","degrees_east")
> lat=lat(::-1)
> time=new(last,"integer")
> time=ispan(1,last,1)
> prec=new((/last,nlat,nlon/),"float")
> end
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Sep 26 2009 - 08:24:15 MDT

This archive was generated by hypermail 2.2.0 : Sun Sep 27 2009 - 11:32:26 MDT