} else if (NULL == rank) {
retval = MPI_ERR_ARG;
} else {
- *rank = smpi_mpi_comm_rank_self(comm);
+ *rank = smpi_mpi_comm_rank(comm);
}
smpi_bench_begin();
int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request *request)
{
int retval = MPI_SUCCESS;
- int dst;
smpi_bench_end();
- dst = smpi_mpi_comm_rank_self(comm);
if (NULL == request) {
retval = MPI_ERR_ARG;
} else {
+ int dst = 0;
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, request);
if (NULL != *request && MPI_SUCCESS == retval) {
retval = smpi_mpi_irecv(*request);
int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status)
{
int retval = MPI_SUCCESS;
- int dst;
+ int dst = 0;
smpi_mpi_request_t request;
smpi_bench_end();
- dst = smpi_mpi_comm_rank_self(comm);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &request);
-
if (NULL != request && MPI_SUCCESS == retval) {
retval = smpi_mpi_irecv(request);
if (MPI_SUCCESS == retval) {
int MPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request *request)
{
int retval = MPI_SUCCESS;
- int src;
smpi_bench_end();
- src = smpi_mpi_comm_rank_self(comm);
if (NULL == request) {
retval = MPI_ERR_ARG;
} else {
+ int src = 0;
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, request);
if (NULL != *request && MPI_SUCCESS == retval) {
retval = smpi_mpi_isend(*request);
int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
{
int retval = MPI_SUCCESS;
- int src;
+ int src = 0;
smpi_mpi_request_t request;
smpi_bench_end();
- src = smpi_mpi_comm_rank_self(comm);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &request);
if (NULL != request && MPI_SUCCESS == retval) {
retval = smpi_mpi_isend(request);