[ncl-talk] Memory leak with grib2 files

David Brown dbrown at ucar.edu
Thu Jun 29 16:08:13 MDT 2017


Dave ,
This leak has been fixed. If you need the new version, let us know. We
are in the process of creating a system where a new build will be
available the next day whenever a change has been made to the
development branch of the code. This will be via the ncar conda
channel.
 -dave

On Thu, Jun 29, 2017 at 10:21 AM, David Brown <dbrown at ucar.edu> wrote:
> Hi Dave,
> We will check this out.
>  -dave
>
> On Thu, Jun 29, 2017 at 10:09 AM, Dave Allured - NOAA Affiliate
> <dave.allured at noaa.gov> wrote:
>> NCL team,
>>
>> When reading a series of grib2 files, I get a serious memory leak.  For each
>> grib2 file of about 60 Mb size, it seems that about 15 Mb of user memory is
>> consumed by addfile, and never released.
>>
>> Is this an NCL bug?  Is there a quick fix or a patch available?
>>
>> We tested similar scenarios with Netcdf file sets, and never saw a memory
>> accumulation like this.
>>
>> I tested this with NCL 6.4.0 on two systems, and got identical behavior:
>>
>> * Mac OS El Capitan (10.11.6)
>> * Linux, Centos 6.9.
>>
>> Following is a simple test case.  I suggest using any available grib2 data
>> set for your own testing.  I can upload some of these grib2 files if you
>> can't duplicate the behavior with your own files.
>>
>> begin
>>   base = "/Projects/Reforecast2/1985/198501/"
>>   wildcard = "198501??00/[cp]??/latlon/hgt_pres_198501??00_???.grib2"
>>
>>   files  = systemfunc ("ls -1 " + base + wildcard)
>>   nfiles = dimsizes (files)
>>   print ("Number of files = " + nfiles)
>>
>>   do i = 0, nfiles-1
>>     f = addfile (files(i), "r")
>>     print (i + "  " + files(i))
>>     delete (f)
>>   end do
>> end
>>
>> Thanks for looking into this.
>>
>> --Dave
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>


More information about the ncl-talk mailing list