Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Finally rename smpi::Group::actor_pid() back to actor().
[simgrid.git] / src / smpi / mpi / smpi_win.cpp
index 52aff5a..3005236 100644 (file)
@@ -346,7 +346,7 @@ int Win::accumulate(const void *origin_addr, int origin_count, MPI_Datatype orig
 
   // prepare receiver request
   MPI_Request rreq = Request::rma_recv_init(recv_addr, target_count, target_datatype, recv_win->comm_->rank(),
-                                            recv_win->comm_->group()->rank(comm_->group()->actor_pid(target_rank)),
+                                            recv_win->comm_->group()->rank(comm_->group()->actor(target_rank)),
                                             SMPI_RMA_TAG - 3 - count_, recv_win->comm_, op);
 
   count_++;
@@ -443,7 +443,7 @@ int Win::start(MPI_Group group, int /*assert*/)
 
   XBT_DEBUG("Entering MPI_Win_Start");
   while (j != size) {
-    int src = comm_->group()->rank(group->actor_pid(j));
+    int src = comm_->group()->rank(group->actor(j));
     if (src != rank_ && src != MPI_UNDEFINED) { // TODO cheinrich: The check of MPI_UNDEFINED should be useless here
       reqs[i] = Request::irecv_init(nullptr, 0, MPI_CHAR, src, SMPI_RMA_TAG + 4, comm_);
       i++;
@@ -473,7 +473,7 @@ int Win::post(MPI_Group group, int /*assert*/)
 
   XBT_DEBUG("Entering MPI_Win_Post");
   while(j!=size){
-    int dst = comm_->group()->rank(group->actor_pid(j));
+    int dst = comm_->group()->rank(group->actor(j));
     if (dst != rank_ && dst != MPI_UNDEFINED) {
       reqs[i] = Request::send_init(nullptr, 0, MPI_CHAR, dst, SMPI_RMA_TAG + 4, comm_);
       i++;
@@ -504,7 +504,7 @@ int Win::complete(){
   std::vector<MPI_Request> reqs(size);
 
   while(j!=size){
-    int dst = comm_->group()->rank(group_->actor_pid(j));
+    int dst = comm_->group()->rank(group_->actor(j));
     if (dst != rank_ && dst != MPI_UNDEFINED) {
       reqs[i] = Request::send_init(nullptr, 0, MPI_CHAR, dst, SMPI_RMA_TAG + 5, comm_);
       i++;
@@ -537,7 +537,7 @@ int Win::wait(){
   std::vector<MPI_Request> reqs(size);
 
   while(j!=size){
-    int src = comm_->group()->rank(group_->actor_pid(j));
+    int src = comm_->group()->rank(group_->actor(j));
     if (src != rank_ && src != MPI_UNDEFINED) {
       reqs[i] = Request::irecv_init(nullptr, 0, MPI_CHAR, src, SMPI_RMA_TAG + 5, comm_);
       i++;
@@ -672,7 +672,7 @@ int Win::finish_comms(int rank){
   // because we only wait for requests that we are responsible for.
   // Also use the process id here since the request itself returns from src()
   // and dst() the process id, NOT the rank (which only exists in the context of a communicator).
-  int proc_id = comm_->group()->actor_pid(rank);
+  int proc_id = comm_->group()->actor(rank);
   auto it     = std::stable_partition(begin(requests_), end(requests_), [proc_id](const MPI_Request& req) {
     return (req == MPI_REQUEST_NULL || (req->src() != proc_id && req->dst() != proc_id));
   });