Use MPI_THREAD_FUNNELED when available
authorErik Lindahl <erik@kth.se>
Thu, 18 Jun 2015 19:57:11 +0000 (21:57 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 22 Jun 2015 12:20:47 +0000 (14:20 +0200)
commit12768d143bc1e7e3c101a2a1fe8ad612c07a605f
treeba5793cb291deeccff32ea4b1406145277304364
parentae076b0cd082401f37cf3edbf632e190c3b37b74
Use MPI_THREAD_FUNNELED when available

We have never observed any problems with MPI and OpenMP,
but for compliance we should call MPI_Init_thread() and
try to get MPI_THREAD_FUNNELED support level. However,
if that level is not supported we simply call the old
MPI_Init() instead - at least for Gromacs that seems fine.
If we get an error return code we warn the user, but if
MPI_init_thread() still worked we hope for the best and
don't bother the user.

Fixes #1127.

Change-Id: I11b81a65125e32b95255dbb769cf86b835bd62ab
src/gromacs/utility/init.cpp