Segfault with non-interacting atoms with Verlet scheme - Redmine #1958
Archive from user: Semen Yesylevskyy
When Verlet cutoff scheme is used mrun crushes mysteriously if the non-interacting dummy molecule is present in the system. The minimal top file is below. Mdrun crashes despite the fact, that dummy atoms do not interact with anything and should not affect the system in any way:
Tolerance (Fmax) = 1.00000e+00
Number of steps = 5000
Step= 0, Dmax= 1.0e-03 nm, Epot= -nan Fmax= 8.47202e+02, atom= 607
Segmentation fault (core dumped)
When there are only two atoms in the dummy molecule everything is fine. If the third atom (named T) is added mdrun crashes immediately.
If group cutoff scheme is used everything works in both cases with no problem.
[ atomtypes ]
; Dummy atoms not interacting with anything!
;name bond_type mass charge ptype sigma epsilon
SW 12 0.00000 0.00000 A 0.0 0.0
DU 12 0.00000 0.00000 A 0.0 0.0
[ moleculetype ]
[ atoms ]
; nr type resnr residue atom cgnr charge mass
1 SW 1 SW SW 1 0.0 12.0
2 DU 1 SW DU 2 0.0 12.0
3 DU 1 SW T 3 0.0 12.0 ;Remove this atom and it will work!
[ bonds ]
1 2 6 0.0 10000
[ system ]
[ molecules ]
; Compound nmols
(from redmine: issue id 1958, created on 2016-05-13 by gmxdefault, closed on 2016-06-01)
- Revision 3c6ba9c7 by Berk Hess on 2016-05-30T17:31:49Z:
Add grompp check for unbound atoms grompp now print a note for atoms that are not connected by a potential or constraint to any other atom in the same moleculetype, since this often means the user made a mistake. Refs #1958. Change-Id: Iabb00563c76a9f7954f84d89d1c67d438f2c31ff
- Revision fcc7c4c4 by Berk Hess on 2016-05-31T11:52:58Z:
Avoid numerical overflow with overlapping atoms The verlet kernels did not allow overlapping atoms, even if they were not interacting (in contrast to the group kernels). Fixed by clamping the interaction distance so it can not become smaller than ~6e-4 in single and ~1e-18 in double, and when this number is later multiplied by zero parameters it will not influence forces. The clamping should never affect normal interactions; we would previously crash for distances that were this small. On Haswell, RF and PME kernels get 3% and 1% slower, respectively. On CUDA, RF and PME kernels get 1% and 2% faster, respectively. Fixes #1958. Change-Id: I83b88f0e9ca34dc151a8b907f334a95a1a4301cc
- bug.zip Minimal system to reproduce