Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please codefactor
authorAugustin Degomme <adegomme@gmail.com>
Mon, 9 Dec 2019 14:19:26 +0000 (15:19 +0100)
committerAugustin Degomme <adegomme@gmail.com>
Mon, 9 Dec 2019 14:19:26 +0000 (15:19 +0100)
13 files changed:
src/smpi/bindings/smpi_f77_coll.cpp
src/smpi/bindings/smpi_f77_comm.cpp
src/smpi/bindings/smpi_f77_type.cpp
src/smpi/bindings/smpi_pmpi_coll.cpp
src/smpi/bindings/smpi_pmpi_file.cpp
src/smpi/bindings/smpi_pmpi_group.cpp
src/smpi/include/smpi_actor.hpp
src/smpi/include/smpi_errhandler.hpp
src/smpi/include/smpi_group.hpp
src/smpi/internals/smpi_bench.cpp
src/smpi/internals/smpi_config.cpp
src/smpi/mpi/smpi_group.cpp
src/smpi/plugins/sampi_loadbalancer.cpp

index 761ed29..a738af2 100644 (file)
@@ -105,7 +105,6 @@ void mpi_alltoallv_(void* sendbuf, int* sendcounts, int* senddisps, int* sendtyp
 }
 
 void mpi_reduce_local_ (void *inbuf, void *inoutbuf, int* count, int* datatype, int* op, int* ierr){
 }
 
 void mpi_reduce_local_ (void *inbuf, void *inoutbuf, int* count, int* datatype, int* op, int* ierr){
-
  *ierr = MPI_Reduce_local(inbuf, inoutbuf, *count, simgrid::smpi::Datatype::f2c(*datatype), simgrid::smpi::Op::f2c(*op));
 }
 
  *ierr = MPI_Reduce_local(inbuf, inoutbuf, *count, simgrid::smpi::Datatype::f2c(*datatype), simgrid::smpi::Op::f2c(*op));
 }
 
index afca786..f1df813 100644 (file)
@@ -29,7 +29,6 @@ void mpi_comm_dup_(int* comm, int* newcomm, int* ierr) {
 
 void mpi_comm_create_(int* comm, int* group, int* newcomm, int* ierr) {
   MPI_Comm tmp;
 
 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();
   *ierr = MPI_Comm_create(simgrid::smpi::Comm::f2c(*comm),simgrid::smpi::Group::f2c(*group), &tmp);
   if(*ierr == MPI_SUCCESS) {
     *newcomm = tmp->add_f();
@@ -56,7 +55,6 @@ void mpi_comm_split_(int* comm, int* color, int* key, int* comm_out, int* ierr)
 
 void mpi_comm_group_(int* comm, int* group_out,  int* ierr) {
   MPI_Group tmp;
 
 void mpi_comm_group_(int* comm, int* group_out,  int* ierr) {
   MPI_Group tmp;
-
   *ierr = MPI_Comm_group(simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS) {
     *group_out = tmp->c2f();
   *ierr = MPI_Comm_group(simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS) {
     *group_out = tmp->c2f();
@@ -85,7 +83,6 @@ void mpi_comm_set_attr_ (int* comm, int* comm_keyval, int *attribute_val, int* i
 }
 
 void mpi_comm_delete_attr_ (int* comm, int* comm_keyval, int* ierr){
 }
 
 void mpi_comm_delete_attr_ (int* comm, int* comm_keyval, int* ierr){
-
  *ierr = MPI_Comm_delete_attr (simgrid::smpi::Comm::f2c(*comm),  *comm_keyval);
 }
 
  *ierr = MPI_Comm_delete_attr (simgrid::smpi::Comm::f2c(*comm),  *comm_keyval);
 }
 
@@ -106,7 +103,6 @@ void mpi_comm_get_name_ (int* comm, char* name, int* len, int* ierr){
 }
 
 void mpi_comm_compare_ (int* comm1, int* comm2, int *result, int* ierr){
 }
 
 void mpi_comm_compare_ (int* comm1, int* comm2, int *result, int* ierr){
-
  *ierr = MPI_Comm_compare(simgrid::smpi::Comm::f2c(*comm1), simgrid::smpi::Comm::f2c(*comm2), result);
 }
 
  *ierr = MPI_Comm_compare(simgrid::smpi::Comm::f2c(*comm1), simgrid::smpi::Comm::f2c(*comm2), result);
 }
 
index e7207ff..aefbf60 100644 (file)
@@ -70,7 +70,6 @@ void mpi_type_set_attr_ (int* type, int* type_keyval, int *attribute_val, int* i
 }
 
 void mpi_type_delete_attr_ (int* type, int* type_keyval, int* ierr){
 }
 
 void mpi_type_delete_attr_ (int* type, int* type_keyval, int* ierr){
-
  *ierr = MPI_Type_delete_attr ( simgrid::smpi::Datatype::f2c(*type),  *type_keyval);
 }
 
  *ierr = MPI_Type_delete_attr ( simgrid::smpi::Datatype::f2c(*type),  *type_keyval);
 }
 
@@ -90,7 +89,6 @@ void mpi_type_get_extent_ (int* datatype, MPI_Aint * lb, MPI_Aint * extent, int*
 }
 
 void mpi_type_get_true_extent_ (int* datatype, MPI_Aint * lb, MPI_Aint * extent, int* ierr){
 }
 
 void mpi_type_get_true_extent_ (int* datatype, MPI_Aint * lb, MPI_Aint * extent, int* ierr){
-
  *ierr = MPI_Type_get_true_extent(simgrid::smpi::Datatype::f2c(*datatype), lb, extent);
 }
 
  *ierr = MPI_Type_get_true_extent(simgrid::smpi::Datatype::f2c(*datatype), lb, extent);
 }
 
@@ -290,6 +288,4 @@ void mpi_type_match_size_ (int* typeclass,int* size,int* datatype, int* ierr){
     *datatype = tmp->c2f();
   }
 }
     *datatype = tmp->c2f();
   }
 }
-
-
 }
 }
index 62b46a8..446501d 100644 (file)
@@ -488,7 +488,6 @@ int PMPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype d
 
 int PMPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request)
 {
 
 int PMPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request)
 {
-
   CHECK_COMM(6)
   CHECK_BUFFER(1, sendbuf, count)
   CHECK_BUFFER(2, recvbuf, count)
   CHECK_COMM(6)
   CHECK_BUFFER(1, sendbuf, count)
   CHECK_BUFFER(2, recvbuf, count)
index 6a1b633..d8a1ceb 100644 (file)
@@ -75,7 +75,6 @@ int PMPI_File_seek(MPI_File fh, MPI_Offset offset, int whence){
   int ret = fh->seek(offset,whence);
   smpi_bench_begin();
   return ret;
   int ret = fh->seek(offset,whence);
   smpi_bench_begin();
   return ret;
-
 }
 
 int PMPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence){
 }
 
 int PMPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence){
@@ -84,7 +83,6 @@ int PMPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence){
   int ret = fh->seek_shared(offset,whence);
   smpi_bench_begin();
   return ret;
   int ret = fh->seek_shared(offset,whence);
   smpi_bench_begin();
   return ret;
-
 }
 
 int PMPI_File_get_position(MPI_File fh, MPI_Offset* offset){
 }
 
 int PMPI_File_get_position(MPI_File fh, MPI_Offset* offset){
index e038ca7..197b283 100644 (file)
@@ -81,7 +81,6 @@ int PMPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result)
 
 int PMPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
 {
 
 int PMPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
 {
-
   if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
     return MPI_ERR_GROUP;
   } else if (newgroup == nullptr) {
   if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
     return MPI_ERR_GROUP;
   } else if (newgroup == nullptr) {
@@ -93,7 +92,6 @@ int PMPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
 
 int PMPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
 {
 
 int PMPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
 {
-
   if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
     return MPI_ERR_GROUP;
   } else if (newgroup == nullptr) {
   if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
     return MPI_ERR_GROUP;
   } else if (newgroup == nullptr) {
index de11f68..c35535b 100644 (file)
@@ -45,6 +45,7 @@ class ActorExt {
   int papi_event_set_;
   papi_counter_t papi_counter_data_;
 #endif
   int papi_event_set_;
   papi_counter_t papi_counter_data_;
 #endif
+
 public:
   static simgrid::xbt::Extension<simgrid::s4u::Actor, ActorExt> EXTENSION_ID;
 
 public:
   static simgrid::xbt::Extension<simgrid::s4u::Actor, ActorExt> EXTENSION_ID;
 
index 61750ed..e08e91f 100644 (file)
@@ -30,10 +30,8 @@ class Errhandler: public F2C {
   void call(MPI_File file, int errorcode);
   static void unref(Errhandler* errhandler);
   static Errhandler* f2c(int id);
   void call(MPI_File file, int errorcode);
   static void unref(Errhandler* errhandler);
   static Errhandler* f2c(int id);
-
 };
 };
-  
 }
 }
 
 }
 }
 
-#endif
\ No newline at end of file
+#endif
index c0fa3fe..e82bedc 100644 (file)
@@ -25,6 +25,7 @@ class Group : public F2C{
   std::vector<int> index_to_rank_map_;
 
   int refcount_ = 1; /* refcount_: start > 0 so that this group never gets freed */
   std::vector<int> index_to_rank_map_;
 
   int refcount_ = 1; /* refcount_: start > 0 so that this group never gets freed */
+
 public:
   Group() = default;
   explicit Group(int size) : size_(size), rank_to_actor_map_(size, nullptr), index_to_rank_map_(size, MPI_UNDEFINED) {}
 public:
   Group() = default;
   explicit Group(int size) : size_(size), rank_to_actor_map_(size, nullptr), index_to_rank_map_(size, MPI_UNDEFINED) {}
index 6c326fa..d32f115 100644 (file)
@@ -108,7 +108,6 @@ void smpi_bench_begin()
 double smpi_adjust_comp_speed(){
   double speedup=1;
   if (smpi_cfg_comp_adjustment_file()[0] != '\0') {
 double smpi_adjust_comp_speed(){
   double speedup=1;
   if (smpi_cfg_comp_adjustment_file()[0] != '\0') {
-
     smpi_trace_call_location_t* loc                            = smpi_process()->call_location();
     std::string key                                            = loc->get_composed_key();
     std::unordered_map<std::string, double>::const_iterator it = location2speedup.find(key);
     smpi_trace_call_location_t* loc                            = smpi_process()->call_location();
     std::string key                                            = loc->get_composed_key();
     std::unordered_map<std::string, double>::const_iterator it = location2speedup.find(key);
index 2c2a4d2..bdf5327 100644 (file)
@@ -246,7 +246,6 @@ void smpi_init_options(){
   simgrid::config::alias("smpi/privatization", {"smpi/privatize_global_variables", "smpi/privatize-global-variables"});
   simgrid::config::alias("smpi/reduce_scatter", {"smpi/reduce-scatter"});
   _smpi_options_initialized=true;
   simgrid::config::alias("smpi/privatization", {"smpi/privatize_global_variables", "smpi/privatize-global-variables"});
   simgrid::config::alias("smpi/reduce_scatter", {"smpi/reduce-scatter"});
   _smpi_options_initialized=true;
-
 }
 
 void smpi_check_options()
 }
 
 void smpi_check_options()
index 00d32b2..14d1ff4 100644 (file)
@@ -219,7 +219,6 @@ int Group::excl(int n, const int *ranks, MPI_Group * newgroup){
   }
   delete[] to_exclude;
   return MPI_SUCCESS;
   }
   delete[] to_exclude;
   return MPI_SUCCESS;
-
 }
 
 static bool is_rank_in_range(int rank, int first, int last)
 }
 
 static bool is_rank_in_range(int rank, int first, int last)
index 7e09b46..5e928f2 100644 (file)
@@ -137,7 +137,6 @@ void sg_load_balancer_plugin_init()
   if (!done) {
     done = true;
     simgrid::s4u::Exec::on_completion.connect([](simgrid::s4u::Actor const& actor, simgrid::s4u::Exec const& exec) {
   if (!done) {
     done = true;
     simgrid::s4u::Exec::on_completion.connect([](simgrid::s4u::Actor const& actor, simgrid::s4u::Exec const& exec) {
-
       simgrid::smpi::plugin::lb.record_actor_computation(actor, exec.get_cost());
     });
 
       simgrid::smpi::plugin::lb.record_actor_computation(actor, exec.get_cost());
     });