[Met_help] Memory problems with MET

John Halley Gotway johnhg at rap.ucar.edu
Wed Jul 1 09:21:01 MDT 2009


Thomas,

Good news.  It was a memory leak, and I found it.  ASCII2NC should now use very little memory.  The problem came when ASCII2NC was checking the time format in the observation (YYYYMMDD_HHMMSS).  There
was a memory leak in the library routine that compares the time string to a regular expression.  It was failing to call the free function after checking the regular expression.  Turns out it's a one
line fix.

Thanks for finding this bug!

Please use the attached version of the file "string_fxns.cc" to replace the version in "METv2.0/lib/vx_util/string_fxns.cc".  Then, from the METv2.0 directory, do a "make clean" and then rebuild MET.

Please let me know if this fix does the trick for you.  Once I hear back that it fixed your problem, I'll post it to the MET website.

Thanks,
John

Thomas Schwitalla wrote:
> John,
> 
> I attached the ASCII file...
> 
> Thomas
> 
> John Halley Gotway schrieb:
>> Thomas,
>>
>> That's odd.  It really shouldn't be causing memory problems.  I looked
>> through the code to make sure we're not trying to store too much in
>> memory.
>>
>> Perhaps there's a memory leak somewhere I can't see.  Could you please
>> send me a copy of that ASCII file you're using so I can play with it
>> here?
>>
>> You could post it to our anonymous FTP site:
>> ftp ftp.rap.ucar.edu
>> username = anonymous
>> password = "your email address"
>> cd incoming/irap/met_help
>> put "your file name"
>> bye
>>
>> Thanks,
>> John
>>
>> Thomas Schwitalla wrote:
>>  
>>> John,
>>>
>>> I tried to run ascii2nc with an ascii file of  25MB size and ~350000
>>> observations (t2m,td2m,u,v) but I am running out of memory on our 8GB
>>> memory computers. What can be the reason for such a huge memory need?
>>>
>>> Thomas
>>>
>>>     
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: string_fxns.cc
Type: text/x-c++src
Size: 4645 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20090701/5c2bc8da/attachment.bin 


More information about the Met_help mailing list