linint2_Wrap should have *trivial* memory overhead.
How much memory do you have available?
When you have
dvar = dble2flt(fdata->$var$)
How big is
x = fdata->$var$
printVarSummary(x)
The dble2flt creates a new array that is half the (byte) size of the
double array [ 8 bytes for double and 4 bytes for float].
dvar = dble2flt (x )
I do not know how NCL allocates memory for this type of tranfer.
D
Bridget Thrasher wrote:
> I am being confronted with the dreaded malloc error when performing
> the following steps:
>
> ...
> factors = fdata->factors ; this variable is a float
> factors_int = linint2_Wrap(lons,lats,factors,True,obs_lons,obs_lats,0)
> delete(factors)
> bcsd->$var$ = factors_int
> delete(factors_int)
> dvar = dble2flt(fdata->$var$)
> dvar_int = linint2_Wrap(lons,lats,dvar,True,obs_lons,obs_lats,0)
> ...
>
> This runs fine until the last statement, at which point I get this:
>
> ncl(26119) malloc: *** mmap(size=1866240000) failed (error code=12)
> *** error: can't allocate region
> *** set a breakpoint in malloc_error_break to debug
> fatal:linint2: Unable to allocate memory for output array
> fatal:Execute: Error occurred at or near line 3784 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
> Since I'm deleting the previous arrays, and the result of the
> interpolation should be the same size, maybe there is some
> intermediate step of the first interpolation is still in memory? Or
> does dble2flt allocate an array of larger memory size than that
> allocated when reading in a float variable of the same dimensions? Or
> is there something else I'm overlooking?
>
> Thanks for your time,
> Bridget
>
>
> --
> Bridget Thrasher, PhD
> Postdoctoral Researcher
> Climate Central
> www.climatecentral.org <http://www.climatecentral.org>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ====================================================== _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Oct 22 13:32:11 2009
This archive was generated by hypermail 2.1.8 : Fri Oct 23 2009 - 11:36:30 MDT