Bug #2960

segmentation fault when -ddorder is set to pp_pme

Added by Peicho Petkov about 1 year ago. Updated 12 months ago.

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


I received segmentation fault when running a simulation with gromacs 2019.2 and option -ddorder pp_pme.

Command line:
mpirun -np 4 gmx_mpi mdrun -deffnm sig-11 -s topol.tpr -npme 2 -ddorder pp_pme -v

the same happened with 1 pme node
mpirun -np 4 gmx_mpi mdrun -deffnm sig-11 -s topol.tpr -npme 1 -ddorder pp_pme -v

GROMACS version: 2019.2
Precision: single
Memory model: 64 bit
MPI library: MPI
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: SSE4.1
FFT library: fftw-3.3.4-sse2-avx
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: hwloc-1.11.0
Tracing support: disabled
C compiler: /usr/bin/cc GNU 5.4.0
C compiler flags: -msse4.1 -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast
C++ compiler: /usr/bin/c++ GNU 5.4.0
C++ compiler flags: -msse4.1 -std=c++11 -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast

I have tried with Intel compiler and the problem is the same when running on Haswell and KNL.

the SIGSEG apeared at
domdec.cpp: 892 -> while (sim_nodeid > dd->comm->pmenodes[i])
looking at the source some lines above I found the condition if(dd->comm->pmenodes==nullptr) and
it turned out that the pointer dd->comm->pmenodes is not initialized yet (in the pp_pme case).
It was fixed after adding
comm->pmenodes = nullptr;
in function static gmx_domdec_comm_t *init_dd_comm()

topol.tpr (344 KB) topol.tpr npt 2fs water box Peicho Petkov, 05/28/2019 08:14 PM
conf.gro (820 KB) conf.gro Peicho Petkov, 05/28/2019 08:15 PM
grompp.mdp (1.46 KB) grompp.mdp Peicho Petkov, 05/28/2019 08:15 PM (1.02 KB) Peicho Petkov, 05/28/2019 08:15 PM

Associated revisions

Revision aa71e19f (diff)
Added by Mark Abraham 12 months ago

Initialize all of gmx_domdec_comm_t

Many fields were left uninitizalized when C++ new was used, rather
than snew. All fields are now initialized to zero, false, or nullptr,
in some cases via aggregate initializations of arrays. Moved the
field documentation to the line before the field and its initializer,
which reads better.

The initializers require another call to snew be replaced with one to

Fixes #2960

Change-Id: Ide917a47c667a8237519c2f4600bbce48c48f948


#1 Updated by Paul Bauer about 1 year ago

  • Status changed from New to Fix uploaded
  • Assignee set to Paul Bauer
  • Target version set to 2019.3

#2 Updated by Mark Abraham 12 months ago

  • Status changed from Fix uploaded to Resolved

#3 Updated by Paul Bauer 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF