<div dir="ltr">Hi,<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 10, 2015 at 7:23 PM Mirabzadeh, Christopher (<a href="mailto:mira2978@vandals.uidaho.edu">mira2978@vandals.uidaho.edu</a>) &lt;<a href="mailto:mira2978@vandals.uidaho.edu">mira2978@vandals.uidaho.edu</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
I’m not sure what file you are editing but I’ll attempt an answer at this. What I’ve noticed is that there is a Gromacs wrapper for free() called “sfree()”. I can’t recall where I’ve found it defined but I’ve used it in my own code to free memory allocated
 for arrays. What you may find is that the array is either freed in the .c file that you are editing, or you may find that it is freed where it is initialized, if a pointer. In my own project, the arrays that I am taking advantage of are defined and freed in
 src/gromacs/gmxlib/typedefs.c.
<div><br>
</div>
<div>If the file you are editing is a .cpp, the garbage collection may be automatic, but that depends on the structure type.</div></div></blockquote><div><br></div><div>No, mdrun likely will never do garbage collection, for multiple reasons. Various smart pointers are on the way in, but if you&#39;re allocating heap memory each MD step then you need to go and re-think the pace of your life ;-)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">
<div>I hope that helps!</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>-ChrisM</div>
<div><br>
</div>
<div>
<div>
<div>Mirabzadeh, Christopher </div>
<div>Research Assistant/Physics Instructor</div>
<div>Department of Physics</div>
<div>University of Idaho</div>
<div>Moscow, Id</div>
<div>(509)339-5647</div>
</div>
<div><br>
</div>
</div></div><div style="word-wrap:break-word">
<div><br>
<blockquote type="cite">
<div style="word-wrap:break-word">
<div><br>
<div>
<blockquote type="cite">
<div>On Jun 9, 2015, at 3:26 PM, Sikandar Mashayak &lt;<a href="mailto:mashayak@votca.org" target="_blank">mashayak@votca.org</a>&gt; wrote:</div>
<br>
<div>
<div dir="ltr">
<div>
<div>
<div>Hi,<br>
<br>
</div>
I am trying to find out the location in the source code where the arrays, e..g, real *x, of the structure nbnxn_atomdata_t are freed?</div></div></div></div></blockquote></div></div></div></blockquote></div></div></blockquote><div><br></div><div>Probably they are not freed (because mdrun is currently built to be good enough to run a single simulation and then terminate), but the intent is to allocate and free such arrays using the function pointer members of nbnxn_atomdata_t. Search for alloc and free in nbnxn_atomdata.c</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div dir="ltr"><div><div> Are they freed explicitly or they are automatically deallocated when the program ends.<br></div></div></div></div></blockquote></div></div></div></blockquote></div></div></blockquote><div>Unix processes have their memory reclaimed by the OS when they terminate; currently there is no &quot;destructor&quot; ever called for such arrays. That&#39;s dirty, but sufficient what is currently normal GROMACS usage.</div><div><br></div><div>Mark</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div dir="ltr"><div><div>
</div>
Thanks,<br>
</div>
Sikandar<br>
</div>
-- <br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">
http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">
http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to
<a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>

--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div></div>