QUDA  v0.7.0
A library for QCD on GPUs
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions
comm_mpi.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpi.h>
#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_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)
 
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_broadcast (void *data, size_t nbytes)
 
void comm_barrier (void)
 
void comm_abort (int status)
 

Macro Definition Documentation

#define MPI_CHECK (   mpi_call)
Value:
do { \
int status = mpi_call; \
if (status != MPI_SUCCESS) { \
char err_string[128]; \
int err_len; \
MPI_Error_string(status, err_string, &err_len); \
err_string[127] = '\0'; \
errorQuda("(MPI) %s", err_string); \
} \
} while (0)
#define errorQuda(...)
Definition: util_quda.h:73
if(x2 >=X2) return

Definition at line 9 of file comm_mpi.cpp.

Function Documentation

void comm_abort ( int  status)

Definition at line 246 of file comm_mpi.cpp.

void comm_allreduce ( double *  data)

Definition at line 201 of file comm_mpi.cpp.

void comm_allreduce_array ( double *  data,
size_t  size 
)

Definition at line 216 of file comm_mpi.cpp.

void comm_allreduce_int ( int *  data)

Definition at line 225 of file comm_mpi.cpp.

void comm_allreduce_max ( double *  data)

Definition at line 209 of file comm_mpi.cpp.

void comm_barrier ( void  )

Definition at line 240 of file comm_mpi.cpp.

void comm_broadcast ( void *  data,
size_t  nbytes 
)

broadcast from rank 0

Definition at line 234 of file comm_mpi.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 117 of file comm_mpi.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 101 of file comm_mpi.cpp.

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

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

void comm_free ( MsgHandle mh)

Definition at line 174 of file comm_mpi.cpp.

int comm_gpuid ( void  )

Definition at line 92 of file comm_mpi.cpp.

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

Definition at line 31 of file comm_mpi.cpp.

int comm_query ( MsgHandle mh)

Definition at line 192 of file comm_mpi.cpp.

int comm_rank ( void  )

Definition at line 80 of file comm_mpi.cpp.

int comm_size ( void  )

Definition at line 86 of file comm_mpi.cpp.

void comm_start ( MsgHandle mh)

Definition at line 180 of file comm_mpi.cpp.

void comm_wait ( MsgHandle mh)

Definition at line 186 of file comm_mpi.cpp.