Skip to content

Commit

Permalink
Merge pull request #462 from claresinger/fix-mpi
Browse files Browse the repository at this point in the history
Great, thanks!
  • Loading branch information
pdziekan committed Sep 28, 2020
2 parents 14de641 + 7970b43 commit 23a8eb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libmpdata++/concurr/detail/distmem.hpp
Expand Up @@ -108,13 +108,13 @@ namespace libmpdataxx
#if !defined(USE_MPI)
if (
// mvapich2
std::getenv("MV2_COMM_WORLD_RANK") != NULL ||
std::getenv("MV2_COMM_WORLD_RANK") != NULL && std::atoi(std::getenv("MV2_COMM_WORLD_SIZE")) > 1 ||
// mpich
std::getenv("PMI_RANK") != NULL ||
std::getenv("PMI_RANK") != NULL && std::atoi(std::getenv("PMI_SIZE")) > 1 ||
// openmpi
std::getenv("OMPI_COMM_WORLD_RANK") != NULL ||
std::getenv("OMPI_COMM_WORLD_RANK") != NULL && std::atoi(std::getenv("OMPI_COMM_WORLD_SIZE")) > 1 ||
// lam
std::getenv("LAMRANK") != NULL
std::getenv("LAMRANK") != NULL && std::atoi(std::getenv("LAMSIZE")) > 1
) throw std::runtime_error("mpirun environment variable detected but libmpdata++ was compiled with MPI disabled");
#else
// init mpi here, since distmem is constructed before hdf5
Expand Down

0 comments on commit 23a8eb1

Please sign in to comment.