forked from lijiext/lammps
Don't change comm flags when there is only 1 MPI rank
This commit is contained in:
parent
1b9214c3e9
commit
fba97b94cb
|
@ -547,10 +547,10 @@ the *cuda/aware* keyword is automatically set to *off* by default. When
|
|||
the *cuda/aware* keyword is set to *off* while any of the *comm*
|
||||
keywords are set to *device*\ , the value for these *comm* keywords will
|
||||
be automatically changed to *host*\ . This setting has no effect if not
|
||||
running on GPUs. CUDA-aware MPI is available for OpenMPI 1.8 (or later
|
||||
versions), Mvapich2 1.9 (or later) when the "MV2\_USE\_CUDA" environment
|
||||
variable is set to "1", CrayMPI, and IBM Spectrum MPI when the "-gpu"
|
||||
flag is used.
|
||||
running on GPUs or if using only one MPI rank. CUDA-aware MPI is available
|
||||
for OpenMPI 1.8 (or later versions), Mvapich2 1.9 (or later) when the
|
||||
"MV2\_USE\_CUDA" environment variable is set to "1", CrayMPI, and IBM
|
||||
Spectrum MPI when the "-gpu" flag is used.
|
||||
|
||||
|
||||
----------
|
||||
|
|
|
@ -399,9 +399,12 @@ void KokkosLMP::accelerator(int narg, char **arg)
|
|||
|
||||
#ifdef KOKKOS_ENABLE_CUDA
|
||||
|
||||
int nmpi = 0;
|
||||
MPI_Comm_size(world,&nmpi);
|
||||
|
||||
// if "cuda/aware off" and "comm device", change to "comm host"
|
||||
|
||||
if (!cuda_aware_flag) {
|
||||
if (!cuda_aware_flag && nmpi > 1) {
|
||||
if (exchange_comm_classic == 0 && exchange_comm_on_host == 0) {
|
||||
exchange_comm_on_host = 1;
|
||||
exchange_comm_changed = 1;
|
||||
|
|
Loading…
Reference in New Issue