use more common syntax for CPP's "defined" keyword

This commit is contained in:
Axel Kohlmeyer 2019-08-01 07:03:51 -04:00
parent 892e4759df
commit 86e3740fb3
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 2 additions and 2 deletions

View File

@ -236,7 +236,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
cuda_aware_flag = 0;
} else if (have_cuda_aware == -1) { // maybe we are dealing with MPICH, MVAPICH2 or some derivative?
// MVAPICH2
#if (defined MPICH) && (defined MVAPICH2_VERSION)
#if defined(MPICH) && defined(MVAPICH2_VERSION)
char* str;
cuda_aware_flag = 0;
if (str = getenv("MV2_ENABLE_CUDA")
@ -247,7 +247,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
if (me == 0)
error->warning(FLERR,"MVAPICH2 'MV2_ENABLE_CUDA' environment variable is not set. Disabling CUDA-aware MPI");
// pure MPICH or some unsupported MPICH derivative
#elif (defined MPICH) && !(defined MVAPICH2_VERSION)
#elif defined(MPICH) && !defined(MVAPICH2_VERSION)
if (me == 0)
error->warning(FLERR,"Detected MPICH. Disabling CUDA-aware MPI");
cuda_aware_flag = 0;