From 892e4759df463d0439a44d4997fd277331cfb7d7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Aug 2019 07:02:55 -0400 Subject: [PATCH] protect Spectrum MPI detection from failing to compile with MPI libraries implementing MPI version 2 or 1 --- src/KOKKOS/kokkos.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index a353c3dd18..dd0aca2a9f 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -208,6 +208,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) MPI_Comm_size(world,&nmpi); if (nmpi > 0) { +#if defined(MPI_VERSION) && (MPI_VERSION > 2) // Check for IBM Spectrum MPI int len; @@ -226,6 +227,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) if (me == 0) error->warning(FLERR,"The Spectrum MPI '-gpu' flag is not set. Disabling CUDA-aware MPI"); } +#endif if (cuda_aware_flag == 1 && have_cuda_aware == 0) { if (me == 0)