Memory issue: Does linint2_Wrap hold on to anything in memory? Does dble2flt conversion allocate more memory than simple float array?

From: Bridget Thrasher <bthrasher_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 22 2009 - 12:42:14 MDT

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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 22 12:42:11 2009

This archive was generated by hypermail 2.1.8 : Fri Oct 23 2009 - 11:36:30 MDT