MD with polarization does not work in parallel
mdrun with any polarizable particles does not work in parallel. It seems like the coulomb force and pressure are computed incorrectly.
To reproduce, you need a double precision installation of gmx:
unpack the archive.
grompp_d -maxwarn 1
mdrun_d -e e1
mpirun -c 4 mdrun_d -e e4 -pd
(without -pd a SEGV occurs)
This does just 1 step but gives differences, e.g.:
% gmxcheck -e e1 -e2 e4 -tol 0 -abstol 0
Harmonic Pot. step 0: 4003.27, step 0: 3990.19
Coulomb (SR) step 0: -15807.1, step 0: -15794.1
Coul. recip. step 0: -1264.05, step 0: -1263.06
Potential step 0: -9859.72, step 0: -9858.8
Kinetic En. step 0: 0.746753, step 0: 0.785093
Total Energy step 0: -9858.98, step 0: -9858.01
Conserved En. step 0: -9858.98, step 0: -9858.01
Temperature step 0: 0.140224, step 0: 0.147423
Pressure step 0: -488.581, step 0: -463.677
The pressure differences make that simulations in parallel explode.
#4 Updated by David van der Spoel over 7 years ago
My topology had a water molecule consisting of five charge groups. The mdrun code detects this and turns off shell prediction, which in turn leads to crashes. By fixing the topology (attached file), the code runs as expected and produces identical results with 1 or 4 threads. Using threads means domain decomposition rather than particle decomposition, which is good!
This then means that when inter-charge group shells are detected the code fails, so I propose to build in a fatal error in this case, in both mdrun and grompp.
#5 Updated by David van der Spoel over 7 years ago
- Status changed from New to Closed
The problem was caused by SETTLE relying on atoms being within the same charge group (and hence not doing PBC calculations).
This has been fixed by introducing a fatal error in grompp when trying to process such a combination. If it is absolutely necessary to have atoms in different charge groups one should use normal constraints instead of settle. For 4.6/master SETTLE will be fixed to take into account PBC explicitly, so this patch should NOT be ported to 4.6.