if (function == nullptr || op == nullptr) {
return MPI_ERR_ARG;
} else {
- *op = smpi_op_new(function, (commute!=0));
+ *op = new Op(function, (commute!=0));
return MPI_SUCCESS;
}
}
} else if (*op == MPI_OP_NULL) {
return MPI_ERR_OP;
} else {
- smpi_op_destroy(*op);
+ delete (*op);
*op = MPI_OP_NULL;
return MPI_SUCCESS;
}
return MPI_SUCCESS;
}else{
group->use();
- *newcomm = new simgrid::smpi::Comm(group, nullptr);
+ *newcomm = new Comm(group, nullptr);
return MPI_SUCCESS;
}
}
if (!is_datatype_valid(datatype) || op == MPI_OP_NULL) {
retval = MPI_ERR_ARG;
} else {
- smpi_op_apply(op, inbuf, inoutbuf, &count, &datatype);
+ if(op!=MPI_OP_NULL) op->apply( inbuf, inoutbuf, &count, &datatype);
retval = MPI_SUCCESS;
}
smpi_bench_begin();
} else if (ndims < 0 || (ndims > 0 && (dims == nullptr || periodic == nullptr)) || comm_cart == nullptr) {
return MPI_ERR_ARG;
} else{
- new simgrid::smpi::Cart(comm_old, ndims, dims, periodic, reorder, comm_cart);
+ new Cart(comm_old, ndims, dims, periodic, reorder, comm_cart);
return MPI_SUCCESS;
}
}
if (coords == nullptr) {
return MPI_ERR_ARG;
}
- simgrid::smpi::Cart* topo = static_cast<simgrid::smpi::Cart*>(comm->topo());
+ Cart* topo = static_cast<Cart*>(comm->topo());
if (topo==nullptr) {
return MPI_ERR_ARG;
}
if (source == nullptr || dest == nullptr || direction < 0 ) {
return MPI_ERR_ARG;
}
- simgrid::smpi::Cart* topo = static_cast<simgrid::smpi::Cart*>(comm->topo());
+ Cart* topo = static_cast<Cart*>(comm->topo());
if (topo==nullptr) {
return MPI_ERR_ARG;
}
if(coords == nullptr) {
return MPI_ERR_ARG;
}
- simgrid::smpi::Cart* topo = static_cast<simgrid::smpi::Cart*>(comm->topo());
+ Cart* topo = static_cast<Cart*>(comm->topo());
if (topo==nullptr) {
return MPI_ERR_ARG;
}
if(maxdims <= 0 || dims == nullptr || periods == nullptr || coords == nullptr) {
return MPI_ERR_ARG;
}
- simgrid::smpi::Cart* topo = static_cast<simgrid::smpi::Cart*>(comm->topo());
+ Cart* topo = static_cast<Cart*>(comm->topo());
if (topo==nullptr) {
return MPI_ERR_ARG;
}
if (ndims == nullptr) {
return MPI_ERR_ARG;
}
- simgrid::smpi::Cart* topo = static_cast<simgrid::smpi::Cart*>(comm->topo());
+ Cart* topo = static_cast<Cart*>(comm->topo());
if (topo==nullptr) {
return MPI_ERR_ARG;
}
if (ndims < 1 || nnodes < 1) {
return MPI_ERR_DIMS;
}
- return simgrid::smpi::Dims_create(nnodes, ndims, dims);
+ return Dims_create(nnodes, ndims, dims);
}
int PMPI_Cart_sub(MPI_Comm comm, int* remain_dims, MPI_Comm* comm_new) {
if (comm_new == nullptr) {
return MPI_ERR_ARG;
}
- simgrid::smpi::Cart* topo = static_cast<simgrid::smpi::Cart*>(comm->topo());
+ Cart* topo = static_cast<Cart*>(comm->topo());
if (topo==nullptr) {
return MPI_ERR_ARG;
}
- simgrid::smpi::Cart* cart = topo->sub(remain_dims, comm_new);
+ Cart* cart = topo->sub(remain_dims, comm_new);
if(cart==nullptr)
return MPI_ERR_ARG;
return MPI_SUCCESS;
}else if ((base == nullptr && size != 0) || disp_unit <= 0 || size < 0 ){
retval= MPI_ERR_OTHER;
}else{
- *win = new simgrid::smpi::Win( base, size, disp_unit, info, comm);
+ *win = new Win( base, size, disp_unit, info, comm);
retval = MPI_SUCCESS;
}
smpi_bench_begin();