{
CHECK_NULL(1, MPI_ERR_ARG, group)
CHECK_MPI_NULL(1, MPI_GROUP_NULL, MPI_ERR_GROUP, *group)
- if(*group != MPI_COMM_WORLD->group() && *group != MPI_GROUP_EMPTY)
+ if(*group != MPI_COMM_WORLD->group() && *group != MPI_GROUP_EMPTY){
+ (*group)->mark_as_deleted();
simgrid::smpi::Group::unref(*group);
+ }
*group = MPI_GROUP_NULL;
return MPI_SUCCESS;
}
int PMPI_Info_free( MPI_Info *info){
CHECK_NULL(1, MPI_ERR_ARG, info)
CHECK_INFO(1, *info)
+ (*info)->mark_as_deleted();
simgrid::smpi::Info::unref(*info);
*info=MPI_INFO_NULL;
return MPI_SUCCESS;
#include "private.hpp"
#include "smpi_op.hpp"
+#include "smpi_comm.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
CHECK_MPI_NULL(1, MPI_OP_NULL, MPI_ERR_OP, *op)
if((*op)->is_predefined())
return MPI_ERR_OP;
+ (*op)->mark_as_deleted();
simgrid::smpi::Op::unref(op);
*op = MPI_OP_NULL;
return MPI_SUCCESS;
smpi_bench_end();
if (*request != MPI_REQUEST_NULL) {
+ (*request)->mark_as_deleted();
simgrid::smpi::Request::unref(request);
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
if (*datatype == MPI_DATATYPE_NULL || (*datatype)->flags() & DT_FLAG_PREDEFINED) {
return MPI_ERR_TYPE;
} else {
+ (*datatype)->mark_as_deleted();
simgrid::smpi::Datatype::unref(*datatype);
*datatype=MPI_DATATYPE_NULL;
return MPI_SUCCESS;