} else if (not datatype->is_valid()) {
retval = MPI_ERR_ARG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int root_traced = comm->group()->index(root);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_BARRIER;
TRACE_smpi_collective_in(rank, __FUNCTION__, extra);
sendtmpcount=0;
sendtmptype=recvtype;
}
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int root_traced = comm->group()->index(root);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_GATHER;
sendtmptype=recvtype;
}
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int root_traced = comm->group()->index(root);
int size = comm->size();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
sendcount=recvcount;
sendtype=recvtype;
}
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_ALLGATHER;
int known = 0;
sendcount=recvcounts[comm->rank()];
sendtype=recvtype;
}
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int i = 0;
int size = comm->size();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
recvtype = sendtype;
recvcount = sendcount;
}
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int root_traced = comm->group()->index(root);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_SCATTER;
recvtype = sendtype;
recvcount = sendcounts[comm->rank()];
}
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int root_traced = comm->group()->index(root);
int size = comm->size();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
} else if (not datatype->is_valid() || op == MPI_OP_NULL) {
retval = MPI_ERR_ARG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int root_traced = comm->group()->index(root);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_REDUCE;
sendtmpbuf = static_cast<char*>(xbt_malloc(count*datatype->get_extent()));
simgrid::smpi::Datatype::copy(recvbuf, count, datatype,sendtmpbuf, count, datatype);
}
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_ALLREDUCE;
int known = 0;
} else if (op == MPI_OP_NULL) {
retval = MPI_ERR_OP;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_SCAN;
int known = 0;
} else if (op == MPI_OP_NULL) {
retval = MPI_ERR_OP;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_EXSCAN;
int known = 0;
} else if (recvcounts == nullptr) {
retval = MPI_ERR_ARG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int i = 0;
int size = comm->size();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
} else {
int count = comm->size();
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_REDUCE_SCATTER;
extra->num_processes = count;
} else if ((sendbuf != MPI_IN_PLACE && sendtype == MPI_DATATYPE_NULL) || recvtype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_ALLTOALL;
recvdisps == nullptr) {
retval = MPI_ERR_ARG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int i = 0;
int size = comm->size();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
retval = MPI_ERR_TAG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int src_traced = comm->group()->index(src);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
} else if(tag<0 && tag != MPI_ANY_TAG){
retval = MPI_ERR_TAG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int dst_traced = comm->group()->index(dst);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ISEND;
} else if(tag<0 && tag != MPI_ANY_TAG){
retval = MPI_ERR_TAG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int dst_traced = comm->group()->index(dst);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ISSEND;
} else if(tag<0 && tag != MPI_ANY_TAG){
retval = MPI_ERR_TAG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int src_traced = comm->group()->index(src);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
extra->type = TRACING_RECV;
} else if(tag < 0 && tag != MPI_ANY_TAG){
retval = MPI_ERR_TAG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int dst_traced = comm->group()->index(dst);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SEND;
} else if(tag<0 && tag != MPI_ANY_TAG){
retval = MPI_ERR_TAG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int dst_traced = comm->group()->index(dst);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_SSEND;
retval = MPI_ERR_TAG;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
+ int rank = smpi_process()->index();
int dst_traced = comm->group()->index(dst);
int src_traced = comm->group()->index(src);
instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);