Small tweaks
This commit is contained in:
@ -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.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user