[gmx-developers] Generalized Born - Crashes

David van der Spoel spoel at xray.bmc.uu.se
Sun Apr 12 13:17:22 CEST 2009


David van der Spoel wrote:
> OK,
> 
> now I typed in some parameters, and EM works fine (apparently GB is not 
> used there?), but MD crashes at step 0 due to memory allocation problems:
> (gdb) up
> #3  0x000000000049472c in init_gb (p_born=0x7fff0c32a160, cr=0x754c010,
>     fr=0x759b820, ir=0x7759040, mtop=0x75990b0, x=0x7846880, rgbradii=5,
>     gb_algorithm=0) at /home/spoel/GROMACS/head/gmx/src/mdlib/genborn.c:500
> 500        snew(fr->gblist.jjnr,nalloc*2);
> (gdb) p nalloc
> $1 = 674711745
> 
> Why does it need to allocate 6.7 million times 2 elements in the 
> neighborlist? Is there an O(N^2) algorithm at play here?
> I have 36735 CG atoms.
> 
> Puzzled...

Ok, apparently this is the case (from include /types/forcerec.h):
   /* GB neighborlists (the sr list will contain for each atom all other 
atoms
    * (for use in the SA calculation) and the lr list will contain 

    * for each atom all atoms 1-4 or greater (for use in the GB 
calculation)
    */
Why is there a need for a special neighbor list? Why not use the normal 
one (possibly without exclusions), but anyway there is no need to 
include all atoms for the SA calculation even if they are on the other 
side of the box. That should make the SA calculation a lot faster as well.

-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Professor of Biology
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the gromacs.org_gmx-developers mailing list