Fix issues with failing thread affinity setting
commit420fb6f98822acdee01139217868633c2c024c71
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 21 Apr 2016 18:40:52 +0000 (21 21:40 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 27 Apr 2016 13:33:10 +0000 (27 15:33 +0200)
tree7f430334e41a968b997033a11213f61bedeb9dd0
parentf2efa3d18462ebee43c5150d4f7e30b211ddd8c3
Fix issues with failing thread affinity setting

- Fix the conditional in MPI_Reduce() to correctly detect only a subset
  of the ranks failing.
- Ensure that all ranks reach all the MPI_Reduce() calls to avoid
  deadlocks on heterogeneous nodes, where only some nodes could fail the
  consistency checks.  As a side effect, always produce the final
  message about failed affinity settings, together with its advice.
- Only do MPI_Reduce() if there are multiple ranks.
- Fix incorrect #ifdef (caused by rebasing the original change over the
  change that made GMX_MPI 0/1-valued).

The last change seems to fix #1951.

Change-Id: I93c8c4bd6051c9077736f9fc19e6e0637c6d6435
src/gromacs/mdrunutility/threadaffinity.cpp