XBT_ATTRIB_UNUSED unsigned int core_bind = 0;
for (unsigned i = 1; i < num_workers; i++) {
- this->workers[i] = new std::thread(worker_main, new ThreadData(*this, i));
+ ThreadData* data = new ThreadData(*this, i);
+ this->workers[i] = new std::thread(worker_main, data);
/* Bind the worker to a core if possible */
#if HAVE_PTHREAD_SETAFFINITY
} 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;
}