RE: [ncl-talk] Memory leak with if statement and logical array

From: O'Neill, Susan - Portland, OR <susan.oneill_at_nyahnyahspammersnyahnyah>
Date: Tue, 24 Apr 2007 10:31:30 -0600

Hi Dave/everyone,

I'm running NCL version 4.2.0.a034 (released 9/26/2006) on a small LINUX
box with redhat ES.

Thanks!

        Susan

-----Original Message-----
From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On
Behalf Of Dave Allured
Sent: Monday, April 23, 2007 6:14 PM
To: ncl-talk_at_ucar.edu
Subject: Re: Memory leak with if statement and logical array

All,

Attached is a modified version of Susan's tst_memLeak script. I
deactivated all statements involving file I/O, leaving only simple
NCL statements and calls to NCL built-in functions. I also
commented out all if statements.

This version t3.ncl also shows a memory leak on Mac OS, though not
as severe as the one Susan describes. However, this one still has a
severe problem, running slower and slower with each iteration, which
is a killer for real processing applications.

My original post was about a memory leak with if statements, so this
is probably something different.

Susan, what kind of system are you running? Also, which NCL
version? It would be helpful to know whether these leaks occur on
platforms other than Mac OS.

--Dave A.
CU/CIRES Climate Diagnostics Center (CDC)
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)

O'Neill, Susan - Portland, OR wrote:
>
> Hi Dave & everyone,
>
> I too have been struggling with a memory leak and was very excited to
> see your message. Unfortunately, it did not fix things for me.
> Attached is a very simple NCL script that loops through 3 yrs of flx
> files (tst_memLeak.ncl). I removed all program logic except for loop
> controls, system calls to un-tar & clean-up files, and opening the flx
> files. As the program runs it steadily consumes more and more memory,
> even after adding the explicit "True" to my logical if statements. It
> starts out using approx 2% of memory and by the time it's run 24
months
> it's using 27% of memory.
>
> When I have actual code in the script (see attached
> extractFlx_Montana.ncl), by the time 2 yrs have run 85% of memory is
> being used and it takes hours to process through one flx file.
>
> I can work around this by creating a wrapper script that only runs NCL
a
> month at a time using ENV variables to set loop controls, but would
> really like to find a solution to this because I may want more data in
> memory to do graphing or other data manipulations in the future.
>
> Any insights/help/comments would be very appreciated! I am new to NCL
> so could quite possibly be missing something too, thank you!
>
> Susan

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 24 2007 - 10:31:30 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 26 2007 - 08:55:37 MDT