namespace simgrid{
namespace smpi{
+void Topo::setComm(MPI_Comm comm)
+{
+ xbt_assert(not comm_);
+ comm_ = comm;
+ if (comm_)
+ comm_->topo_ = this;
+}
+
/*******************************************************************************
* Cartesian topologies
******************************************************************************/
} else {
if(comm_cart != nullptr){
if (rank == 0) {
- *comm_cart = new Comm(new Group(MPI_COMM_SELF->group()), this);
+ MPI_Group group = new Group(MPI_COMM_SELF->group());
+ *comm_cart = new Comm(group, this);
} else {
*comm_cart = MPI_COMM_NULL;
}