Project

General

Profile

Bug #2029

mdrun gives different distance restraint potential energies depending on the number of openMP threads

Added by Tim Flint over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Hi,

I got spuriously large distance restraint potential energy when running mdrun with multiple OpenMP threads and the system adopts a weird configuration sooner or later (depending on the restraint force constant) while the same simulation (same tpr file) runs fine. Here are the Dis. Res. related mdp option I used (see the uploaded tpr file for details):

disre = simple
disre-weighting = conservative
disre-tau = 0
disre-fc = 1e-5
nstdisreout = 10000

and I tried mdrun using a single MPI rank and giving 1, 2, 4 to -ntomp and only -ntomp = 1 gave sane results. The log file from the 1 OpenMP thread looks like:

Step           Time         Lambda
0 0.00000 0.00000
Energies (kJ/mol)
Bond Angle G96Angle LJ (SR) Coulomb (SR)
2.16662e+01 0.00000e+00 1.96570e+03 9.15548e+03 0.00000e+00
Dis. Rest. D.R.Viol. (nm) Potential Kinetic En. Total Energy
5.56697e+04 2.90805e+04 6.68126e+04 1.57240e+04 8.25365e+04
Temperature Pressure (bar)
2.99970e+02 -6.28303e-07

while that from 2 OpenMP threads looks like:

Step           Time         Lambda
0 0.00000 0.00000
Energies (kJ/mol)
Bond Angle G96Angle LJ (SR) Coulomb (SR)
2.16662e+01 0.00000e+00 1.96571e+03 9.15548e+03 0.00000e+00
Dis. Rest. D.R.Viol. (nm) Potential Kinetic En. Total Energy
1.96610e+07 4.12632e+05 1.96722e+07 1.57284e+04 1.96879e+07
Temperature Pressure (bar)
3.00055e+02 5.46943e-06

It looks like all the other potential energy terms are the same independent of the number of OpenMP threads except for Dis. Rest.. Can anyone tell me if I'm hitting a bug in GROMACS or if there's something I missed in setting up distance restraint?

Thanks,
Tim

nvt2.tpr (954 KB) nvt2.tpr Tim Flint, 08/09/2016 11:36 PM

Related issues

Related to GROMACS - Bug #1989: simple distance restraints should work with REMD and multiple ranks per simulationClosed
Related to GROMACS - Bug #1117: ensemble-averaged distance restraints is probably brokenClosed

Associated revisions

Revision c1364cf4 (diff)
Added by Berk Hess about 3 years ago

Made distance restraints work with threads and DD

The NMR distance restraints use several buffers for summing distances
that were indexed based on the index of the thread+domain local ilist
force atoms. This gives incorrect results with OpenMP and/or domain
decomposition. Using the type index for the restraint and a domain-
local, but not thread-local index for the pair resolves these issues.
The are now only two limitations left:
  • Time-averaged restraint don't work with DD.
  • Multiple copies of molecules in the same system without ensemble
    averaging does not work with DD.

Fixes #1117.
Fixes #1989.
Fixes #2029.

Change-Id: Ic51230aa19a4640caca29a7d7ff471e30a3d9f09

History

#1 Updated by Berk Hess over 3 years ago

  • Category set to mdrun
  • Status changed from New to Accepted
  • Assignee set to Berk Hess
  • Priority changed from High to Normal

I have found the source of this issue.
But it seems to me that you're don't want to do NMR distance restraints, but rather simply restrain distances using a simple potential. For that bonds type 10 is simpler, faster and will work with threads.

#2 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #2029.
Uploader: Berk Hess ()
Change-Id: Ic51230aa19a4640caca29a7d7ff471e30a3d9f09
Gerrit URL: https://gerrit.gromacs.org/6108

#3 Updated by Berk Hess over 3 years ago

  • Status changed from Accepted to Fix uploaded
  • Target version set to 2016.1

I uploaded a fix for v2016.
But using bonds type 10 is probably the best solution for you.

#4 Updated by Szilárd Páll over 3 years ago

  • Related to Bug #1989: simple distance restraints should work with REMD and multiple ranks per simulation added

#5 Updated by Szilárd Páll over 3 years ago

  • Related to Bug #1117: ensemble-averaged distance restraints is probably broken added

#6 Updated by Berk Hess about 3 years ago

  • Status changed from Fix uploaded to Resolved

#7 Updated by Mark Abraham about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF