comm_size = comm->size();
rank = comm->rank();
MPI_Aint extent;
- extent = smpi_datatype_get_extent(dtype);
+ extent = dtype->get_extent();
tmp_buf = (void *) smpi_get_tmp_sendbuffer(count * extent);
int intra_rank, inter_rank;
if (src < comm_size) {
recv_offset = phase * pcount * extent;
Request::recv(tmp_buf, pcount, dtype, src, tag, comm, &status);
- smpi_op_apply(op, tmp_buf, (char *)recv_buf + recv_offset, &pcount, &dtype);
+ if(op!=MPI_OP_NULL) op->apply( tmp_buf, (char *)recv_buf + recv_offset, &pcount, dtype);
}
} else {
send_offset = phase * pcount * extent;
if (src < comm_size) {
recv_offset = (phase - 1) * pcount * extent;
Request::recv(tmp_buf, pcount, dtype, src, tag, comm, &status);
- smpi_op_apply(op, tmp_buf, (char *)recv_buf + recv_offset, &pcount, &dtype);
+ if(op!=MPI_OP_NULL) op->apply( tmp_buf, (char *)recv_buf + recv_offset, &pcount, dtype);
}
} else {
dst = (inter_rank & (~mask)) * num_core;