Skip to content
Snippets Groups Projects
Commit f6275747 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fix for old MPICH versions that do not support MPI_COMM_TYPE_SHARED

- for example conda ships this old MPI version
parent 46867bf7
No related merge requests found
......@@ -27,7 +27,15 @@
namespace walberla {
namespace cuda {
#ifdef WALBERLA_BUILD_WITH_MPI
#if MPI_VERSION == 2 || MPI_VERSION == 1
#ifndef MPI_COMM_TYPE_SHARED
void selectDeviceBasedOnMpiRank() {
WALBERLA_ABORT("Your MPI implementation is tool old - it does not support CUDA device selection based on MPI rank");
}
#else
void selectDeviceBasedOnMpiRank()
{
......@@ -62,6 +70,8 @@ void selectDeviceBasedOnMpiRank()
WALBERLA_CUDA_CHECK( cudaSetDevice( rankOnNode % deviceCount ) );
}
}
#endif
#else
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment