Commit fba97b94 authored by Stan Moore's avatar Stan Moore
Browse files

Don't change comm flags when there is only 1 MPI rank

parent 1b9214c3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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.


----------
+4 −1
Original line number Diff line number Diff line
@@ -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;