Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fortran: avoid adding twice to lut, now that it's done in C as well
authorAugustin Degomme <adegomme@users.noreply.github.com>
Fri, 19 Feb 2021 07:52:34 +0000 (08:52 +0100)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Fri, 19 Feb 2021 07:52:34 +0000 (08:52 +0100)
src/smpi/bindings/smpi_f77.cpp
src/smpi/bindings/smpi_f77_coll.cpp
src/smpi/bindings/smpi_f77_comm.cpp
src/smpi/bindings/smpi_f77_file.cpp
src/smpi/bindings/smpi_f77_request.cpp
src/smpi/bindings/smpi_f77_type.cpp

index 0dbda6d..530487b 100644 (file)
@@ -160,9 +160,6 @@ void mpi_win_free_(int* win, int* ierr)
 {
   MPI_Win tmp = simgrid::smpi::Win::f2c(*win);
   *ierr =  MPI_Win_free(&tmp);
-  if(*ierr == MPI_SUCCESS) {
-    simgrid::smpi::F2C::free_f(*win);
-  }
 }
 
 void mpi_win_create_(int* base, MPI_Aint* size, int* disp_unit, int* info, int* comm, int* win, int* ierr)
@@ -170,7 +167,7 @@ void mpi_win_create_(int* base, MPI_Aint* size, int* disp_unit, int* info, int*
   MPI_Win tmp;
   *ierr =  MPI_Win_create( static_cast<void*>(base), *size, *disp_unit, simgrid::smpi::Info::f2c(*info), simgrid::smpi::Comm::f2c(*comm),&tmp);
   if (*ierr == MPI_SUCCESS) {
-    *win = tmp->add_f();
+    *win = tmp->c2f();
   }
 }
 
@@ -220,7 +217,7 @@ void mpi_win_allocate_(MPI_Aint* size, int* disp_unit, int* info, int* comm, voi
   *ierr =
       MPI_Win_allocate(*size, *disp_unit, simgrid::smpi::Info::f2c(*info), simgrid::smpi::Comm::f2c(*comm), base, &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *win = tmp->add_f();
+   *win = tmp->c2f();
  }
 }
 
@@ -234,7 +231,7 @@ void mpi_win_create_dynamic_(int* info, int* comm, int* win, int* ierr)
   MPI_Win tmp;
   *ierr =  MPI_Win_create_dynamic( simgrid::smpi::Info::f2c(*info), simgrid::smpi::Comm::f2c(*comm),&tmp);
  if(*ierr == MPI_SUCCESS) {
-   *win = tmp->add_f();
+   *win = tmp->c2f();
  }
 }
 
@@ -253,7 +250,7 @@ void mpi_win_get_info_(int* win, int* info, int* ierr)
   MPI_Info tmp;
   *ierr =  MPI_Win_get_info(simgrid::smpi::Win::f2c(*win), &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *info = tmp->add_f();
+    *info = tmp->c2f();
   }
 }
 
@@ -262,7 +259,7 @@ void mpi_win_get_group_(int* win, int* group, int* ierr)
   MPI_Group tmp;
   *ierr =  MPI_Win_get_group(simgrid::smpi::Win::f2c(*win), &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *group = tmp->add_f();
+    *group = tmp->c2f();
   }
 }
 
@@ -358,7 +355,7 @@ void mpi_info_create_(int* info, int* ierr)
   MPI_Info tmp;
   *ierr =  MPI_Info_create(&tmp);
   if(*ierr == MPI_SUCCESS) {
-    *info = tmp->add_f();
+    *info = tmp->c2f();
   }
 }
 
@@ -428,7 +425,7 @@ void mpi_rget_(int* origin_addr, int* origin_count, int* origin_datatype, int* t
   *ierr =  MPI_Rget( static_cast<void*>(origin_addr),*origin_count, simgrid::smpi::Datatype::f2c(*origin_datatype),*target_rank,
       *target_disp, *target_count, simgrid::smpi::Datatype::f2c(*tarsmpi_type_f2c), simgrid::smpi::Win::f2c(*win), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -447,7 +444,7 @@ void mpi_raccumulate_(int* origin_addr, int* origin_count, int* origin_datatype,
   *ierr =  MPI_Raccumulate( static_cast<void *>(origin_addr),*origin_count, simgrid::smpi::Datatype::f2c(*origin_datatype),*target_rank,
       *target_disp, *target_count, simgrid::smpi::Datatype::f2c(*tarsmpi_type_f2c), simgrid::smpi::Op::f2c(*op), simgrid::smpi::Win::f2c(*win),&req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -465,7 +462,7 @@ void mpi_rput_(int* origin_addr, int* origin_count, int* origin_datatype, int* t
   *ierr =  MPI_Rput( static_cast<void *>(origin_addr),*origin_count, simgrid::smpi::Datatype::f2c(*origin_datatype),*target_rank,
       *target_disp, *target_count, simgrid::smpi::Datatype::f2c(*tarsmpi_type_f2c), simgrid::smpi::Win::f2c(*win),&req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -507,7 +504,7 @@ void mpi_rget_accumulate_(int* origin_addr, int* origin_count, int* origin_datat
                               *target_count, simgrid::smpi::Datatype::f2c(*target_datatype),
                               simgrid::smpi::Op::f2c(*op), simgrid::smpi::Win::f2c(*win), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -555,7 +552,7 @@ void mpi_op_create_(void* function, int* commute, int* op, int* ierr)
   *ierr = MPI_Op_create(reinterpret_cast<MPI_User_function*>(function), *commute, &tmp);
   if (*ierr == MPI_SUCCESS) {
     tmp->set_fortran_op();
-    *op = tmp->add_f();
+    *op = tmp->c2f();
   }
 }
 
@@ -563,9 +560,6 @@ void mpi_op_free_(int* op, int* ierr)
 {
   MPI_Op tmp= simgrid::smpi::Op::f2c(*op);
   *ierr = MPI_Op_free(& tmp);
-  if(*ierr == MPI_SUCCESS) {
-    simgrid::smpi::F2C::free_f(*op);
-  }
 }
 
 void mpi_op_commutative_(int* op, int* commute, int* ierr)
@@ -578,7 +572,6 @@ void mpi_group_free_(int* group, int* ierr)
   MPI_Group tmp = simgrid::smpi::Group::f2c(*group);
   if(tmp != MPI_COMM_WORLD->group() && tmp != MPI_GROUP_EMPTY){
     simgrid::smpi::Group::unref(tmp);
-    simgrid::smpi::F2C::free_f(*group);
   }
   *ierr = MPI_SUCCESS;
 }
@@ -608,7 +601,7 @@ void mpi_group_union_(int* group1, int* group2, int* newgroup, int* ierr)
   MPI_Group tmp;
   *ierr = MPI_Group_union(simgrid::smpi::Group::f2c(*group1), simgrid::smpi::Group::f2c(*group2), &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *newgroup = tmp->add_f();
+    *newgroup = tmp->c2f();
   }
 }
 
@@ -617,7 +610,7 @@ void mpi_group_intersection_(int* group1, int* group2, int* newgroup, int* ierr)
   MPI_Group tmp;
   *ierr = MPI_Group_intersection(simgrid::smpi::Group::f2c(*group1), simgrid::smpi::Group::f2c(*group2), &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *newgroup = tmp->add_f();
+    *newgroup = tmp->c2f();
   }
 }
 
@@ -626,7 +619,7 @@ void mpi_group_difference_(int* group1, int* group2, int* newgroup, int* ierr)
   MPI_Group tmp;
   *ierr = MPI_Group_difference(simgrid::smpi::Group::f2c(*group1), simgrid::smpi::Group::f2c(*group2), &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *newgroup = tmp->add_f();
+    *newgroup = tmp->c2f();
   }
 }
 
@@ -635,7 +628,7 @@ void mpi_group_excl_(int* group, int* n, int* ranks, int* newgroup, int* ierr)
   MPI_Group tmp;
   *ierr = MPI_Group_excl(simgrid::smpi::Group::f2c(*group), *n, ranks, &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *newgroup = tmp->add_f();
+    *newgroup = tmp->c2f();
   }
 }
 
@@ -644,7 +637,7 @@ void mpi_group_range_incl_ (int* group, int* n, int ranges[][3], int* newgroup,
   MPI_Group tmp;
   *ierr = MPI_Group_range_incl(simgrid::smpi::Group::f2c(*group), *n, ranges, &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *newgroup = tmp->add_f();
+    *newgroup = tmp->c2f();
   }
 }
 
@@ -653,16 +646,13 @@ void mpi_group_range_excl_ (int* group, int* n, int ranges[][3], int* newgroup,
  MPI_Group tmp;
  *ierr = MPI_Group_range_excl(simgrid::smpi::Group::f2c(*group), *n, ranges, &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *newgroup = tmp->add_f();
+   *newgroup = tmp->c2f();
  }
 }
 
 void mpi_request_free_ (int* request, int* ierr){
   MPI_Request tmp=simgrid::smpi::Request::f2c(*request);
  *ierr = MPI_Request_free(&tmp);
- if(*ierr == MPI_SUCCESS) {
-   simgrid::smpi::Request::free_f(*request);
- }
 }
 
 void mpi_pack_size_ (int* incount, int* datatype, int* comm, int* size, int* ierr) {
@@ -677,7 +667,7 @@ void mpi_cart_create_ (int* comm_old, int* ndims, int* dims, int* periods, int*
   MPI_Comm tmp;
  *ierr = MPI_Cart_create(simgrid::smpi::Comm::f2c(*comm_old), *ndims, dims, periods, *reorder, &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *comm_cart = tmp->add_f();
+   *comm_cart = tmp->c2f();
  }
 }
 
@@ -701,7 +691,7 @@ void mpi_cart_sub_ (int* comm, int* remain_dims, int*  comm_new, int* ierr) {
  MPI_Comm tmp;
  *ierr = MPI_Cart_sub(simgrid::smpi::Comm::f2c(*comm), remain_dims, &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *comm_new = tmp->add_f();
+   *comm_new = tmp->c2f();
  }
 }
 
@@ -713,7 +703,7 @@ void mpi_graph_create_ (int* comm_old, int* nnodes, int* index, int* edges, int*
   MPI_Comm tmp;
  *ierr = MPI_Graph_create(simgrid::smpi::Comm::f2c(*comm_old), *nnodes, index, edges, *reorder, &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *comm_graph = tmp->add_f();
+   *comm_graph = tmp->c2f();
  }
 }
 
@@ -794,7 +784,7 @@ void mpi_intercomm_create_ (int* local_comm, int *local_leader, int* peer_comm,
   *ierr = MPI_Intercomm_create(simgrid::smpi::Comm::f2c(*local_comm), *local_leader, simgrid::smpi::Comm::f2c(*peer_comm), *remote_leader,
                                *tag, &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *comm_out = tmp->add_f();
+    *comm_out = tmp->c2f();
   }
 }
 
@@ -802,7 +792,7 @@ void mpi_intercomm_merge_ (int* comm, int* high, int*  comm_out, int* ierr) {
  MPI_Comm tmp;
  *ierr = MPI_Intercomm_merge(simgrid::smpi::Comm::f2c(*comm), *high, &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *comm_out = tmp->add_f();
+   *comm_out = tmp->c2f();
  }
 }
 
@@ -854,7 +844,7 @@ void mpi_info_dup_ (int* info, int* newinfo, int* ierr){
  MPI_Info tmp;
  *ierr = MPI_Info_dup(simgrid::smpi::Info::f2c(*info), &tmp);
  if(*ierr==MPI_SUCCESS){
-   *newinfo= tmp->add_f();
+   *newinfo= tmp->c2f();
  }
 }
 
@@ -907,7 +897,7 @@ void mpi_grequest_start_ ( void *query_fn, void *free_fn, void *cancel_fn, void
   *ierr = MPI_Grequest_start( reinterpret_cast<MPI_Grequest_query_function*>(query_fn), reinterpret_cast<MPI_Grequest_free_function*>(free_fn),
                               reinterpret_cast<MPI_Grequest_cancel_function*>(cancel_fn), extra_state, &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *request = tmp->add_f();
+   *request = tmp->c2f();
  }
 }
 
index 448560d..ef64d76 100644 (file)
@@ -139,7 +139,7 @@ void mpi_ibarrier_(int* comm, int* request, int* ierr) {
   MPI_Request req;
   *ierr = MPI_Ibarrier(simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -147,7 +147,7 @@ void mpi_ibcast_(void *buf, int* count, int* datatype, int* root, int* comm, int
   MPI_Request req;
   *ierr = MPI_Ibcast(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *root, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -158,7 +158,7 @@ void mpi_ireduce_(void* sendbuf, void* recvbuf, int* count, int* datatype, int*
   recvbuf = static_cast<char *>( FORT_BOTTOM(recvbuf));
   *ierr = MPI_Ireduce(sendbuf, recvbuf, *count, simgrid::smpi::Datatype::f2c(*datatype), simgrid::smpi::Op::f2c(*op), *root, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -167,7 +167,7 @@ void mpi_iallreduce_(void* sendbuf, void* recvbuf, int* count, int* datatype, in
   sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
   *ierr = MPI_Iallreduce(sendbuf, recvbuf, *count, simgrid::smpi::Datatype::f2c(*datatype), simgrid::smpi::Op::f2c(*op), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -177,7 +177,7 @@ void mpi_ireduce_scatter_(void* sendbuf, void* recvbuf, int* recvcounts, int* da
   *ierr = MPI_Ireduce_scatter(sendbuf, recvbuf, recvcounts, simgrid::smpi::Datatype::f2c(*datatype),
                         simgrid::smpi::Op::f2c(*op), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -188,7 +188,7 @@ void mpi_iscatter_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf,
   *ierr = MPI_Iscatter(sendbuf, *sendcount, simgrid::smpi::Datatype::f2c(*sendtype),
                       recvbuf, *recvcount, simgrid::smpi::Datatype::f2c(*recvtype), *root, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -199,7 +199,7 @@ void mpi_iscatterv_(void* sendbuf, int* sendcounts, int* displs, int* sendtype,
   *ierr = MPI_Iscatterv(sendbuf, sendcounts, displs, simgrid::smpi::Datatype::f2c(*sendtype),
                       recvbuf, *recvcount, simgrid::smpi::Datatype::f2c(*recvtype), *root, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -212,7 +212,7 @@ void mpi_igather_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, i
   *ierr = MPI_Igather(sendbuf, *sendcount, simgrid::smpi::Datatype::f2c(*sendtype),
                      recvbuf, *recvcount, simgrid::smpi::Datatype::f2c(*recvtype), *root, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -225,7 +225,7 @@ void mpi_igatherv_(void* sendbuf, int* sendcount, int* sendtype,
   *ierr = MPI_Igatherv(sendbuf, *sendcount, simgrid::smpi::Datatype::f2c(*sendtype),
                      recvbuf, recvcounts, displs, simgrid::smpi::Datatype::f2c(*recvtype), *root, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -236,7 +236,7 @@ void mpi_iallgather_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf
   *ierr = MPI_Iallgather(sendbuf, *sendcount, simgrid::smpi::Datatype::f2c(*sendtype),
                         recvbuf, *recvcount, simgrid::smpi::Datatype::f2c(*recvtype), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -247,7 +247,7 @@ void mpi_iallgatherv_(void* sendbuf, int* sendcount, int* sendtype,
   *ierr = MPI_Iallgatherv(sendbuf, *sendcount, simgrid::smpi::Datatype::f2c(*sendtype),
                         recvbuf, recvcounts, displs, simgrid::smpi::Datatype::f2c(*recvtype), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -257,7 +257,7 @@ void mpi_iscan_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op
   *ierr = MPI_Iscan(sendbuf, recvbuf, *count, simgrid::smpi::Datatype::f2c(*datatype),
                    simgrid::smpi::Op::f2c(*op), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -268,7 +268,7 @@ void mpi_ialltoall_(void* sendbuf, int* sendcount, int* sendtype,
   *ierr = MPI_Ialltoall(sendbuf, *sendcount, simgrid::smpi::Datatype::f2c(*sendtype),
                        recvbuf, *recvcount, simgrid::smpi::Datatype::f2c(*recvtype), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -279,7 +279,7 @@ void mpi_ialltoallv_(void* sendbuf, int* sendcounts, int* senddisps, int* sendty
   *ierr = MPI_Ialltoallv(sendbuf, sendcounts, senddisps, simgrid::smpi::Datatype::f2c(*sendtype),
                        recvbuf, recvcounts, recvdisps, simgrid::smpi::Datatype::f2c(*recvtype), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -291,7 +291,7 @@ void mpi_ireduce_scatter_block_ (void *sendbuf, void *recvbuf, int* recvcount, i
  *ierr = MPI_Ireduce_scatter_block(sendbuf, recvbuf, *recvcount, simgrid::smpi::Datatype::f2c(*datatype), simgrid::smpi::Op::f2c(*op),
                                   simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -310,7 +310,7 @@ void mpi_ialltoallw_ ( void *sendbuf, int *sendcnts, int *sdispls, int* old_send
   *ierr   = MPI_Ialltoallw(sendbuf, sendcnts, sdispls, sendtypes.data(), recvbuf, recvcnts, rdispls, recvtypes.data(),
                          simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -319,7 +319,7 @@ void mpi_iexscan_ (void *sendbuf, void *recvbuf, int* count, int* datatype, int*
   sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
  *ierr = MPI_Iexscan(sendbuf, recvbuf, *count, simgrid::smpi::Datatype::f2c(*datatype), simgrid::smpi::Op::f2c(*op), simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
index c769b62..a540c6d 100644 (file)
@@ -25,7 +25,7 @@ void mpi_comm_dup_(int* comm, int* newcomm, int* ierr) {
 
   *ierr = MPI_Comm_dup(simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newcomm = tmp->add_f();
+    *newcomm = tmp->c2f();
   }
 }
 
@@ -33,7 +33,7 @@ void mpi_comm_create_(int* comm, int* group, int* newcomm, int* ierr) {
   MPI_Comm tmp;
   *ierr = MPI_Comm_create(simgrid::smpi::Comm::f2c(*comm),simgrid::smpi::Group::f2c(*group), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newcomm = tmp->add_f();
+    *newcomm = tmp->c2f();
   }
 }
 
@@ -51,7 +51,7 @@ void mpi_comm_split_(int* comm, int* color, int* key, int* comm_out, int* ierr)
 
   *ierr = MPI_Comm_split(simgrid::smpi::Comm::f2c(*comm), *color, *key, &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *comm_out = tmp->add_f();
+    *comm_out = tmp->c2f();
   }
 }
 
@@ -156,7 +156,7 @@ void mpi_comm_dup_with_info_ (int* comm, int* info, int* newcomm, int* ierr){
   MPI_Comm tmp;
   *ierr = MPI_Comm_dup_with_info(simgrid::smpi::Comm::f2c(*comm), simgrid::smpi::Info::f2c(*info),&tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newcomm = tmp->add_f();
+    *newcomm = tmp->c2f();
   }
 }
 
@@ -164,7 +164,7 @@ void mpi_comm_split_type_ (int* comm, int* split_type, int* key, int* info, int*
   MPI_Comm tmp;
   *ierr = MPI_Comm_split_type(simgrid::smpi::Comm::f2c(*comm), *split_type, *key, simgrid::smpi::Info::f2c(*info), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newcomm = tmp->add_f();
+    *newcomm = tmp->c2f();
   }
 }
 
@@ -196,7 +196,7 @@ void mpi_comm_connect_ ( char *port_name, int* info, int* root, int* comm, int*n
   MPI_Comm tmp;
   *ierr = MPI_Comm_connect( port_name, simgrid::smpi::Info::f2c(*info), *root, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newcomm = tmp->add_f();
+    *newcomm = tmp->c2f();
   }
 }
 
@@ -204,7 +204,7 @@ void mpi_comm_join_ ( int* fd, int* intercomm, int* ierr){
   MPI_Comm tmp;
   *ierr = MPI_Comm_join( *fd, &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *intercomm = tmp->add_f();
+    *intercomm = tmp->c2f();
   }
 }
 
@@ -213,7 +213,7 @@ void mpi_comm_accept_ ( char *port_name, int* info, int* root, int* comm, int*ne
   MPI_Comm tmp;
   *ierr = MPI_Comm_accept( port_name, simgrid::smpi::Info::f2c(*info), *root, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newcomm = tmp->add_f();
+    *newcomm = tmp->c2f();
   }
 }
 
@@ -223,7 +223,7 @@ void mpi_comm_spawn_ ( char *command, char *argv, int* maxprocs, int* info, int*
   *ierr = MPI_Comm_spawn( command, &argv, *maxprocs, simgrid::smpi::Info::f2c(*info), *root, simgrid::smpi::Comm::f2c(*comm), &tmp,
                           array_of_errcodes);
   if(*ierr == MPI_SUCCESS) {
-    *intercomm = tmp->add_f();
+    *intercomm = tmp->c2f();
   }
 }
 
@@ -234,7 +234,7 @@ void mpi_comm_spawn_multiple_ ( int* count, char *array_of_commands, char** arra
  *ierr = MPI_Comm_spawn_multiple(* count, &array_of_commands, &array_of_argv, array_of_maxprocs,
  reinterpret_cast<MPI_Info*>(array_of_info), *root, simgrid::smpi::Comm::f2c(*comm), &tmp, array_of_errcodes);
  if(*ierr == MPI_SUCCESS) {
-   *intercomm = tmp->add_f();
+   *intercomm = tmp->c2f();
  }
 }
 
index 46c05c6..ac487ba 100644 (file)
@@ -26,7 +26,7 @@ void mpi_file_open_ ( int* comm, char* filename, int* amode, int* info, int* fh,
   MPI_File tmp;
   *ierr= MPI_File_open(simgrid::smpi::Comm::f2c(*comm), filename, *amode, simgrid::smpi::Info::f2c(*info), &tmp);
   if (*ierr == MPI_SUCCESS) {
-    *fh = tmp->add_f();
+    *fh = tmp->c2f();
   }
 }
 
index dcfb617..f2770e3 100644 (file)
@@ -17,7 +17,7 @@ void mpi_send_init_(void *buf, int* count, int* datatype, int* dst, int* tag, in
   buf = static_cast<char *>(FORT_BOTTOM(buf));
   *ierr = MPI_Send_init(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dst, *tag, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS && req != nullptr) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -27,7 +27,7 @@ void mpi_isend_(void *buf, int* count, int* datatype, int* dst, int* tag, int* c
   buf = static_cast<char *>(FORT_BOTTOM(buf));
   *ierr = MPI_Isend(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dst, *tag, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS && req != nullptr) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -37,7 +37,7 @@ void mpi_irsend_(void *buf, int* count, int* datatype, int* dst, int* tag, int*
   buf = static_cast<char *>(FORT_BOTTOM(buf));
   *ierr = MPI_Irsend(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dst, *tag, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS && req != nullptr) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -65,7 +65,7 @@ void mpi_recv_init_(void *buf, int* count, int* datatype, int* src, int* tag, in
   buf = static_cast<char *>( FORT_BOTTOM(buf));
   *ierr = MPI_Recv_init(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *src, *tag, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -75,7 +75,7 @@ void mpi_irecv_(void *buf, int* count, int* datatype, int* src, int* tag, int* c
   buf = static_cast<char *>( FORT_BOTTOM(buf));
   *ierr = MPI_Irecv(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *src, *tag, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS && req != nullptr) {
-    *request = req->add_f();
+    *request = req->c2f();
   }
 }
 
@@ -100,7 +100,7 @@ void mpi_ssend_init_ (void* buf, int* count, int* datatype, int* dest, int* tag,
   *request = MPI_FORTRAN_REQUEST_NULL;
   *ierr = MPI_Ssend_init(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dest, *tag, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS && tmp != nullptr) {
-    *request = tmp->add_f();
+    *request = tmp->c2f();
   }
 }
 
@@ -113,7 +113,7 @@ void mpi_bsend_init_ (void* buf, int* count, int* datatype, int *dest, int* tag,
   *request = MPI_FORTRAN_REQUEST_NULL;
   *ierr = MPI_Bsend_init(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dest, *tag, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS && tmp != nullptr) {
-    *request = tmp->add_f();
+    *request = tmp->c2f();
   }
 }
 
@@ -122,7 +122,7 @@ void mpi_ibsend_ (void* buf, int* count, int* datatype, int *dest, int* tag, int
   *request = MPI_FORTRAN_REQUEST_NULL;
   *ierr = MPI_Ibsend(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dest, *tag, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS && tmp != nullptr) {
-    *request = tmp->add_f();
+    *request = tmp->c2f();
   }
 }
 
@@ -131,7 +131,7 @@ void mpi_issend_ (void* buf, int* count, int* datatype, int *dest, int* tag, int
   *request = MPI_FORTRAN_REQUEST_NULL;
   *ierr = MPI_Issend(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dest, *tag, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS && tmp != nullptr) {
-    *request = tmp->add_f();
+    *request = tmp->c2f();
   }
 }
 
@@ -140,7 +140,7 @@ void mpi_rsend_init_ (void* buf, int* count, int* datatype, int *dest, int* tag,
   *request = MPI_FORTRAN_REQUEST_NULL;
   *ierr = MPI_Rsend_init(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dest, *tag, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS && tmp != nullptr) {
-    *request = tmp->add_f();
+    *request = tmp->c2f();
   }
 }
 
index 91d7fa2..cf0a54d 100644 (file)
@@ -40,7 +40,7 @@ void mpi_type_dup_ (int*  datatype, int* newdatatype, int* ierr){
  MPI_Datatype tmp;
  *ierr = MPI_Type_dup(simgrid::smpi::Datatype::f2c(*datatype), &tmp);
  if(*ierr == MPI_SUCCESS) {
-   *newdatatype = tmp->add_f();
+   *newdatatype = tmp->c2f();
  }
 }
 
@@ -102,7 +102,7 @@ void mpi_type_contiguous_ (int* count, int* old_type, int*  newtype, int* ierr)
   MPI_Datatype tmp;
   *ierr = MPI_Type_contiguous(*count, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -110,7 +110,7 @@ void mpi_type_vector_(int* count, int* blocklen, int* stride, int* old_type, int
   MPI_Datatype tmp;
   *ierr= MPI_Type_vector(*count, *blocklen, *stride, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -118,7 +118,7 @@ void mpi_type_hvector_(int* count, int* blocklen, MPI_Aint* stride, int* old_typ
   MPI_Datatype tmp;
   *ierr= MPI_Type_hvector (*count, *blocklen, *stride, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -126,7 +126,7 @@ void mpi_type_create_hvector_(int* count, int* blocklen, MPI_Aint* stride, int*
   MPI_Datatype tmp;
   *ierr= MPI_Type_hvector(*count, *blocklen, *stride, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -137,7 +137,7 @@ void mpi_type_hindexed_ (int* count, int* blocklens, int* indices, int* old_type
     indices_aint[i]=indices[i];
   *ierr = MPI_Type_hindexed(*count, blocklens, indices_aint.data(), simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -145,7 +145,7 @@ void mpi_type_create_hindexed_(int* count, int* blocklens, MPI_Aint* indices, in
   MPI_Datatype tmp;
   *ierr = MPI_Type_create_hindexed(*count, blocklens, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -154,7 +154,7 @@ void mpi_type_create_hindexed_block_ (int* count, int* blocklength, MPI_Aint* in
   MPI_Datatype tmp;
   *ierr = MPI_Type_create_hindexed_block(*count, *blocklength, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -162,7 +162,7 @@ void mpi_type_indexed_ (int* count, int* blocklens, int* indices, int* old_type,
   MPI_Datatype tmp;
   *ierr = MPI_Type_indexed(*count, blocklens, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -170,7 +170,7 @@ void mpi_type_create_indexed_(int* count, int* blocklens, int* indices, int* old
   MPI_Datatype tmp;
   *ierr = MPI_Type_create_indexed(*count, blocklens, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -179,7 +179,7 @@ void mpi_type_create_indexed_block_ (int* count, int* blocklength, int* indices,
   MPI_Datatype tmp;
   *ierr = MPI_Type_create_indexed_block(*count, *blocklength, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -193,7 +193,7 @@ void mpi_type_struct_ (int* count, int* blocklens, int* indices, int* old_types,
   }
   *ierr = MPI_Type_struct(*count, blocklens, indices_aint.data(), types.data(), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -205,7 +205,7 @@ void mpi_type_create_struct_(int* count, int* blocklens, MPI_Aint* indices, int*
   }
   *ierr = MPI_Type_create_struct(*count, blocklens, indices, types.data(), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -254,7 +254,7 @@ void mpi_type_create_darray_ (int* size, int* rank, int* ndims, int* array_of_gs
   array_of_distribs,  array_of_dargs,  array_of_psizes,
   *order,  simgrid::smpi::Datatype::f2c(*oldtype), &tmp) ;
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -262,7 +262,7 @@ void mpi_type_create_resized_ (int* oldtype,MPI_Aint* lb, MPI_Aint* extent, int*
   MPI_Datatype tmp;
   *ierr = MPI_Type_create_resized(simgrid::smpi::Datatype::f2c(*oldtype),*lb, *extent, &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }
 
@@ -272,7 +272,7 @@ void mpi_type_create_subarray_ (int* ndims,int *array_of_sizes, int *array_of_su
   *ierr = MPI_Type_create_subarray(*ndims,array_of_sizes, array_of_subsizes, array_of_starts, *order,
                                    simgrid::smpi::Datatype::f2c(*oldtype), &tmp);
   if(*ierr == MPI_SUCCESS) {
-    *newtype = tmp->add_f();
+    *newtype = tmp->c2f();
   }
 }