QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
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)
 Initialize the communications, implemented in comm_single.cpp, comm_qmp.cpp, and comm_mpi.cpp. More...
 
int comm_rank (void)
 
int comm_size (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_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)
 
void comm_abort (int status)
 

Function Documentation

◆ comm_abort()

void comm_abort ( int  status)

Definition at line 67 of file comm_single.cpp.

◆ comm_allreduce()

void comm_allreduce ( double *  data)

◆ comm_allreduce_array()

void comm_allreduce_array ( double *  data,
size_t  size 
)

Definition at line 55 of file comm_single.cpp.

Referenced by quda::plaquette(), and reduceDoubleArray().

Here is the caller graph for this function:

◆ comm_allreduce_int()

void comm_allreduce_int ( int *  data)

Definition at line 59 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)

◆ comm_allreduce_max_array()

void comm_allreduce_max_array ( double *  data,
size_t  size 
)

Definition at line 57 of file comm_single.cpp.

Referenced by quda::forceRecord().

Here is the caller graph for this function:

◆ comm_allreduce_min()

void comm_allreduce_min ( double *  data)

◆ comm_allreduce_xor()

void comm_allreduce_xor ( uint64_t *  data)

Definition at line 61 of file comm_single.cpp.

Referenced by quda::Checksum().

Here is the caller graph for this function:

◆ comm_barrier()

void comm_barrier ( void  )

◆ comm_broadcast()

void comm_broadcast ( void *  data,
size_t  nbytes 
)

broadcast from rank 0

Definition at line 63 of file comm_single.cpp.

Referenced by quda::broadcastTuneCache(), and comm_init_common().

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

Referenced by comm_declare_receive_relative_(), and exchange_sitelink_diag().

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

Referenced by comm_declare_send_relative_(), and exchange_sitelink_diag().

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

Referenced by comm_declare_strided_send_relative_().

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

References comm_hostname().

Referenced by comm_init_common().

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

◆ comm_init()

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

Initialize the communications, implemented in comm_single.cpp, comm_qmp.cpp, and comm_mpi.cpp.

Dummy communications layer for single-GPU backend.

Definition at line 10 of file comm_single.cpp.

References comm_init_common().

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 47 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)