<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 19 Jul 2018, at 17:14, Miguel Zilhão <<a href="mailto:miguel.zilhao.nogueira@tecnico.ulisboa.pt" class="">miguel.zilhao.nogueira@tecnico.ulisboa.pt</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">hi Ian,<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">i've noticed that my runs (using latest ET release) with CarpetRegrid2 exhibit a significant<br class="">increase in memory during runtime. this seems to happen immediately after some non-trivial<br class="">regridding operation is done. the increase is steady, and at some point i run out of memory and the<br class="">simulation crashes. this is happening both on my workstation (running Ubuntu 18.04) as well as our<br class="">local cluster (running Debian 9). i was wondering if someone has seen something like this?<br class=""><br class="">i have not seen this happen for simulations without CarpetRegrid2. i show below some relevant<br class="">portions of the stdout file for a standard inspiral BH run (note the last column--maxrss_mb):<br class=""><br class=""></blockquote>This could be caused by memory fragmentation due to all the freeing and mallocing that happens during regridding when the sizes of the grids change. Can you try using tcmalloc or jemalloc instead of glibc malloc and reporting back? One workaround could be to run shorter simulations (i.e. set a walltime of 12 h instead of 24 h).<br class=""></blockquote><br class="">thanks for your reply. in one of my cases, for the resolution used and the available memory, i was out of memory quite quickly -- within 6 hours or so... so unfortunately it becomes a bit impractical for large simulations...<br class=""><br class="">what would i need to do in order to use tcmalloc or jemalloc?<br class=""></div></div></blockquote><div><br class=""></div><div>I have used tcmalloc. I think you will need the following:</div><div><br class=""></div><div>- Install tcmalloc (<a href="https://github.com/gperftools/gperftools" class="">https://github.com/gperftools/gperftools</a>), and libunwind, which it depends on. </div><div>- In your optionlist, link with tcmalloc. I have</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>LDFLAGS = -rdynamic -L/home/ianhin/software/gperftools-2.1/lib -Wl,-rpath,/home/ianhin/software/gperftools-2.1/lib -ltcmalloc</div><div><br class=""></div><div>This should be sufficient I think for tcmalloc to be used instead of glibc malloc. Try this out, and see if things are better. I also have a thorn which hooks into the tcmalloc API. You can get it from</div><div><br class=""></div><div><a href="https://bitbucket.org/ianhinder/tcmalloc" class="">https://bitbucket.org/ianhinder/tcmalloc</a></div><div><br class=""></div><div>It's very much a work in progress, and probably has some hard-coded assumptions in it. You can set Cactus parameters to:</div><div><br class=""></div><div>1. Report memory statistics periodically</div><div>2. Release memory back to the OS periodically</div><div>3. Output a memory profile periodically</div><div><br class=""></div><div>Let us know how it goes!</div><div><br class=""></div></div><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">-- <br class="">Ian Hinder<br class=""><a href="https://ianhinder.net" class="">https://ianhinder.net</a><br class=""></div></div>
</div>
<br class=""></body></html>