[gradsusr] memory leak in opengrads v2.0.a9.oga.1 ??

Henrique M. J. Barbosa - IFUSP hbarbosa at if.usp.br
Fri Apr 27 10:43:34 EDT 2012


Hi Arlindo and Jeniffer,

I have a script that opens one huge file (2Gb) with equivalent potential
temperature and calculates frontogenesis. The math is not very complicated,
but involves many calls do cdiff(), pow(...,2) and mag(). My input grib
data set has 30 years of 6hs data at 850hPa (xdef=144, ydef=157). The
script opens only 1 output file and uses fwrite to save a plain binary with
the result.

To save memory, I am doing the computation 1 month at a time. After each
month, all created variables are erased (undefined). However, at the end of
the script grads is using 8Gb of RAM and 4Gb of swap space. Just to be
sure, I did a reinit a couple of times after the script ended, but the
memory use kept the same!! The memory was freed only after I quit grads.

It seems to be a serious memory leak somewhere, doesn't it?
Any idea how the fix that? The script follows attached.

By the way, I am using OpenGrads  v2.0.a9.oga.1, to be precise the
pre-built binaries for x86-64. I must say that I've seen this kind
of behavior at least since grads-1.8.

Thanks,
Henrique
-- 
----------------------------------------------------------------
Prof. Henrique M.J. Barbosa          Phone:+[55] (11) 3091 6647
Ed. Basilio Jafet, Sala 100           Cell:+[55] (11) 8380 8001
Dep. de Fisica Aplicada                FAX:+[55] (11) 3091 6749
Instituto de Fisica - USP
Rua do Matao, Travessa R, 187        Skype: hmjbarbosa
05508-900, Sao Paulo, SP, Brazil       msn: hmjbarbosa at yahoo.com
http://www.fap.if.usp.br/~hbarbosa   e-mail: hbarbosa at if.usp.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120427/bf1a63af/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calc_deriv_front.gs
Type: application/octet-stream
Size: 7667 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20120427/bf1a63af/attachment-0003.obj 


More information about the gradsusr mailing list