|
QUDA
0.9.0
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <mpi.h>#include <csignal>#include <quda_internal.h>#include <comm_quda.h>
Go to the source code of this file.
Classes | |
| struct | MsgHandle_s |
Macros | |
| #define | MPI_CHECK(mpi_call) |
Functions | |
| void | comm_gather_hostname (char *hostname_recv_buf) |
| Gather all hostnames. More... | |
| void | comm_gather_gpuid (int *gpuid_recv_buf) |
| Gather all GPU ids. More... | |
| 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_gpuid (void) |
| static void | check_displacement (const int displacement[], int ndim) |
| 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) |
| void | comm_allreduce (double *data) |
| void | comm_allreduce_max (double *data) |
| void | comm_allreduce_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) |
| void | comm_abort (int status) |
| const char * | comm_dim_partitioned_string () |
| Return a string that defines the comm partitioning (used as a tuneKey) More... | |
| const char * | comm_dim_topology_string () |
| Return a string that defines the comm topology (for use as a tuneKey) More... | |
Variables | |
| static int | rank = -1 |
| static int | size = -1 |
| static int | gpuid = -1 |
| static char | partition_string [16] |
| static char | topology_string [16] |
| static const int | max_displacement = 4 |
| #define MPI_CHECK | ( | mpi_call | ) |
Definition at line 10 of file comm_mpi.cpp.
Referenced by comm_allreduce(), comm_allreduce_array(), comm_allreduce_int(), comm_allreduce_max(), comm_allreduce_xor(), comm_barrier(), comm_broadcast(), comm_declare_receive_displaced(), comm_declare_send_displaced(), comm_declare_strided_receive_displaced(), comm_declare_strided_send_displaced(), comm_free(), comm_gather_gpuid(), comm_gather_hostname(), comm_init(), comm_query(), comm_start(), and comm_wait().
Definition at line 140 of file comm_mpi.cpp.
References abs(), errorQuda, fused_exterior_ndeg_tm_dslash_cuda_gen::i, max_displacement, and ndim.
Referenced by comm_declare_receive_displaced(), comm_declare_send_displaced(), comm_declare_strided_receive_displaced(), and comm_declare_strided_send_displaced().


| void comm_abort | ( | int | status | ) |
Definition at line 334 of file comm_mpi.cpp.
| void comm_allreduce | ( | double * | data | ) |
Definition at line 281 of file comm_mpi.cpp.
References MPI_Allreduce(), and MPI_CHECK.

Definition at line 296 of file comm_mpi.cpp.
References memcpy(), MPI_Allreduce(), MPI_CHECK, and size.

| void comm_allreduce_int | ( | int * | data | ) |
Definition at line 305 of file comm_mpi.cpp.
References MPI_Allreduce(), and MPI_CHECK.

| void comm_allreduce_max | ( | double * | data | ) |
Definition at line 289 of file comm_mpi.cpp.
References MPI_Allreduce(), and MPI_CHECK.

| void comm_allreduce_xor | ( | uint64_t * | data | ) |
Definition at line 312 of file comm_mpi.cpp.
References errorQuda, MPI_Allreduce(), and MPI_CHECK.

| void comm_barrier | ( | void | ) |
Definition at line 328 of file comm_mpi.cpp.
References MPI_Barrier(), and MPI_CHECK.

| void comm_broadcast | ( | void * | data, |
| size_t | nbytes | ||
| ) |
broadcast from rank 0
Definition at line 322 of file comm_mpi.cpp.
References MPI_Bcast(), and MPI_CHECK.

| MsgHandle* 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 174 of file comm_mpi.cpp.
References check_displacement(), comm_default_topology(), comm_ndim(), comm_rank_displaced(), MsgHandle_s::custom, fused_exterior_ndeg_tm_dslash_cuda_gen::i, max_displacement, MPI_CHECK, MPI_Recv_init(), ndim, pow(), rank, MsgHandle_s::request, and safe_malloc.

Declare a message handle for sending to a node displaced in (x,y,z,t) according to "displacement"
Definition at line 151 of file comm_mpi.cpp.
References check_displacement(), comm_default_topology(), comm_ndim(), comm_rank_displaced(), MsgHandle_s::custom, fused_exterior_ndeg_tm_dslash_cuda_gen::i, max_displacement, MPI_CHECK, MPI_Send_init(), ndim, pow(), rank, MsgHandle_s::request, and safe_malloc.

| MsgHandle* 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"
Definition at line 226 of file comm_mpi.cpp.
References check_displacement(), comm_default_topology(), comm_ndim(), comm_rank_displaced(), MsgHandle_s::custom, MsgHandle_s::datatype, fused_exterior_ndeg_tm_dslash_cuda_gen::i, max_displacement, MPI_CHECK, MPI_Recv_init(), ndim, pow(), rank, MsgHandle_s::request, and safe_malloc.

| MsgHandle* 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"
Definition at line 197 of file comm_mpi.cpp.
References check_displacement(), comm_default_topology(), comm_ndim(), comm_rank_displaced(), MsgHandle_s::custom, MsgHandle_s::datatype, fused_exterior_ndeg_tm_dslash_cuda_gen::i, max_displacement, MPI_CHECK, MPI_Send_init(), ndim, pow(), rank, MsgHandle_s::request, and safe_malloc.

| const char* comm_dim_partitioned_string | ( | ) |
Return a string that defines the comm partitioning (used as a tuneKey)
Definition at line 342 of file comm_mpi.cpp.
References partition_string.
| const char* comm_dim_topology_string | ( | ) |
Return a string that defines the comm topology (for use as a tuneKey)
Definition at line 346 of file comm_mpi.cpp.
References topology_string.
| void comm_free | ( | MsgHandle * | mh | ) |
Definition at line 252 of file comm_mpi.cpp.
References MsgHandle_s::custom, MsgHandle_s::datatype, host_free, MPI_CHECK, and MsgHandle_s::request.
| void comm_gather_gpuid | ( | int * | gpuid_recv_buf | ) |
Gather all GPU ids.
| [out] | gpuid_recv_buf | int array of length comm_size() that will be filled in GPU ids for all processes (in rank order). |
Definition at line 56 of file comm_mpi.cpp.
References gpuid, MPI_Allgather(), and MPI_CHECK.

| void comm_gather_hostname | ( | char * | hostname_recv_buf | ) |
Gather all hostnames.
| [out] | hostname_recv_buf | char array of length 128*comm_size() that will be filled in GPU ids for all processes. Each hostname is in rank order, with 128 bytes for each. |
Definition at line 50 of file comm_mpi.cpp.
References comm_hostname(), MPI_Allgather(), and MPI_CHECK.
Referenced by comm_init().


| int comm_gpuid | ( | void | ) |
Definition at line 132 of file comm_mpi.cpp.
References gpuid.
| void comm_init | ( | int | ndim, |
| const int * | dims, | ||
| QudaCommsMap | rank_from_coords, | ||
| void * | map_data | ||
| ) |
Definition at line 61 of file comm_mpi.cpp.
References comm_create_topology(), comm_dim(), comm_dim_partitioned(), comm_gather_hostname(), comm_hostname(), comm_peer2peer_init(), comm_rank(), comm_set_default_topology(), errorQuda, getenv(), gpuid, host_free, fused_exterior_ndeg_tm_dslash_cuda_gen::i, initialized, MPI_CHECK, ndim, partition_string, printf(), rank, safe_malloc, size, snprintf(), strcmp(), strncmp(), and topology_string.

Definition at line 272 of file comm_mpi.cpp.
References MPI_CHECK, MPI_Test(), and MsgHandle_s::request.

| int comm_rank | ( | void | ) |
Definition at line 120 of file comm_mpi.cpp.
References rank.
Referenced by comm_init().

| int comm_size | ( | void | ) |
Definition at line 126 of file comm_mpi.cpp.
References size.
| void comm_start | ( | MsgHandle * | mh | ) |
Definition at line 260 of file comm_mpi.cpp.
References MPI_CHECK, MPI_Start(), and MsgHandle_s::request.

| void comm_wait | ( | MsgHandle * | mh | ) |
Definition at line 266 of file comm_mpi.cpp.
References MPI_CHECK, MPI_Wait(), and MsgHandle_s::request.

|
static |
Definition at line 44 of file comm_mpi.cpp.
Referenced by comm_gather_gpuid(), comm_gpuid(), comm_init(), and comm_peer2peer_init().
|
static |
Definition at line 138 of file comm_mpi.cpp.
Referenced by check_displacement(), comm_declare_receive_displaced(), comm_declare_send_displaced(), comm_declare_strided_receive_displaced(), and comm_declare_strided_send_displaced().
|
static |
Definition at line 46 of file comm_mpi.cpp.
Referenced by comm_dim_partitioned_string(), and comm_init().
|
static |
Definition at line 42 of file comm_mpi.cpp.
Referenced by comm_coords_from_rank(), comm_create_topology(), comm_declare_receive_displaced(), comm_declare_send_displaced(), comm_declare_strided_receive_displaced(), comm_declare_strided_send_displaced(), comm_init(), comm_rank(), initRand(), lex_rank_from_coords(), lex_rank_from_coords_t(), lex_rank_from_coords_x(), MPI_Init(), and vfill_m().
|
static |
Definition at line 43 of file comm_mpi.cpp.
Referenced by comm_allreduce_array(), comm_init(), and comm_size().
|
static |
Definition at line 47 of file comm_mpi.cpp.
Referenced by comm_dim_topology_string(), and comm_init().
1.8.14