Comm::Comm(MPI_Group group, MPI_Topology topo) : group_(group), topo_(topo)
{
- refcount_=1;
- topoType_ = MPI_INVALID_TOPO;
- intra_comm_ = MPI_COMM_NULL;
- leaders_comm_ = MPI_COMM_NULL;
- is_uniform_=1;
+ refcount_ = 1;
+ topoType_ = MPI_INVALID_TOPO;
+ intra_comm_ = MPI_COMM_NULL;
+ leaders_comm_ = MPI_COMM_NULL;
+ is_uniform_ = 1;
non_uniform_map_ = nullptr;
- leaders_map_ = nullptr;
- is_blocked_=0;
+ leaders_map_ = nullptr;
+ is_blocked_ = 0;
}
void Comm::destroy(Comm* comm)
smpi_switch_data_segment(smpi_process()->index());
}
MPI_Group cp = new Group(this->group());
- (*newcomm) = new Comm(cp, this->topo());
- int ret = MPI_SUCCESS;
+ (*newcomm) = new Comm(cp, this->topo());
+ int ret = MPI_SUCCESS;
if (not attributes()->empty()) {
int flag;
}else{
delete[] leaders_map;
}
- int j=0;
int leader_group_size = 0;
for(i=0; i<comm_size; i++){
int already_done = 0;
- for (j = 0; j < leader_group_size; j++) {
+ for (int j = 0; j < leader_group_size; j++) {
if (leaders_map_[i] == leader_list[j]) {
already_done = 1;
}