<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The memory leak in cdiff() was fixed in verison 2.0.0. --Jennifer<div><br><div><div>On Apr 27, 2012, at 10:43 AM, Henrique M. J. Barbosa - IFUSP wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="text-align:right">Hi Arlindo and Jeniffer,</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div><div>It seems to be a serious memory leak somewhere, doesn't it?</div></div><div>Any idea how the fix that? The script follows attached.</div><div><br></div><div><div>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. </div>
<div><br></div></div><div>Thanks,</div><div>Henrique</div><div>-- <br><span style="font-family:arial,sans-serif;font-size:12.5px;border-collapse:collapse"><div style="color:rgb(80,0,80)">----------------------------------------------------------------<br>
Prof. Henrique M.J. Barbosa Phone:+[55] (11) 3091 6647<br>Ed. Basilio Jafet, Sala 100 Cell:+[55] (11) 8380 8001<br>Dep. de Fisica Aplicada FAX:+[55] (11) 3091 6749<br>Instituto de Fisica - USP<br>
Rua do Matao, Travessa R, 187 Skype: hmjbarbosa<br></div>05508-900, Sao Paulo, SP, Brazil msn: <a href="mailto:hmjbarbosa@yahoo.com" style="color:rgb(17,37,8)" target="_blank">hmjbarbosa@yahoo.com</a> <br><a href="http://www.fap.if.usp.br/~hbarbosa" style="color:rgb(17,37,8)" target="_blank">http://www.fap.if.usp.br/~hbarbosa</a> e-mail: <a href="mailto:hbarbosa@if.usp.br" style="color:rgb(17,37,8)" target="_blank">hbarbosa@if.usp.br</a></span><br>
</div>
<span><calc_deriv_front.gs></span>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></div></body></html>