Cleanup of CUDA-aware MPI code
This commit is contained in:
@ -214,20 +214,17 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
|||||||
char mpi_version[MPI_MAX_LIBRARY_VERSION_STRING];
|
char mpi_version[MPI_MAX_LIBRARY_VERSION_STRING];
|
||||||
MPI_Get_library_version(mpi_version, &len);
|
MPI_Get_library_version(mpi_version, &len);
|
||||||
if (strstr(&mpi_version[0], "Spectrum") != NULL) {
|
if (strstr(&mpi_version[0], "Spectrum") != NULL) {
|
||||||
int gpu_flag = 0;
|
cuda_aware_flag = 0;
|
||||||
char* str;
|
char* str;
|
||||||
if (str = getenv("OMPI_MCA_pml_pami_enable_cuda")) {
|
if (str = getenv("OMPI_MCA_pml_pami_enable_cuda"))
|
||||||
if(!(strcmp(str,"1") == 0)) {
|
if((strcmp(str,"1") == 0)) {
|
||||||
|
have_cuda_aware = 1;
|
||||||
cuda_aware_flag = 1;
|
cuda_aware_flag = 1;
|
||||||
gpu_flag = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gpu_flag) {
|
if (!cuda_aware_flag)
|
||||||
if (me == 0)
|
if (me == 0)
|
||||||
error->warning(FLERR,"The Spectrum MPI '-gpu' flag is not set. Disabling CUDA-aware MPI");
|
error->warning(FLERR,"The Spectrum MPI '-gpu' flag is not set. Disabling CUDA-aware MPI");
|
||||||
cuda_aware_flag = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cuda_aware_flag == 1 && have_cuda_aware == 0) {
|
if (cuda_aware_flag == 1 && have_cuda_aware == 0) {
|
||||||
@ -239,16 +236,14 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
|||||||
// MVAPICH2
|
// MVAPICH2
|
||||||
#if (defined MPICH) && (defined MVAPICH2_VERSION)
|
#if (defined MPICH) && (defined MVAPICH2_VERSION)
|
||||||
char* str;
|
char* str;
|
||||||
int gpu_flag = 0;
|
cuda_aware_flag = 0;
|
||||||
if (str = getenv("MV2_ENABLE_CUDA")
|
if (str = getenv("MV2_ENABLE_CUDA")
|
||||||
if (!(strcmp(str,"1") == 0))
|
if ((strcmp(str,"1") == 0))
|
||||||
gpu_flag = 1;
|
cuda_aware_flag = 1;
|
||||||
|
|
||||||
if (!gpu_flag) {
|
if (!cuda_aware_flag)
|
||||||
if (me == 0)
|
if (me == 0)
|
||||||
error->warning(FLERR,"MVAPICH2 'MV2_ENABLE_CUDA' environment variable is not set. Disabling CUDA-aware MPI");
|
error->warning(FLERR,"MVAPICH2 'MV2_ENABLE_CUDA' environment variable is not set. Disabling CUDA-aware MPI");
|
||||||
cuda_aware_flag = 0;
|
|
||||||
}
|
|
||||||
// pure MPICH or some unsupported MPICH derivative
|
// pure MPICH or some unsupported MPICH derivative
|
||||||
#elif (defined MPICH) && !(defined MVAPICH2_VERSION)
|
#elif (defined MPICH) && !(defined MVAPICH2_VERSION)
|
||||||
if (me == 0)
|
if (me == 0)
|
||||||
|
|||||||
@ -44,7 +44,7 @@ LMP_INC = -DLAMMPS_GZIP
|
|||||||
# PATH = path for MPI library
|
# PATH = path for MPI library
|
||||||
# LIB = name of MPI library
|
# LIB = name of MPI library
|
||||||
|
|
||||||
MPI_INC = -DSPECTRUM_MPI -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-7.3.1/include
|
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-7.3.1/include
|
||||||
MPI_PATH =
|
MPI_PATH =
|
||||||
MPI_LIB = -L/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-7.3.1/lib -lmpi_ibm
|
MPI_LIB = -L/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-7.3.1/lib -lmpi_ibm
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user