Small tweaks

This commit is contained in:
Stan Moore
2020-12-23 09:22:27 -07:00
parent ddfa5c3e87
commit 37063ab61f
2 changed files with 12 additions and 11 deletions

View File

@ -548,7 +548,7 @@ available (currently only possible with OpenMPI v2.0.0 or later), then
the *cuda/aware* keyword is automatically set to *off* by default. When 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* 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 keywords are set to *device*\ , the value for these *comm* keywords will
be automatically changed to *host*\ . This setting has no effect if not be automatically changed to *no*\ . This setting has no effect if not
running on GPUs or if using only one MPI rank. CUDA-aware MPI is available 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 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 "MV2_USE_CUDA" environment variable is set to "1", CrayMPI, and IBM
@ -558,7 +558,8 @@ The *pair/only* keyword can change how the KOKKOS suffix "kk" is applied
when using an accelerator device. By default device acceleration is when using an accelerator device. By default device acceleration is
always used for all available styles. With *pair/only* set to *on* the always used for all available styles. With *pair/only* set to *on* the
suffix setting will choose device acceleration only for pair styles and suffix setting will choose device acceleration only for pair styles and
run all other force computations concurrently on the host GPU. This can run all other force computations concurrently on the host CPU.
The *comm* flags will also automatically be changed to *no*\ . This can
result in better performance for certain configurations and system sizes. result in better performance for certain configurations and system sizes.
---------- ----------

View File

@ -425,36 +425,36 @@ void KokkosLMP::accelerator(int narg, char **arg)
int nmpi = 0; int nmpi = 0;
MPI_Comm_size(world,&nmpi); MPI_Comm_size(world,&nmpi);
// if "cuda/aware off" or "pair/only on", and "comm device", change to "comm host" // if "cuda/aware off" or "pair/only on", and "comm device", change to "comm no"
if (!gpu_aware_flag && nmpi > 1 || pair_only_flag) { if ((!gpu_aware_flag && nmpi > 1) || pair_only_flag) {
if (exchange_comm_classic == 0 && exchange_comm_on_host == 0) { if (exchange_comm_classic == 0 && exchange_comm_on_host == 0) {
exchange_comm_on_host = 1; exchange_comm_classic = 1;
exchange_comm_changed = 1; exchange_comm_changed = 1;
} }
if (forward_comm_classic == 0 && forward_comm_on_host == 0) { if (forward_comm_classic == 0 && forward_comm_on_host == 0) {
forward_comm_on_host = 1; forward_comm_classic = 1;
forward_comm_changed = 1; forward_comm_changed = 1;
} }
if (reverse_comm_classic == 0 && reverse_comm_on_host == 0) { if (reverse_comm_classic == 0 && reverse_comm_on_host == 0) {
reverse_comm_on_host = 1; reverse_comm_classic = 1;
reverse_comm_changed = 1; reverse_comm_changed = 1;
} }
} }
// if "cuda/aware on" or "pair/only off" and comm flags were changed previously, change them back // if "cuda/aware on" and "pair/only off", and comm flags were changed previously, change them back
if (gpu_aware_flag && !pair_only_flag) { if (gpu_aware_flag && !pair_only_flag) {
if (exchange_comm_changed) { if (exchange_comm_changed) {
exchange_comm_on_host = 0; exchange_comm_classic = 0;
exchange_comm_changed = 0; exchange_comm_changed = 0;
} }
if (forward_comm_changed) { if (forward_comm_changed) {
forward_comm_on_host = 0; forward_comm_classic = 0;
forward_comm_changed = 0; forward_comm_changed = 0;
} }
if (reverse_comm_changed) { if (reverse_comm_changed) {
reverse_comm_on_host = 0; reverse_comm_classic = 0;
reverse_comm_changed = 0; reverse_comm_changed = 0;
} }
} }