[gmx-developers] memory leaks in addconf.c

Jochen Hub jhub at gwdg.de
Sat May 5 00:01:19 CEST 2012



Am 5/4/12 7:37 PM, schrieb David van der Spoel:
> On 2012-05-04 15:21, Jochen Hub wrote:
>> Hi,
>>
>> the memory allocated by genbox with option -ci blows up within seconds
>> to, say, 2 GB or so. Apparently this is due to lots of snew's in the
>> file addconf.c (functions add_conf(), , that do not have the respective
>> sfree. A short grep on addconf.c shows that from 17 snew's in the file
>> only 3 have an sfree. Probably there a few more snew in init_mtop,
>> init_t_atoms, init_mdatoms, init_nrnb, init_forcerec,
>> init_neighbor_list, init_neighbor.
>>
>> I guess this is not the indented behavior? Should I file a bugzilla on
>> this issue?
>>
>> Cheers,
>> Jochen
>>
> Yes. Redmine that is.
> I thought there already was one, but can not find it.

OK, one question before I submit a bug report: I could also submit a 
patch to gerrit which does a simple all-to-all distance check (without 
neighbor searching) when inserting a molecule. For my example (that 
required approximately 12x20.000 distance checks per insertion) this was 
very fast. And it does not leak memory, of course. I could switch on 
this feature with an option for now.

Together with this patch, I would submit a little extension to genbox 
that allows to insert molecules near given positions (instead of at 
random positions).

Would such a patch have a chance to go through gerrit? I feel that this 
is not the extra-elegant but a working solution for now. Please let me know.

Cheers,
Jochen



-- 
---------------------------------------------------
Dr. Jochen Hub
Computational Molecular Biophysics Group
Institute for Microbiology and Genetics
Georg-August-University of Göttingen
Justus-von-Liebig-Weg 11, 37077 Göttingen, Germany.
Phone: +49-551-39-14189
http://cmb.bio.uni-goettingen.de/
---------------------------------------------------



More information about the gromacs.org_gmx-developers mailing list