32 assert(ipm == 1 || ipm == -1);
38 printf(
"%s: allocate channel failed.\n", __func__);
48 if (retv != MPI_SUCCESS) {
69 assert(ipm == 1 || ipm == -1);
75 printf(
"%s: allocate channel failed.\n", __func__);
85 if (retv != MPI_SUCCESS) {
132 : m_array(count), m_status(count), m_nreq(0)
144 return MPI_ERR_BUFFER;
int wait()
wait for completion
MPI_Status m_status
handler to MPI status information
int start()
collective start
int start()
start asynchronous communication
static int * m_ipe_up
rank of upward neighbour in directions.
static int * m_ipe_dn
rank of downward neighbour in directions.
container_type m_buf
buffer
int append(Channel *const p)
append channel to the set. there is no way to remove a channel.
std::vector< MPI_Request > m_array
a collection of MPI request held in channels.
Channel class for asynchronous communication.
MPI_Request m_request
handler to MPI persistent communication
unsigned int m_nreq
number of channels to hold.
int wait()
collective wait
static const int max_dimension
std::vector< MPI_Status > m_status
a collection of MPI status.
char element_type
data transfer is byte-wise.
static Channel * recv_init(int count, int idir, int ipm)
static Channel * send_init(int count, int idir, int ipm)
virtual ~Channel()
destructor
static int m_ndim
number of dimensions.
ChannelSet(int nchannel=8)
constructor. default number of channels is 8 for upward and downward in 4 dimensions.