Re: Memory leak with if statement and logical array

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 20 Apr 2007 15:00:59 -0600 (MDT)

Hi Dave,

Thanks for the good description and a script! We will take a look
right away and see if this is something we can get fixed before
the next release.

--Mary

On Thu, 19 Apr 2007, Dave Allured wrote:

> Hello. I would like to report a possible memory leak problem in NCL version
> 4.2.0.a034. This occurs when using an array of type logical within an if
> statement. A significant amount of memory is lost each time this statement
> is executed:
>
> if (flags(x)) then
>
> If the direct array reference is changed to a logical expression, the problem
> goes away:
>
> if (flags(x) .eq. True) then
>
> The second form is a good workaround, but it might save significant debugging
> time if the first form could be fixed.
>
> Please see the attached script for a working demo. The double nested loop is
> necessary in the complex application that I was developing. Otherwise I
> would have never noticed the leak.
>
> I am running NCL version 4.2.0.a034 on Mac OS:
>
> mac56:~/narr 173> uname -a
> Darwin mac56.cdc.noaa.gov 8.9.0 Darwin Kernel Version 8.9.0: Thu Feb 22
> 20:54:07 PST 2007; root:xnu-792.17.14~1/RELEASE_PPC Power Macintosh powerpc
>
> Thanks in advance to the NCL team for any bug fix that might be provided.
>
> --Dave A.
> CU/CIRES Climate Diagnostics Center (CDC)
> NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 20 2007 - 15:00:59 MDT

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