right = ((rank+1)%size);
if (rank > 0) { /* receive message from the left */
- smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left,
+ Request::recv((void*)NULL, 0, MPI_BYTE, left,
COLL_TAG_BARRIER, comm,
MPI_STATUS_IGNORE);
}
/* Send message to the right */
- smpi_mpi_send((void*)NULL, 0, MPI_BYTE, right,
+ Request::send((void*)NULL, 0, MPI_BYTE, right,
COLL_TAG_BARRIER,
comm);
/* root needs to receive from the last node */
if (rank == 0) {
- smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left,
+ Request::recv((void*)NULL, 0, MPI_BYTE, left,
COLL_TAG_BARRIER, comm,
MPI_STATUS_IGNORE);
}
/* Allow nodes to exit */
if (rank > 0) { /* post Receive from left */
- smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left,
+ Request::recv((void*)NULL, 0, MPI_BYTE, left,
COLL_TAG_BARRIER, comm,
MPI_STATUS_IGNORE);
}
/* send message to the right one */
- smpi_mpi_send((void*)NULL, 0, MPI_BYTE, right,
+ Request::send((void*)NULL, 0, MPI_BYTE, right,
COLL_TAG_BARRIER,
comm);
/* rank 0 post receive from the last node */
if (rank == 0) {
- smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, left,
+ Request::recv((void*)NULL, 0, MPI_BYTE, left,
COLL_TAG_BARRIER, comm,
MPI_STATUS_IGNORE);
}
if (rank >= adjsize) {
/* send message to lower ranked node */
remote = rank - adjsize;
- smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, remote,
+ Request::sendrecv(NULL, 0, MPI_BYTE, remote,
COLL_TAG_BARRIER,
NULL, 0, MPI_BYTE, remote,
COLL_TAG_BARRIER,
} else if (rank < (size - adjsize)) {
/* receive message from high level rank */
- smpi_mpi_recv((void*)NULL, 0, MPI_BYTE, rank+adjsize,
+ Request::recv((void*)NULL, 0, MPI_BYTE, rank+adjsize,
COLL_TAG_BARRIER, comm,
MPI_STATUS_IGNORE);
if (remote >= adjsize) continue;
/* post receive from the remote node */
- smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, remote,
+ Request::sendrecv(NULL, 0, MPI_BYTE, remote,
COLL_TAG_BARRIER,
NULL, 0, MPI_BYTE, remote,
COLL_TAG_BARRIER,
if (rank < (size - adjsize)) {
/* send enter message to higher ranked node */
remote = rank + adjsize;
- smpi_mpi_send((void*)NULL, 0, MPI_BYTE, remote,
+ Request::send((void*)NULL, 0, MPI_BYTE, remote,
COLL_TAG_BARRIER,
comm);
to = (rank + distance) % size;
/* send message to lower ranked node */
- smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, to,
+ Request::sendrecv(NULL, 0, MPI_BYTE, to,
COLL_TAG_BARRIER,
NULL, 0, MPI_BYTE, from,
COLL_TAG_BARRIER,
"ompi_coll_tuned_barrier_ompi_two_procs rank %d", remote);
remote = (remote + 1) & 0x1;
- smpi_mpi_sendrecv(NULL, 0, MPI_BYTE, remote,
+ Request::sendrecv(NULL, 0, MPI_BYTE, remote,
COLL_TAG_BARRIER,
NULL, 0, MPI_BYTE, remote,
COLL_TAG_BARRIER,
/* All non-root send & receive zero-length message. */
if (rank > 0) {
- smpi_mpi_send (NULL, 0, MPI_BYTE, 0,
+ Request::send (NULL, 0, MPI_BYTE, 0,
COLL_TAG_BARRIER,
comm);
- smpi_mpi_recv (NULL, 0, MPI_BYTE, 0,
+ Request::recv (NULL, 0, MPI_BYTE, 0,
COLL_TAG_BARRIER,
comm, MPI_STATUS_IGNORE);
}
requests = (MPI_Request*)malloc( size * sizeof(MPI_Request) );
for (i = 1; i < size; ++i) {
- requests[i] = smpi_mpi_irecv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE,
+ requests[i] = Request::irecv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE,
COLL_TAG_BARRIER, comm
);
}
- smpi_mpi_waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
+ Request::waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
for (i = 1; i < size; ++i) {
- requests[i] = smpi_mpi_isend(NULL, 0, MPI_BYTE, i,
+ requests[i] = Request::isend(NULL, 0, MPI_BYTE, i,
COLL_TAG_BARRIER,
comm
);
}
- smpi_mpi_waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
+ Request::waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
free( requests );
}
partner = rank ^ jump;
if (!(partner & (jump-1)) && partner < size) {
if (partner > rank) {
- smpi_mpi_recv (NULL, 0, MPI_BYTE, partner,
+ Request::recv (NULL, 0, MPI_BYTE, partner,
COLL_TAG_BARRIER, comm,
MPI_STATUS_IGNORE);
} else if (partner < rank) {
- smpi_mpi_send (NULL, 0, MPI_BYTE, partner,
+ Request::send (NULL, 0, MPI_BYTE, partner,
COLL_TAG_BARRIER,
comm);
}
partner = rank ^ jump;
if (!(partner & (jump-1)) && partner < size) {
if (partner > rank) {
- smpi_mpi_send (NULL, 0, MPI_BYTE, partner,
+ Request::send (NULL, 0, MPI_BYTE, partner,
COLL_TAG_BARRIER,
comm);
} else if (partner < rank) {
- smpi_mpi_recv (NULL, 0, MPI_BYTE, partner,
+ Request::recv (NULL, 0, MPI_BYTE, partner,
COLL_TAG_BARRIER, comm,
MPI_STATUS_IGNORE);
}