Re: Memory issues in ncl

From: <jyin_at_nyahnyahspammersnyahnyah>
Date: Fri, 12 Oct 2007 09:56:09 -0600 (MDT)

Hi Rich,

I don't know if this is the problem you are running into, but I have had
situations where the memory used by ncl (as reported by the Unix command
"top") grew over time. I have found (by trial and error) that this can
happen when one variable that has dimensions and/or attributes attached to
it is assigned to another variable that has dimensions and/or attributes
attached to it. For example:

var1 = var2

where both var1 and var2 have dimensions and/or attributes. If, instead,
I just assign the value of var2 to var1:

var1 = (/var2/)

this problem of growing memory goes away. I don't know why this works,
but perhaps someone on the NCL team can explain it...

I hope that helps!

Jeff

> Has anyone ever had any issues with memory using ncl?
>
> I am running some code that basically reads variables from
> a netcdf file and produces a plot. I have about 100 plots but
> as it progresses it gets really slow. I have many procedures
> and functions being used and am speculating it may be
> some kind of memory leakage issue.
>
> Does anyone know of potential problems and/or whether there is a way
> to track memory usage as the program runs.
>
> Thanks
> Rich
>
>
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Richard Neale - Rm 304 - rneale_at_ucar.edu
> http://www.cgd.ucar.edu/cms/rneale
> Climate Modelling Section, CGD, NCAR
> P.O. Box 3000, Boulder, CO 80307-3000
> Tel (303) 497-1380 Fax (303) 497-1324
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> _______________________________________________
> 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 Oct 12 2007 - 09:56:09 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 12 2007 - 14:00:01 MDT