From: degomme Date: Wed, 8 Mar 2017 13:18:36 +0000 (+0100) Subject: Don't use this anymore, as we are in the same namespace already. X-Git-Tag: v3_15~170 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0bb767878b9cec002756d922fc6c68ba9f606f6f Don't use this anymore, as we are in the same namespace already. --- diff --git a/src/smpi/colls/alltoall-pair.cpp b/src/smpi/colls/alltoall-pair.cpp index 57069ef493..f0e127b859 100644 --- a/src/smpi/colls/alltoall-pair.cpp +++ b/src/smpi/colls/alltoall-pair.cpp @@ -45,7 +45,7 @@ int smpi_coll_tuned_alltoall_pair_rma(void *send_buff, int send_count, MPI_Datat send_chunk = smpi_datatype_get_extent(send_type); recv_chunk = smpi_datatype_get_extent(recv_type); - win=new simgrid::smpi::Win(recv_buff, num_procs * recv_chunk * send_count, recv_chunk, 0, + win=new Win(recv_buff, num_procs * recv_chunk * send_count, recv_chunk, 0, comm); send_chunk *= send_count; recv_chunk *= recv_count; diff --git a/src/smpi/smpi_comm.cpp b/src/smpi/smpi_comm.cpp index 5c094cd55c..e043747e92 100644 --- a/src/smpi/smpi_comm.cpp +++ b/src/smpi/smpi_comm.cpp @@ -24,7 +24,7 @@ xbt_dict_t smpi_comm_keyvals = nullptr; int comm_keyval_id = 0;//avoid collisions -simgrid::smpi::Comm mpi_MPI_COMM_UNINITIALIZED; + Comm mpi_MPI_COMM_UNINITIALIZED; MPI_Comm MPI_COMM_UNINITIALIZED=&mpi_MPI_COMM_UNINITIALIZED; /* Support for cartesian topology was added, but there are 2 other types of topology, graph et dist graph. In order to @@ -82,8 +82,8 @@ int Comm::dup(MPI_Comm* newcomm){ if(smpi_privatize_global_variables){ //we need to switch as the called function may silently touch global variables smpi_switch_data_segment(smpi_process_index()); } - MPI_Group cp = new simgrid::smpi::Group(this->group()); - (*newcomm) = new simgrid::smpi::Comm(cp, this->topo()); + MPI_Group cp = new Group(this->group()); + (*newcomm) = new Comm(cp, this->topo()); int ret = MPI_SUCCESS; if(attributes_ !=nullptr){ @@ -243,7 +243,7 @@ MPI_Comm Comm::split(int color, int key) rankmap[2 * count + 1] = recvbuf[2 * i + 1]; count++; qsort(rankmap, count, 2 * sizeof(int), &smpi_compare_rankmap); - group_out = new simgrid::smpi::Group(count); + group_out = new Group(count); if (i == 0) { group_root = group_out; /* Save root's group */ } @@ -255,7 +255,7 @@ MPI_Comm Comm::split(int color, int key) int reqs = 0; for (int j = 0; j < count; j++) { if(rankmap[2 * j] != 0) { - group_snd[reqs]=new simgrid::smpi::Group(group_out); + group_snd[reqs]=new Group(group_out); requests[reqs] = Request::isend(&(group_snd[reqs]), 1, MPI_PTR, rankmap[2 * j], system_tag, this); reqs++; } @@ -276,7 +276,7 @@ MPI_Comm Comm::split(int color, int key) Request::recv(&group_out, 1, MPI_PTR, 0, system_tag, this, MPI_STATUS_IGNORE); } /* otherwise, exit with group_out == nullptr */ } - return group_out!=nullptr ? new simgrid::smpi::Comm(group_out, nullptr) : MPI_COMM_NULL; + return group_out!=nullptr ? new Comm(group_out, nullptr) : MPI_COMM_NULL; } void Comm::use(){ @@ -375,7 +375,7 @@ void Comm::init_smp(){ } } XBT_DEBUG("number of processes deployed on my node : %d", intra_comm_size); - MPI_Group group_intra = new simgrid::smpi::Group(intra_comm_size); + MPI_Group group_intra = new Group(intra_comm_size); i=0; process = nullptr; xbt_swag_foreach(process, process_list) { @@ -386,7 +386,7 @@ void Comm::init_smp(){ } } - MPI_Comm comm_intra = new simgrid::smpi::Comm(group_intra, nullptr); + MPI_Comm comm_intra = new Comm(group_intra, nullptr); leader=min_index; int * leaders_map= static_cast(xbt_malloc0(sizeof(int)*comm_size)); @@ -422,14 +422,14 @@ void Comm::init_smp(){ } qsort(leader_list, leader_group_size, sizeof(int),compare_ints); - MPI_Group leaders_group = new simgrid::smpi::Group(leader_group_size); + MPI_Group leaders_group = new Group(leader_group_size); MPI_Comm leader_comm = MPI_COMM_NULL; if(MPI_COMM_WORLD!=MPI_COMM_UNINITIALIZED && this!=MPI_COMM_WORLD){ //create leader_communicator for (i=0; i< leader_group_size;i++) leaders_group->set_mapping(leader_list[i], i); - leader_comm = new simgrid::smpi::Comm(leaders_group, nullptr); + leader_comm = new Comm(leaders_group, nullptr); this->set_leaders_comm(leader_comm); this->set_intra_comm(comm_intra); @@ -439,7 +439,7 @@ void Comm::init_smp(){ leaders_group->set_mapping(leader_list[i], i); if(this->get_leaders_comm()==MPI_COMM_NULL){ - leader_comm = new simgrid::smpi::Comm(leaders_group, nullptr); + leader_comm = new Comm(leaders_group, nullptr); this->set_leaders_comm(leader_comm); }else{ leader_comm=this->get_leaders_comm(); diff --git a/src/smpi/smpi_deployment.cpp b/src/smpi/smpi_deployment.cpp index bfb684b12e..d33742e196 100644 --- a/src/smpi/smpi_deployment.cpp +++ b/src/smpi/smpi_deployment.cpp @@ -69,8 +69,8 @@ void smpi_deployment_register_process(const char* instance_id, int rank, int ind xbt_assert(instance, "Error, unknown instance %s", instance_id); if(instance->comm_world == MPI_COMM_NULL){ - MPI_Group group = new simgrid::smpi::Group(instance->size); - instance->comm_world = new simgrid::smpi::Comm(group, nullptr); + MPI_Group group = new Group(instance->size); + instance->comm_world = new Comm(group, nullptr); } instance->present_processes++; index_to_process_data[index]=instance->index+rank; diff --git a/src/smpi/smpi_global.cpp b/src/smpi/smpi_global.cpp index f67ffe0b86..58201cb39b 100644 --- a/src/smpi/smpi_global.cpp +++ b/src/smpi/smpi_global.cpp @@ -352,8 +352,8 @@ MPI_Comm smpi_process_comm_self() { smpi_process_data_t data = smpi_process_data(); if(data->comm_self==MPI_COMM_NULL){ - MPI_Group group = new simgrid::smpi::Group(1); - data->comm_self = new simgrid::smpi::Comm(group, nullptr); + MPI_Group group = new Group(1); + data->comm_self = new Comm(group, nullptr); group->set_mapping(smpi_process_index(), 0); } @@ -598,8 +598,8 @@ void smpi_global_init() //if the process was launched through smpirun script we generate a global mpi_comm_world //if not, we let MPI_COMM_NULL, and the comm world will be private to each mpi instance if(smpirun){ - group = new simgrid::smpi::Group(process_count); - MPI_COMM_WORLD = new simgrid::smpi::Comm(group, nullptr); + group = new Group(process_count); + MPI_COMM_WORLD = new Comm(group, nullptr); MPI_Attr_put(MPI_COMM_WORLD, MPI_UNIVERSE_SIZE, reinterpret_cast(process_count)); msg_bar_t bar = MSG_barrier_init(process_count); diff --git a/src/smpi/smpi_group.cpp b/src/smpi/smpi_group.cpp index 7507c65633..f8f2f86a96 100644 --- a/src/smpi/smpi_group.cpp +++ b/src/smpi/smpi_group.cpp @@ -7,7 +7,7 @@ #include "private.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_group, smpi, "Logging specific to SMPI (group)"); -simgrid::smpi::Group mpi_MPI_GROUP_EMPTY; + Group mpi_MPI_GROUP_EMPTY; MPI_Group MPI_GROUP_EMPTY=&mpi_MPI_GROUP_EMPTY; namespace simgrid{ @@ -197,7 +197,7 @@ int Group::group_union(MPI_Group group2, MPI_Group* newgroup) if (size1 == 0) { *newgroup = MPI_GROUP_EMPTY; } else { - *newgroup = new simgrid::smpi::Group(size1); + *newgroup = new Group(size1); size2 = this->size(); for (int i = 0; i < size2; i++) { int proc1 = this->index(i); @@ -224,7 +224,7 @@ int Group::intersection(MPI_Group group2, MPI_Group* newgroup) if (size2 == 0) { *newgroup = MPI_GROUP_EMPTY; } else { - *newgroup = new simgrid::smpi::Group(size2); + *newgroup = new Group(size2); int j=0; for (int i = 0; i < group2->size(); i++) { int proc2 = group2->index(i); @@ -252,7 +252,7 @@ int Group::difference(MPI_Group group2, MPI_Group* newgroup) if (newsize == 0) { *newgroup = MPI_GROUP_EMPTY; } else { - *newgroup = new simgrid::smpi::Group(newsize); + *newgroup = new Group(newsize); for (int i = 0; i < size2; i++) { int proc1 = this->index(i); int proc2 = group2->rank(proc1); @@ -267,7 +267,7 @@ int Group::difference(MPI_Group group2, MPI_Group* newgroup) int Group::excl(int n, int *ranks, MPI_Group * newgroup){ int oldsize = size_; int newsize = oldsize - n; - *newgroup = new simgrid::smpi::Group(newsize); + *newgroup = new Group(newsize); int* to_exclude=xbt_new0(int, size_); for (int i = 0; i < oldsize; i++) to_exclude[i]=0; @@ -306,7 +306,7 @@ int Group::range_incl(int n, int ranges[][3], MPI_Group * newgroup){ } } } - *newgroup = new simgrid::smpi::Group(newsize); + *newgroup = new Group(newsize); int j = 0; for (int i = 0; i < n; i++) { for (int rank = ranges[i][0]; /* First */ @@ -354,7 +354,7 @@ int Group::range_excl(int n, int ranges[][3], MPI_Group * newgroup){ if (newsize == 0) { *newgroup = MPI_GROUP_EMPTY; } else { - *newgroup = new simgrid::smpi::Group(newsize); + *newgroup = new Group(newsize); int newrank = 0; int oldrank = 0; while (newrank < newsize) { diff --git a/src/smpi/smpi_topo.cpp b/src/smpi/smpi_topo.cpp index 4021d19103..ca89d50c43 100644 --- a/src/smpi/smpi_topo.cpp +++ b/src/smpi/smpi_topo.cpp @@ -71,7 +71,7 @@ Cart::Cart(MPI_Comm comm_old, int ndims, int dims[], int periods[], int reorder, return; } oldGroup = comm_old->group(); - newGroup = new simgrid::smpi::Group(newSize); + newGroup = new Group(newSize); for (int i = 0 ; i < newSize ; i++) { newGroup->set_mapping(oldGroup->index(i), i); } @@ -89,10 +89,10 @@ Cart::Cart(MPI_Comm comm_old, int ndims, int dims[], int periods[], int reorder, rank = rank % nranks; } - *comm_cart = new simgrid::smpi::Comm(newGroup, this); + *comm_cart = new Comm(newGroup, this); } else { if (rank == 0) { - *comm_cart = new simgrid::smpi::Comm(new simgrid::smpi::Group(MPI_COMM_SELF->group()), this); + *comm_cart = new Comm(new Group(MPI_COMM_SELF->group()), this); } else { *comm_cart = MPI_COMM_NULL; }