QUDA
v1.1.0
A library for QCD on GPUs
|
#include <communicator_quda.h>
Public Member Functions | |
void | comm_peer2peer_init (const char *hostname_recv_buf) |
bool | comm_peer2peer_present () |
bool | comm_peer2peer_enabled (int dir, int dim) |
int | comm_peer2peer_enabled_global () |
void | comm_enable_peer2peer (bool enable) |
bool | comm_intranode_enabled (int dir, int dim) |
void | comm_enable_intranode (bool enable) |
void | comm_set_default_topology (Topology *topo) |
Topology * | comm_default_topology (void) |
void | comm_set_neighbor_ranks (Topology *topo=nullptr) |
int | comm_neighbor_rank (int dir, int dim) |
int | comm_dim (int dim) |
int | comm_coord (int dim) |
void | comm_finalize (void) |
void | comm_dim_partitioned_set (int dim) |
void | comm_dim_partitioned_reset () |
int | comm_dim_partitioned (int) |
int | comm_partitioned () |
bool | comm_gdr_enabled () |
bool | comm_gdr_blacklist () |
bool | comm_nvshmem_enabled () |
void | comm_init_common (int ndim, const int *dims, QudaCommsMap rank_from_coords, void *map_data) |
const char * | comm_config_string () |
const char * | comm_dim_partitioned_string (const int *comm_dim_override) |
const char * | comm_dim_topology_string () |
bool | comm_deterministic_reduce () |
void | reduceMaxDouble (double &max) |
void | reduceDouble (double &sum) |
void | reduceDoubleArray (double *sum, const int len) |
int | commDim (int dir) |
int | commCoords (int dir) |
int | commDimPartitioned (int dir) |
void | commDimPartitionedSet (int dir) |
void | commDimPartitionedReset () |
bool | commGlobalReduction () |
void | commGlobalReductionSet (bool global_reduction) |
bool | commAsyncReduction () |
void | commAsyncReductionSet (bool async_reduction) |
Communicator () | |
Communicator (Communicator &other, const int *comm_split) | |
Communicator (int nDim, const int *commDims, QudaCommsMap rank_from_coords, void *map_data, bool user_set_comm_handle=false, void *user_comm=nullptr) | |
~Communicator () | |
void | comm_gather_hostname (char *hostname_recv_buf) |
void | comm_gather_gpuid (int *gpuid_recv_buf) |
void | comm_init (int ndim, const int *dims, QudaCommsMap rank_from_coords, void *map_data) |
int | comm_rank (void) |
int | comm_size (void) |
int | comm_rank_from_coords (const int *coords) |
MsgHandle * | comm_declare_send_rank (void *buffer, int rank, int tag, size_t nbytes) |
MsgHandle * | comm_declare_recv_rank (void *buffer, int rank, int tag, size_t nbytes) |
MsgHandle * | comm_declare_send_displaced (void *buffer, const int displacement[], size_t nbytes) |
MsgHandle * | comm_declare_receive_displaced (void *buffer, const int displacement[], size_t nbytes) |
MsgHandle * | comm_declare_strided_send_displaced (void *buffer, const int displacement[], size_t blksize, int nblocks, size_t stride) |
MsgHandle * | comm_declare_strided_receive_displaced (void *buffer, const int displacement[], size_t blksize, int nblocks, size_t stride) |
void | comm_free (MsgHandle *&mh) |
void | comm_start (MsgHandle *mh) |
void | comm_wait (MsgHandle *mh) |
int | comm_query (MsgHandle *mh) |
template<typename T > | |
T | deterministic_reduce (T *array, int n) |
void | comm_allreduce (double *data) |
void | comm_allreduce_max (double *data) |
void | comm_allreduce_min (double *data) |
void | comm_allreduce_array (double *data, size_t size) |
void | comm_allreduce_max_array (double *data, size_t size) |
void | comm_allreduce_int (int *data) |
void | comm_allreduce_xor (uint64_t *data) |
void | comm_broadcast (void *data, size_t nbytes) |
void | comm_barrier (void) |
Static Public Member Functions | |
static int | comm_gpuid () |
static void | comm_abort_ (int status) |
static int | comm_rank_global () |
Public Attributes | |
bool | user_set_comm_handle |
bool | peer2peer_enabled [2][4] = {{false, false, false, false}, {false, false, false, false}} |
bool | peer2peer_init = false |
bool | intranode_enabled [2][4] = {{false, false, false, false}, {false, false, false, false}} |
bool | peer2peer_present = false |
int | enable_peer_to_peer = 3 |
int | enable_p2p_max_access_rank = std::numeric_limits<int>::max() |
bool | enable_p2p = true |
bool | init = false |
bool | p2p_global = false |
bool | enable_intranode = true |
Topology * | default_topo = nullptr |
int | neighbor_rank [2][4] = {{-1, -1, -1, -1}, {-1, -1, -1, -1}} |
bool | neighbors_cached = false |
char | partition_string [16] |
char | topology_string [128] |
char | partition_override_string [16] |
int | manual_set_partition [QUDA_MAX_DIM] = {0} |
bool | gdr_enabled = false |
bool | blacklist = false |
bool | blacklist_init = false |
bool | use_deterministic_reduce = false |
char | config_string [64] |
bool | config_init = false |
bool | globalReduce = true |
bool | asyncReduce = false |
int | rank = -1 |
int | size = -1 |
Static Public Attributes | |
static int | gpuid = -1 |
Definition at line 163 of file communicator_quda.h.
|
inline |
Definition at line 709 of file communicator_quda.h.
Communicator::Communicator | ( | Communicator & | other, |
const int * | comm_split | ||
) |
Definition at line 54 of file communicator_mpi.cpp.
Communicator::Communicator | ( | int | nDim, |
const int * | commDims, | ||
QudaCommsMap | rank_from_coords, | ||
void * | map_data, | ||
bool | user_set_comm_handle = false , |
||
void * | user_comm = nullptr |
||
) |
Dummy communications layer for single-GPU backend.
Definition at line 35 of file communicator_mpi.cpp.
Communicator::~Communicator | ( | ) |
Definition at line 83 of file communicator_mpi.cpp.
|
static |
Definition at line 355 of file communicator_mpi.cpp.
void Communicator::comm_allreduce | ( | double * | data | ) |
Definition at line 271 of file communicator_mpi.cpp.
void Communicator::comm_allreduce_array | ( | double * | data, |
size_t | size | ||
) |
Definition at line 300 of file communicator_mpi.cpp.
void Communicator::comm_allreduce_int | ( | int * | data | ) |
Definition at line 332 of file communicator_mpi.cpp.
void Communicator::comm_allreduce_max | ( | double * | data | ) |
Definition at line 286 of file communicator_mpi.cpp.
void Communicator::comm_allreduce_max_array | ( | double * | data, |
size_t | size | ||
) |
Definition at line 324 of file communicator_mpi.cpp.
void Communicator::comm_allreduce_min | ( | double * | data | ) |
Definition at line 293 of file communicator_mpi.cpp.
void Communicator::comm_allreduce_xor | ( | uint64_t * | data | ) |
Definition at line 339 of file communicator_mpi.cpp.
void Communicator::comm_barrier | ( | void | ) |
Definition at line 353 of file communicator_mpi.cpp.
void Communicator::comm_broadcast | ( | void * | data, |
size_t | nbytes | ||
) |
broadcast from rank 0
Definition at line 348 of file communicator_mpi.cpp.
|
inline |
Definition at line 621 of file communicator_quda.h.
|
inline |
Definition at line 424 of file communicator_quda.h.
MsgHandle * Communicator::comm_declare_receive_displaced | ( | void * | buffer, |
const int | displacement[], | ||
size_t | nbytes | ||
) |
Declare a message handle for receiving from a node displaced in (x,y,z,t) according to "displacement"
Definition at line 176 of file communicator_mpi.cpp.
MsgHandle * Communicator::comm_declare_recv_rank | ( | void * | buffer, |
int | rank, | ||
int | tag, | ||
size_t | nbytes | ||
) |
Declare a message handle for receiving nbytes
from the rank
with tag
.
Definition at line 142 of file communicator_mpi.cpp.
MsgHandle * Communicator::comm_declare_send_displaced | ( | void * | buffer, |
const int | displacement[], | ||
size_t | nbytes | ||
) |
Declare a message handle for sending to a node displaced in (x,y,z,t) according to "displacement"
Definition at line 154 of file communicator_mpi.cpp.
MsgHandle * Communicator::comm_declare_send_rank | ( | void * | buffer, |
int | rank, | ||
int | tag, | ||
size_t | nbytes | ||
) |
Declare a message handle for sending nbytes
to the rank
with tag
.
Definition at line 130 of file communicator_mpi.cpp.
MsgHandle * Communicator::comm_declare_strided_receive_displaced | ( | void * | buffer, |
const int | displacement[], | ||
size_t | blksize, | ||
int | nblocks, | ||
size_t | stride | ||
) |
Declare a message handle for receiving from a node displaced in (x,y,z,t) according to "displacement"
Declare a message handle for strided receiving from a node displaced in (x,y,z,t) according to "displacement"
Definition at line 226 of file communicator_mpi.cpp.
MsgHandle * Communicator::comm_declare_strided_send_displaced | ( | void * | buffer, |
const int | displacement[], | ||
size_t | blksize, | ||
int | nblocks, | ||
size_t | stride | ||
) |
Declare a message handle for sending to a node displaced in (x,y,z,t) according to "displacement"
Declare a message handle for strided sending to a node displaced in (x,y,z,t) according to "displacement"
Definition at line 198 of file communicator_mpi.cpp.
|
inline |
Definition at line 383 of file communicator_quda.h.
|
inline |
Definition at line 657 of file communicator_quda.h.
|
inline |
Definition at line 418 of file communicator_quda.h.
|
inline |
Definition at line 464 of file communicator_quda.h.
|
inline |
Definition at line 453 of file communicator_quda.h.
|
inline |
Definition at line 443 of file communicator_quda.h.
|
inline |
Definition at line 640 of file communicator_quda.h.
|
inline |
Definition at line 655 of file communicator_quda.h.
|
inline |
Definition at line 377 of file communicator_quda.h.
|
inline |
Definition at line 371 of file communicator_quda.h.
|
inline |
Definition at line 430 of file communicator_quda.h.
void Communicator::comm_free | ( | MsgHandle *& | mh | ) |
Definition at line 251 of file communicator_mpi.cpp.
void Communicator::comm_gather_gpuid | ( | int * | gpuid_recv_buf | ) |
Definition at line 96 of file communicator_mpi.cpp.
void Communicator::comm_gather_hostname | ( | char * | hostname_recv_buf | ) |
Definition at line 89 of file communicator_mpi.cpp.
|
inline |
Definition at line 496 of file communicator_quda.h.
|
inline |
Definition at line 480 of file communicator_quda.h.
|
inlinestatic |
Definition at line 169 of file communicator_quda.h.
void Communicator::comm_init | ( | int | ndim, |
const int * | dims, | ||
QudaCommsMap | rank_from_coords, | ||
void * | map_data | ||
) |
Definition at line 102 of file communicator_mpi.cpp.
|
inline |
Definition at line 546 of file communicator_quda.h.
|
inline |
Definition at line 375 of file communicator_quda.h.
|
inline |
Definition at line 412 of file communicator_quda.h.
|
inline |
Definition at line 527 of file communicator_quda.h.
|
inline |
Definition at line 467 of file communicator_quda.h.
|
inline |
Definition at line 349 of file communicator_quda.h.
|
inline |
Definition at line 354 of file communicator_quda.h.
|
inline |
Definition at line 191 of file communicator_quda.h.
|
inline |
Definition at line 345 of file communicator_quda.h.
int Communicator::comm_query | ( | MsgHandle * | mh | ) |
Definition at line 263 of file communicator_mpi.cpp.
int Communicator::comm_rank | ( | void | ) |
Definition at line 123 of file communicator_mpi.cpp.
|
inline |
Definition at line 728 of file communicator_quda.h.
|
static |
Definition at line 357 of file communicator_mpi.cpp.
|
inline |
Definition at line 381 of file communicator_quda.h.
|
inline |
Definition at line 393 of file communicator_quda.h.
int Communicator::comm_size | ( | void | ) |
Definition at line 125 of file communicator_mpi.cpp.
void Communicator::comm_start | ( | MsgHandle * | mh | ) |
Definition at line 259 of file communicator_mpi.cpp.
void Communicator::comm_wait | ( | MsgHandle * | mh | ) |
Definition at line 261 of file communicator_mpi.cpp.
|
inline |
Definition at line 688 of file communicator_quda.h.
|
inline |
Definition at line 690 of file communicator_quda.h.
|
inline |
Definition at line 676 of file communicator_quda.h.
|
inline |
Definition at line 674 of file communicator_quda.h.
|
inline |
Definition at line 678 of file communicator_quda.h.
|
inline |
Definition at line 682 of file communicator_quda.h.
|
inline |
Definition at line 680 of file communicator_quda.h.
|
inline |
Definition at line 684 of file communicator_quda.h.
|
inline |
Definition at line 686 of file communicator_quda.h.
|
inline |
Definition at line 774 of file communicator_quda.h.
|
inline |
Definition at line 664 of file communicator_quda.h.
|
inline |
Definition at line 669 of file communicator_quda.h.
|
inline |
Definition at line 662 of file communicator_quda.h.
bool Communicator::asyncReduce = false |
Definition at line 660 of file communicator_quda.h.
bool Communicator::blacklist = false |
Definition at line 493 of file communicator_quda.h.
bool Communicator::blacklist_init = false |
Definition at line 494 of file communicator_quda.h.
bool Communicator::config_init = false |
Definition at line 619 of file communicator_quda.h.
char Communicator::config_string[64] |
Definition at line 618 of file communicator_quda.h.
Topology* Communicator::default_topo = nullptr |
Definition at line 379 of file communicator_quda.h.
bool Communicator::enable_intranode = true |
Definition at line 373 of file communicator_quda.h.
bool Communicator::enable_p2p = true |
Definition at line 347 of file communicator_quda.h.
int Communicator::enable_p2p_max_access_rank = std::numeric_limits<int>::max() |
sets whether we cap which peers can use peer-to-peer
Definition at line 189 of file communicator_quda.h.
int Communicator::enable_peer_to_peer = 3 |
by default enable both copy engines and load/store access
Definition at line 186 of file communicator_quda.h.
bool Communicator::gdr_enabled = false |
Definition at line 474 of file communicator_quda.h.
bool Communicator::globalReduce = true |
Definition at line 659 of file communicator_quda.h.
|
static |
The gpuid is static, and it's set when the default communicator is initialized.
Definition at line 168 of file communicator_quda.h.
bool Communicator::init = false |
Definition at line 351 of file communicator_quda.h.
bool Communicator::intranode_enabled[2][4] = {{false, false, false, false}, {false, false, false, false}} |
Definition at line 179 of file communicator_quda.h.
int Communicator::manual_set_partition[QUDA_MAX_DIM] = {0} |
string that contains any overridden partitioning
Definition at line 441 of file communicator_quda.h.
int Communicator::neighbor_rank[2][4] = {{-1, -1, -1, -1}, {-1, -1, -1, -1}} |
Definition at line 389 of file communicator_quda.h.
bool Communicator::neighbors_cached = false |
Definition at line 391 of file communicator_quda.h.
bool Communicator::p2p_global = false |
Definition at line 352 of file communicator_quda.h.
char Communicator::partition_override_string[16] |
string that contains the job topology
Definition at line 439 of file communicator_quda.h.
char Communicator::partition_string[16] |
Definition at line 437 of file communicator_quda.h.
bool Communicator::peer2peer_enabled[2][4] = {{false, false, false, false}, {false, false, false, false}} |
Definition at line 176 of file communicator_quda.h.
bool Communicator::peer2peer_init = false |
Definition at line 177 of file communicator_quda.h.
bool Communicator::peer2peer_present = false |
this records whether there is any peer-2-peer capability (regardless whether it is enabled or not)
Definition at line 183 of file communicator_quda.h.
int Communicator::rank = -1 |
Definition at line 706 of file communicator_quda.h.
int Communicator::size = -1 |
Definition at line 707 of file communicator_quda.h.
char Communicator::topology_string[128] |
string that contains the job partitioning
Definition at line 438 of file communicator_quda.h.
bool Communicator::use_deterministic_reduce = false |
Definition at line 544 of file communicator_quda.h.
bool Communicator::user_set_comm_handle |
Whether or not the MPI_COMM_HANDLE is created by user, in which case we should not free it.
Definition at line 174 of file communicator_quda.h.