QUDA  0.9.0
Functions | Variables
comm_single.cpp File Reference
#include <stdlib.h>
#include <string.h>
#include <csignal>
#include <comm_quda.h>
Include dependency graph for comm_single.cpp:

Go to the source code of this file.

Functions

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)
 
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...
 
MsgHandlecomm_declare_send_displaced (void *buffer, const int displacement[], size_t nbytes)
 
MsgHandlecomm_declare_receive_displaced (void *buffer, const int displacement[], size_t nbytes)
 
MsgHandlecomm_declare_strided_send_displaced (void *buffer, const int displacement[], size_t blksize, int nblocks, size_t stride)
 
MsgHandlecomm_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 char partition_string [16] = ",comm=0000"
 
static char topology_string [16] = ",topo=1111"
 

Function Documentation

◆ comm_abort()

void comm_abort ( int  status)

Definition at line 69 of file comm_single.cpp.

References exit().

Here is the call graph for this function:

◆ comm_allreduce()

void comm_allreduce ( double data)

◆ comm_allreduce_array()

void comm_allreduce_array ( double data,
size_t  size 
)

Definition at line 59 of file comm_single.cpp.

Referenced by reduceDoubleArray().

Here is the caller graph for this function:

◆ comm_allreduce_int()

void comm_allreduce_int ( int data)

Definition at line 61 of file comm_single.cpp.

Referenced by comm_peer2peer_enabled_global(), quda::compareSpinor(), hisq_force_test(), main(), and TEST().

Here is the caller graph for this function:

◆ comm_allreduce_max()

void comm_allreduce_max ( double data)

Definition at line 57 of file comm_single.cpp.

Referenced by reduceMaxDouble().

Here is the caller graph for this function:

◆ comm_allreduce_xor()

void comm_allreduce_xor ( uint64_t data)

Definition at line 63 of file comm_single.cpp.

◆ comm_barrier()

void comm_barrier ( void  )

Definition at line 67 of file comm_single.cpp.

Referenced by comm_gdr_blacklist(), comm_peer2peer_init(), and dslashCUDA().

Here is the caller graph for this function:

◆ comm_broadcast()

void comm_broadcast ( void *  data,
size_t  nbytes 
)

broadcast from rank 0

Definition at line 65 of file comm_single.cpp.

Referenced by quda::broadcastTuneCache().

Here is the caller graph for this function:

◆ comm_declare_receive_displaced()

MsgHandle* comm_declare_receive_displaced ( void *  buffer,
const int  displacement[],
size_t  nbytes 
)

Create a persistent message handler for a relative receive

Parameters
bufferBuffer into which message will be received
dimDimension from message will be received
dirDirection from messaged with be recived (0 - backwards, 1 forwards)
nbytesSize of message in bytes

Declare a message handle for receiving from a node displaced in (x,y,z,t) according to "displacement"

Definition at line 36 of file comm_single.cpp.

Referenced by comm_declare_receive_relative_().

Here is the caller graph for this function:

◆ comm_declare_send_displaced()

MsgHandle* comm_declare_send_displaced ( void *  buffer,
const int  displacement[],
size_t  nbytes 
)

Create a persistent message handler for a relative send

Parameters
bufferBuffer from which message will be sent
dimDimension in which message will be sent
dirDirection in which messaged with be sent (0 - backwards, 1 forwards)
nbytesSize of message in bytes

Declare a message handle for sending to a node displaced in (x,y,z,t) according to "displacement"

Definition at line 33 of file comm_single.cpp.

Referenced by comm_declare_send_relative_().

Here is the caller graph for this function:

◆ comm_declare_strided_receive_displaced()

MsgHandle* comm_declare_strided_receive_displaced ( void *  buffer,
const int  displacement[],
size_t  blksize,
int  nblocks,
size_t  stride 
)

Create a persistent strided message handler for a displaced receive

Parameters
bufferBuffer into which message will be received
displacementArray of offsets specifying the relative node from which we are receiving
blksizeSize of block in bytes
nblocksNumber of blocks
strideStride between blocks in bytes

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 43 of file comm_single.cpp.

Referenced by comm_declare_strided_receive_relative_().

Here is the caller graph for this function:

◆ comm_declare_strided_send_displaced()

MsgHandle* comm_declare_strided_send_displaced ( void *  buffer,
const int  displacement[],
size_t  blksize,
int  nblocks,
size_t  stride 
)

Create a persistent strided message handler for a displaced send

Parameters
bufferBuffer from which message will be sent
displacementArray of offsets specifying the relative node to which we are sending
blksizeSize of block in bytes
nblocksNumber of blocks
strideStride between blocks in bytes

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 39 of file comm_single.cpp.

Referenced by comm_declare_strided_send_relative_().

Here is the caller graph for this function:

◆ comm_dim_partitioned_string()

const char* comm_dim_partitioned_string ( )

◆ comm_dim_topology_string()

const char* comm_dim_topology_string ( )

Return a string that defines the comm topology (for use as a tuneKey)

Returns
String specifying comm topology

Definition at line 80 of file comm_single.cpp.

References topology_string.

Referenced by anonymous_namespace{dslash_policy.cuh}::DslashPolicyTune::tuneKey().

Here is the caller graph for this function:

◆ comm_free()

void comm_free ( MsgHandle mh)

◆ comm_gather_gpuid()

void comm_gather_gpuid ( int gpuid_recv_buf)

Gather all GPU ids.

Parameters
[out]gpuid_recv_bufint array of length comm_size() that will be filled in GPU ids for all processes (in rank order).

Definition at line 29 of file comm_single.cpp.

References comm_gpuid().

Referenced by comm_peer2peer_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comm_gather_hostname()

void comm_gather_hostname ( char *  hostname_recv_buf)

Gather all hostnames.

Parameters
[out]hostname_recv_bufchar 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 25 of file comm_single.cpp.

References comm_hostname(), and strncpy().

Here is the call graph for this function:

◆ comm_gpuid()

int comm_gpuid ( void  )

◆ comm_init()

void comm_init ( int  ndim,
const int dims,
QudaCommsMap  rank_from_coords,
void *  map_data 
)

Definition at line 13 of file comm_single.cpp.

References comm_create_topology(), comm_set_default_topology(), and ndim.

Referenced by initCommsGridQuda().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comm_query()

int comm_query ( MsgHandle mh)

Definition at line 53 of file comm_single.cpp.

Referenced by quda::cudaColorSpinorField::commsQuery().

Here is the caller graph for this function:

◆ comm_rank()

int comm_rank ( void  )

◆ comm_size()

int comm_size ( void  )

◆ comm_start()

void comm_start ( MsgHandle mh)

◆ comm_wait()

void comm_wait ( MsgHandle mh)

Variable Documentation

◆ partition_string

char partition_string[16] = ",comm=0000"
static

Dummy communications layer for single-GPU backend.

Definition at line 10 of file comm_single.cpp.

Referenced by comm_dim_partitioned_string().

◆ topology_string

char topology_string[16] = ",topo=1111"
static

Definition at line 11 of file comm_single.cpp.

Referenced by comm_dim_topology_string().