[Thread Prev][Thread Next][Index]

Re: Possible memory leak in Ferret v5.6



I know this is a bit sketchy on details but...

I have suspected a memory leak somewhere between ferret and dods for a
while but I have not had time to properly troubleshoot the problem.
If this helps at all, the last error I saw was the following (which
subsequently brought the machine to a halt):

Oct  7 07:26:15 kernel: Out of Memory: Killed process 17927 (nc_dods).

Said machine was equipped with 1GB of memory.

More details to follow when I have time to sort it all out. 


Phil


On Tue, 2004-10-19 at 12:12, Gustafson, William I wrote:
> Dear Ferreters,
> 
> Have any of you had problems with a memory leak in Ferret when using it with data pulled from a Grads-DODS servers? Below is a simple script I wrote to download data from the nomads server at NCDC. I loops through all the days of a given month and then writes the data from one variable to a file. I have noticed that every time one of the daily files is closed and another opened, Ferret sucks up another ~4Mb of memory. I have tried adding a "cancel memory/all" command inside the repeat loop, but this does not seem to help. When downloading one month of data, this problem is annoying but not detrimental. However, when I use a similar technique to get a year's worth of data, Ferret works its way up to 1.25+ Gb and I have to start swapping a lot, which slows everything on the machine down.
> 
> Thanks for any help.
> 
> -Bill
> 
> 
> 
> !-----------------------------------------------------------------------
> ! Script to download North American Regional Reanalysis data from the
> ! NCDC GDS server. It is assumed that no other data files are open.
> !
> ! Author: William.Gustafson@pnl.gov; 7-Oct-2004
> !-----------------------------------------------------------------------
> 
> !-----------------------------------------------------------------------
> ! User settings...
> !-----------------------------------------------------------------------
> define symbol var = apcp
> 
> define symbol yr  = 1994
> define symbol mn  = 12
> 
> define symbol dys = 1
> define symbol dye = 31
> 
> !-----------------------------------------------------------------------
> ! Here we go...
> !-----------------------------------------------------------------------
> 
> !Chop off the portions of the globe with all missing data
> set region/x=-212:-4/y=-10:86
> 
> let month = if ($mn) lt 10 then "0($mn)" else "($mn)"; \
> repeat/name=dy/range=($dys):($dye) ( \
>    let day = if `dy` lt 10 then "0`dy`" else "`dy`"; \
>    cancel memory/all; \
>    set data "http://nomads.ncdc.noaa.gov:9091/dods/NCEP_NARR_DAILY/($yr)`month`/($yr)`month``day`/narr-a_221_($yr)`month``day`_0000_000"; \
>    list/form=cdf/file="($var).nc"/append ($var)[l=1:8]; \
>    cancel data 1; \
> )
> 
> _______________________________________
> William I. Gustafson Jr., Ph.D.
> Pacific Northwest National Laboratory
> P.O. Box 999, MSIN K9-30
> Richland, WA 99352, USA
> Voice & Msg: (509)372-6110
> FAX: (509)372-6168
> http://www.pnl.gov/atmos_sciences
-- 
Phil Moses
UNIX/Network/Computing Administration and Support
Physical Oceanography Research Division, Scripps Institution of Oceanography
pbmoses@ucsd.edu
858-822-1541



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement