Bug #1393

genbox segfaults with after verlet scheme become default

Added by Alexey Shvetsov about 7 years ago. Updated almost 7 years ago.

Target version:
Affected version - extra info:
Affected version:


genbox segfaults since verlet scheme became default one

Program received signal SIGSEGV, Segmentation fault.
init_nb_verlet (nbpu_opt=0x0, cr=0x8a5bf0, fr=0x8a54d0, ir=0x681b60, nb_verlet=0x8a56d0, fp=0x7ffff54532a0 <_IO_2_1_stdout_>) at /home/alexxy/Develop/gromacs/src/gromacs/mdlib/forcerec.c:1976
1976 pick_nbnxn_resources(cr, fr->hwinfo,
(gdb) bt
#0 init_nb_verlet (nbpu_opt=0x0, cr=0x8a5bf0, fr=0x8a54d0, ir=0x681b60, nb_verlet=0x8a56d0, fp=0x7ffff54532a0 <_IO_2_1_stdout_>)
at /home/alexxy/Develop/gromacs/src/gromacs/mdlib/forcerec.c:1976
#1 init_forcerec (fp=0x7ffff54532a0 <_IO_2_1_stdout_>, oenv=oenv@entry=0x674eb0, fr=<optimized out>, fcd=fcd@entry=0x0, ir=ir@entry=0x681b60, mtop=mtop@entry=0x681070, cr=cr@entry=0x8a5bf0,
box=box@entry=0x7fffffffa9c0, tabfn=tabfn@entry=0x0, tabafn=tabafn@entry=0x0, tabpfn=tabpfn@entry=0x0, tabbfn=tabbfn@entry=0x0, nbpu_opt=nbpu_opt@entry=0x0,
bNoSolvOpt=bNoSolvOpt@entry=1, print_force=print_force@entry=-1) at /home/alexxy/Develop/gromacs/src/gromacs/mdlib/forcerec.c:2986
#2 0x00007ffff6f8ee9f in do_nsgrid (fp=0x7ffff54532a0 <_IO_2_1_stdout_>, bVerbose=bVerbose@entry=1, box=box@entry=0x7fffffffa9c0, x=x@entry=0x7ffff48e2010, atoms=atoms@entry=0x677cd0,
rlong=rlong@entry=0.307799995, oenv=oenv@entry=0x674eb0) at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/addconf.c:297
#3 0x00007ffff6f8f6ec in add_conf (atoms=0x7fffffffaa50, x=0x7fffffffa970, v=0x0, r=0x7fffffffa968, bSrenew=1, ePBC=-1, box=0x7fffffffa9c0, bInsert=0, atoms_solvt=0x677c80,
x_solvt=0x7ffff7e05010, v_solvt=0x0, r_solvt=0x682ee0, bVerbose=1, rshell=0, max_sol=0, oenv=0x674eb0) at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/addconf.c:411
#4 0x00007ffff70649df in add_solv (oenv=0x674eb0, max_sol=0, rshell=0, residues_added=<synthetic pointer>, atoms_added=<synthetic pointer>, r_scale=0.569999993, r_distance=0.104999997,
aps=0x676340, box=0x7fffffffa9c0, ePBC=-1, r=0x7fffffffa968, v=0x0, x=0x7fffffffa970, atoms=0x7fffffffaa50, fn=<optimized out>)
at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/gmx_genbox.cpp:632
#5 gmx_genbox (argc=1, argv=<optimized out>) at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/gmx_genbox.cpp:1047
#6 0x00007ffff6ec42e5 in gmx::CommandLineModuleManager::run (this=this@entry=0x7fffffffd040, argc=8, argv=0x7fffffffd158)
at /home/alexxy/Develop/gromacs/src/gromacs/commandline/cmdlinemodulemanager.cpp:1327
#7 0x000000000041153c in main (argc=8, argv=0x7fffffffd158) at /home/alexxy/Develop/gromacs/src/programs/gmx/gmx.cpp:58

steps to reproduce

get attatched file
prepare system
pdb2gmx -f speptide.pdb -o speptide -p speptide -ff amber99sb-ildn -water tip3p
editconf -f speptide.gro -o speptide.boxed -d 2 -princ -c

and run genbox

genbox -cp speptide.boxed.gro -cs -o speptide.solvated -p

speptide.pdb (11.6 KB) speptide.pdb Alexey Shvetsov, 12/05/2013 07:47 AM

Related issues

Related to GROMACS - Bug #1499: Memory bug in solvateClosed05/11/2014

Associated revisions

Revision 96fb3956 (diff)
Added by Mark Abraham almost 7 years ago

Add hack to fix genbox

Using a lighter-weight neighbour search is a better idea, but this bug
needs fixing right now.

Add integration tests for major functionality of genbox. These pass
only with the fix in this patch. These are not the most glorious
tests, but as demonstrated by this bug, "does not segfault in routine
workflows" is useful.

Fixes #1393

Change-Id: I5628f52cd91dcb64d66e690b2e611e524f450972


#1 Updated by David van der Spoel about 7 years ago

This might be worked around by using the neighborsearching that is in the analysis framework. Since that is much easier to use it will prevent errors due to incomplete initialization of the gromacs core.

#2 Updated by Gerrit Code Review Bot almost 7 years ago

Gerrit received a related patchset '1' for Issue #1393.
Uploader: Mark Abraham ()
Change-Id: I5628f52cd91dcb64d66e690b2e611e524f450972
Gerrit URL:

#3 Updated by Mark Abraham almost 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#4 Updated by Rossen Apostolov almost 7 years ago

  • Status changed from Resolved to Closed

#5 Updated by Mark Abraham over 6 years ago

  • Related to Bug #1499: Memory bug in solvate added

Also available in: Atom PDF