Remove #ifdef GMX_THREAD_MPI for basic thread safety.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 14 Sep 2013 12:05:06 +0000 (15:05 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 26 Nov 2013 20:27:34 +0000 (21:27 +0100)
commitcb6f48493bffd4197fba81acccc9057a88e06d3f
treecb8af451a6f58a339773503ed1b6cd0b595262a1
parent613cbc9b7a8cf42c8fc9ec4148f94dec246bbac6
Remove #ifdef GMX_THREAD_MPI for basic thread safety.

Simplifies the code, and at least most of this should have zero impact
on performance.  Basic thread support from thread-MPI is already
required for compilation anyways even with GMX_THREAD_MPI off.
This removes about 70% of the #ifdefs, making it clearer what is
different between MPI and thread-MPI implementation in Gromacs.

Also set MPI_IN_PLACE_EXISTS with GMX_THREAD_MPI instead of checking for
GMX_THREAD_MPI separately each time.  Adjust one #ifdef in network.c to
replace an GMX_LIB_MPI made unnecessary by this with GMX_MPI.

Related to #948 and #1320.

Change-Id: I03a54b0bffde090100afe5ed2e91c184af36c189
24 files changed:
CMakeLists.txt
cmake/ThreadMPI.cmake
src/gromacs/fileio/filenm.c
src/gromacs/fileio/futil.cpp
src/gromacs/fileio/gmxfio.c
src/gromacs/fileio/gmxfio_asc.c
src/gromacs/fileio/gmxfio_bin.c
src/gromacs/fileio/gmxfio_int.h
src/gromacs/fileio/gmxfio_rw.c
src/gromacs/fileio/gmxfio_xdr.c
src/gromacs/fileio/tpxio.c
src/gromacs/gmxlib/gmx_fatal.c
src/gromacs/gmxlib/main.cpp
src/gromacs/gmxlib/network.c
src/gromacs/gmxlib/nonbonded/nonbonded.c
src/gromacs/gmxlib/smalloc.c
src/gromacs/gmxlib/tcontrol.c
src/gromacs/gmxlib/txtdump.c
src/gromacs/gmxlib/typedefs.c
src/gromacs/gmxpreprocess/fflibutil.cpp
src/gromacs/legacyheaders/mdrun.h
src/programs/mdrun/md.c
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/runner.c