Comm::destroy(smpi_process()->comm_world());
return;
}
- if(comm != MPI_COMM_WORLD)
+ if (comm != MPI_COMM_WORLD && not comm->deleted()) {
+ comm->cleanup_attr<Comm>();
comm->mark_as_deleted();
+ }
Comm::unref(comm);
}
MPI_Info Comm::info()
{
- if (info_ == MPI_INFO_NULL)
- info_ = new Info();
- info_->ref();
return info_;
}