QUDA  v0.5.0
A library for QCD on GPUs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Typedefs | Functions
comm_quda.h File Reference

Go to the source code of this file.

Typedefs

typedef struct MsgHandle_s MsgHandle
 
typedef struct Topology_s Topology
 
typedef int(* QudaCommsMap )(const int *coords, void *fdata)
 

Functions

char * comm_hostname (void)
 
double comm_drand (void)
 
Topologycomm_create_topology (int ndim, const int *dims, QudaCommsMap rank_from_coords, void *map_data)
 
void comm_destroy_topology (Topology *topo)
 
int comm_ndim (const Topology *topo)
 
const int * comm_dims (const Topology *topo)
 
const int * comm_coords (const Topology *topo)
 
const int * comm_coords_from_rank (const Topology *topo, int rank)
 
int comm_rank_from_coords (const Topology *topo, const int *coords)
 
int comm_rank_displaced (const Topology *topo, const int displacement[])
 
void comm_set_default_topology (Topology *topo)
 
Topologycomm_default_topology (void)
 
int comm_dim (int dim)
 
int comm_coord (int dim)
 
MsgHandlecomm_declare_send_relative (void *buffer, int dim, int dir, size_t nbytes)
 
MsgHandlecomm_declare_receive_relative (void *buffer, int dim, int dir, size_t nbytes)
 
void comm_finalize (void)
 
void comm_dim_partitioned_set (int dim)
 
int comm_dim_partitioned (int dim)
 
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)
 
MsgHandlecomm_declare_send_displaced (void *buffer, const int displacement[], size_t nbytes)
 
MsgHandlecomm_declare_receive_displaced (void *buffer, const int displacement[], size_t nbytes)
 
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_broadcast (void *data, size_t nbytes)
 
void comm_barrier (void)
 
void comm_abort (int status)
 

Typedef Documentation

typedef struct MsgHandle_s MsgHandle

Definition at line 8 of file comm_quda.h.

typedef int(* QudaCommsMap)(const int *coords, void *fdata)

Definition at line 12 of file comm_quda.h.

typedef struct Topology_s Topology

Definition at line 9 of file comm_quda.h.

Function Documentation

void comm_abort ( int  status)

Definition at line 204 of file comm_mpi.cpp.

void comm_allreduce ( double *  data)

Definition at line 159 of file comm_mpi.cpp.

void comm_allreduce_array ( double *  data,
size_t  size 
)

Definition at line 175 of file comm_mpi.cpp.

void comm_allreduce_int ( int *  data)

Definition at line 183 of file comm_mpi.cpp.

void comm_allreduce_max ( double *  data)

Definition at line 167 of file comm_mpi.cpp.

void comm_barrier ( void  )

Definition at line 198 of file comm_mpi.cpp.

void comm_broadcast ( void *  data,
size_t  nbytes 
)

broadcast from rank 0

Definition at line 192 of file comm_mpi.cpp.

int comm_coord ( int  dim)

Definition at line 219 of file comm_common.cpp.

const int* comm_coords ( const Topology topo)

Definition at line 158 of file comm_common.cpp.

const int* comm_coords_from_rank ( const Topology topo,
int  rank 
)

Definition at line 164 of file comm_common.cpp.

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

Definition at line 93 of file comm_common.cpp.

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 119 of file comm_mpi.cpp.

MsgHandle* comm_declare_receive_relative ( void *  buffer,
int  dim,
int  dir,
size_t  nbytes 
)

Receive from the "dir" direction in the "dim" dimension

Definition at line 241 of file comm_common.cpp.

MsgHandle* 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 103 of file comm_mpi.cpp.

MsgHandle* comm_declare_send_relative ( void *  buffer,
int  dim,
int  dir,
size_t  nbytes 
)

Send to the "dir" direction in the "dim" dimension

Definition at line 229 of file comm_common.cpp.

Topology* comm_default_topology ( void  )

Definition at line 203 of file comm_common.cpp.

void comm_destroy_topology ( Topology topo)

Definition at line 138 of file comm_common.cpp.

int comm_dim ( int  dim)

Definition at line 212 of file comm_common.cpp.

int comm_dim_partitioned ( int  dim)

Definition at line 266 of file comm_common.cpp.

void comm_dim_partitioned_set ( int  dim)

Definition at line 260 of file comm_common.cpp.

const int* comm_dims ( const Topology topo)

Definition at line 152 of file comm_common.cpp.

double comm_drand ( void  )

We provide our own random number generator to avoid re-seeding rand(), which might also be used by the calling application. This is a clone of rand48(), provided by stdlib.h on UNIX.

Returns
a random double in the interval [0,1)

Definition at line 81 of file comm_common.cpp.

void comm_finalize ( void  )

Definition at line 250 of file comm_common.cpp.

void comm_free ( MsgHandle mh)

Definition at line 132 of file comm_mpi.cpp.

int comm_gpuid ( void  )

Definition at line 94 of file comm_mpi.cpp.

char* comm_hostname ( void  )

Definition at line 57 of file comm_common.cpp.

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

Dummy communications layer for single-GPU backend.

Definition at line 32 of file comm_mpi.cpp.

int comm_ndim ( const Topology topo)

Definition at line 146 of file comm_common.cpp.

int comm_query ( MsgHandle mh)

Definition at line 150 of file comm_mpi.cpp.

int comm_rank ( void  )

Definition at line 82 of file comm_mpi.cpp.

int comm_rank_displaced ( const Topology topo,
const int  displacement[] 
)

Definition at line 181 of file comm_common.cpp.

int comm_rank_from_coords ( const Topology topo,
const int *  coords 
)

Definition at line 170 of file comm_common.cpp.

void comm_set_default_topology ( Topology topo)

Definition at line 197 of file comm_common.cpp.

int comm_size ( void  )

Definition at line 88 of file comm_mpi.cpp.

void comm_start ( MsgHandle mh)

Definition at line 138 of file comm_mpi.cpp.

void comm_wait ( MsgHandle mh)

Definition at line 144 of file comm_mpi.cpp.