Bug #2087

GROMACS does not compile with MPI since a34f8680173ed297635fbe360a62c972f1bd44dd

Added by Vedran Miletic over 3 years ago. Updated over 3 years ago.

build system
Target version:
Affected version - extra info:
Affected version:


The build fails with:

[100%] Linking CXX executable ../../bin/gmx_mpi
/usr/bin/ld: CMakeFiles/mdrun_objlib.dir/mdrun/repl_ex.cpp.o: undefined reference to symbol 'MPI_Bcast'
/usr/lib64/openmpi/lib/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/programs/CMakeFiles/gmx.dir/build.make:135: recipe for target 'bin/gmx_mpi' failed
make[2]: *** [bin/gmx_mpi] Error 1
CMakeFiles/Makefile2:4379: recipe for target 'src/programs/CMakeFiles/gmx.dir/all' failed
make[1]: *** [src/programs/CMakeFiles/gmx.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

The following commit broke the build:

commit a34f8680173ed297635fbe360a62c972f1bd44dd
Author: Teemu Murtola <>
Date:   Thu Sep 15 22:08:02 2016 +0300

    Update bundled TNG

    This commit bundles 6e41191016 from the TNG repo.

    Required TNG 1.7.10 in future, which is the first version to include
    support for the build system features used here.

    Update the build system to use imported targets and interface properties
    that TNG now provides.  Add support for building TNG that also bundles
    zlib, which reduces the dependency footprint of GROMACS, which is
    important for portability and ease of installation.

    Refs #1908.

    Change-Id: Ibc94d5a9470136331045738f105634ec95fdb455

Associated revisions

Revision f09fd9cc (diff)
Added by Teemu Murtola over 3 years ago

Fix and clean up handling of some linking

Split GMX_EXTRA_LIBRARIES to several lists, depending on the intended
use of those libraries. Some of these also need to be linked by code
other than libgromacs, either because they are required by the public
headers (mostly -lm), or because also code outside libgromacs directly
references those libraries (e.g., MPI).

Should fix #2087.

Change-Id: Ie0e211b8f77a932ccd63017ee0743b78361624c4

Revision e29363ee (diff)
Added by Mark Abraham over 3 years ago

Initialize GMX_*_LIBRARIES cmake variables earlier

NVML linking got broken by the way the introduction of separate
variables also set them to empty initial values, but did so after
gmxManageGPU.cmake tried to set GMX_EXTRA_LIBRARIES.

Made minor improvements to the documentation

Fixes #2098
Refs #2087

Change-Id: I25116c6caa0d13bf9bb06854c8e3a1e3f7e8afb2


#1 Updated by Teemu Murtola over 3 years ago

  • Status changed from New to Fix uploaded
  • Assignee set to Teemu Murtola
  • Priority changed from High to Normal

This only affects cases where you do not follow the guidance in the install guide and do not use the MPI wrapper compilers. Every change is verified automatically, and that includes testing with MPI (but only with the wrapper compilers, since that is the recommended way of doing it).

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

Gerrit received a related patchset '1' for Issue #2087.
Uploader: Teemu Murtola ()
Change-Id: gromacs~master~Ie0e211b8f77a932ccd63017ee0743b78361624c4
Gerrit URL:

#3 Updated by Teemu Murtola over 3 years ago

  • Status changed from Fix uploaded to Closed

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

Gerrit received a related patchset '1' for Issue #2087.
Uploader: Mark Abraham ()
Change-Id: gromacs~master~I25116c6caa0d13bf9bb06854c8e3a1e3f7e8afb2
Gerrit URL:

Also available in: Atom PDF