Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics (codefactor+coding style)
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 8 Dec 2019 14:19:55 +0000 (15:19 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 8 Dec 2019 14:24:12 +0000 (15:24 +0100)
15 files changed:
.appveyor.yml
.circleci/config.yml
.readthedocs.yml
.travis.yml
MANIFEST.in
src/kernel/activity/CommImpl.cpp
src/kernel/lmm/maxmin.cpp
src/mc/compare.cpp
src/simix/smx_global.cpp
src/smpi/bindings/smpi_f77.cpp
src/smpi/bindings/smpi_pmpi_win.cpp
src/smpi/internals/smpi_global.cpp
src/smpi/internals/smpi_shared.cpp
src/smpi/mpi/smpi_request.cpp
src/surf/xml/surfxml_sax_cb.cpp

index 4b0611a..3203180 100644 (file)
@@ -31,7 +31,7 @@ install:
 # This package is so outdated and broken that we cannot use it anymore. So we build without perl
 # - choco install --limit-output strawberryperl --version 5.20.1.1
 # - SET PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
-# Lua 
+# Lua
 #- choco install lua53
 # We need python v3
 - cmd: SET PATH=C:\Python37-x64;%PATH% # We need python v3
index 9289a30..b9d6b19 100644 (file)
@@ -1,7 +1,7 @@
 # This is the configuration file for the https://circleci.com/ continuous integration server
 #
 # Copyright (c) 2017-2019. The SimGrid team. All rights reserved.
-# 
+#
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
index ec93a97..93ac3bb 100644 (file)
@@ -1,5 +1,5 @@
 # Path to the pip requirements file
 requirements_file: docs/requirements.txt
-    
+   
 # Don't build any extra formats
 formats: []
\ No newline at end of file
index 075e11e..d1d6767 100644 (file)
@@ -1,6 +1,6 @@
 # NS3 is disabled because the version in ubuntu precise does not lead
 # to the same timings (precision error?)
-# Reenable with 
+# Reenable with
 #   cmake -Denable_ns3
 #   apt-get libns3-dev ns3
 #
@@ -9,7 +9,7 @@ dist: bionic
 language: cpp
 compiler:
    - gcc
-#  - clang 
+#  - clang
 jdk:
    - openjdk11
 addons:
index de6d8e7..cd3d19a 100644 (file)
@@ -1978,7 +1978,6 @@ include include/simgrid/simix.hpp
 include include/simgrid/simix/blocking_simcall.hpp
 include include/simgrid/smpi/replay.hpp
 include include/simgrid/storage.h
-include include/simgrid/version.h
 include include/simgrid/version.h.in
 include include/simgrid/vm.h
 include include/simgrid/zone.h
index 769c8e6..e6cc960 100644 (file)
@@ -121,7 +121,6 @@ XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_irecv(
   simgrid::kernel::activity::CommImplPtr other_comm;
   // communication already done, get it inside the list of completed comms
   if (mbox->permanent_receiver_ != nullptr && not mbox->done_comm_queue_.empty()) {
-
     XBT_DEBUG("We have a comm that has probably already been received, trying to match it, to skip the communication");
     // find a match in the list of already received comms
     other_comm = mbox->find_matching_comm(simgrid::kernel::activity::CommImpl::Type::SEND, match_fun, data,
@@ -430,7 +429,6 @@ CommImpl* CommImpl::start()
 {
   /* If both the sender and the receiver are already there, start the communication */
   if (state_ == State::READY) {
-
     s4u::Host* sender   = src_actor_->get_host();
     s4u::Host* receiver = dst_actor_->get_host();
 
@@ -611,7 +609,6 @@ void CommImpl::finish()
       simcall->issuer_->context_->iwannadie = true;
     } else {
       switch (state_) {
-
         case State::DONE:
           XBT_DEBUG("Communication %p complete!", this);
           copy_data();
index 4168178..96cc184 100644 (file)
@@ -669,7 +669,6 @@ template <class CnstList> void System::lmm_solve(CnstList& cnst_list)
     }
 
     saturated_variable_set_update(cnst_light_tab, saturated_constraints, this);
-
   } while (cnst_light_num > 0);
 
   modified_ = false;
@@ -681,7 +680,6 @@ template <class CnstList> void System::lmm_solve(CnstList& cnst_list)
   }
 
   check_concurrency();
-
 }
 
 /** @brief Attribute the value bound to var->bound.
@@ -806,7 +804,6 @@ void System::on_disabled_var(Constraint* cnstr)
 
   // Cannot use foreach loop, because System::enable_var() will modify disabled_element_set.. within the loop
   while (numelem-- && elem) {
-
     Element* nextelem;
     if (elem->disabled_element_set_hook.is_linked()) {
       auto iter = std::next(cnstr->disabled_element_set_.iterator_to(*elem));
@@ -957,6 +954,7 @@ int Constraint::get_variable_amount() const
   return std::count_if(std::begin(enabled_element_set_), std::end(enabled_element_set_),
                        [](const Element& elem) { return elem.consumption_weight > 0; });
 }
-}
-}
-}
+
+} // namespace lmm
+} // namespace kernel
+} // namespace simgrid
index ca257f8..4bf2cb2 100644 (file)
@@ -243,7 +243,6 @@ static bool mmalloc_heap_differ(simgrid::mc::StateComparator& state, const simgr
       snapshot2.read<malloc_info*>(RemotePtr<malloc_info*>((std::uint64_t)heapinfo_address));
 
   while (i1 < state.heaplimit) {
-
     const malloc_info* heapinfo1 =
         (const malloc_info*)heap_region1->read(&heapinfo_temp1, &heapinfos1[i1], sizeof(malloc_info));
     const malloc_info* heapinfo2 =
@@ -258,8 +257,7 @@ static bool mmalloc_heap_differ(simgrid::mc::StateComparator& state, const simgr
 
     void* addr_block1 = ((void*)(((ADDR2UINT(i1)) - 1) * BLOCKSIZE + (char*)state.std_heap_copy.heapbase));
 
-    if (heapinfo1->type == MMALLOC_TYPE_UNFRAGMENTED) {       /* Large block */
-
+    if (heapinfo1->type == MMALLOC_TYPE_UNFRAGMENTED) { /* Large block */
       if (is_stack(addr_block1)) {
         for (size_t k = 0; k < heapinfo1->busy_block.size; k++)
           state.equals_to_<1>(i1 + k, 0) = HeapArea(i1, -1);
@@ -291,7 +289,6 @@ static bool mmalloc_heap_differ(simgrid::mc::StateComparator& state, const simgr
       }
 
       while (i2 < state.heaplimit && not equal) {
-
         void* addr_block2 = (ADDR2UINT(i2) - 1) * BLOCKSIZE + (char*)state.std_heap_copy.heapbase;
 
         if (i2 == i1) {
@@ -353,7 +350,6 @@ static bool mmalloc_heap_differ(simgrid::mc::StateComparator& state, const simgr
         }
 
         while (i2 < state.heaplimit && not equal) {
-
           const malloc_info* heapinfo2b =
               (const malloc_info*)heap_region2->read(&heapinfo_temp2b, &heapinfos2[i2], sizeof(malloc_info));
 
@@ -371,7 +367,6 @@ static bool mmalloc_heap_differ(simgrid::mc::StateComparator& state, const simgr
           xbt_assert(heapinfo2b->type >= 0, "Unkown mmalloc block type: %d", heapinfo2b->type);
 
           for (size_t j2 = 0; j2 < (size_t)(BLOCKSIZE >> heapinfo2b->type); j2++) {
-
             if (i2 == i1 && j2 == j1)
               continue;
 
@@ -467,7 +462,6 @@ static bool heap_area_differ_without_type(simgrid::mc::StateComparator& state, c
   simgrid::mc::Region* heap_region2  = MC_get_heap_region(snapshot2);
 
   for (int i = 0; i < size; ) {
-
     if (check_ignore > 0) {
       ssize_t ignore1 = heap_comparison_ignore_size(state.processStates[0].to_ignore, (const char*)real_area1 + i);
       if (ignore1 != -1) {
@@ -486,7 +480,6 @@ static bool heap_area_differ_without_type(simgrid::mc::StateComparator& state, c
 
     if (MC_snapshot_region_memcmp((const char*)real_area1 + i, heap_region1, (const char*)real_area2 + i, heap_region2,
                                   1) != 0) {
-
       int pointer_align = (i / sizeof(void *)) * sizeof(void *);
       const void* addr_pointed1 = snapshot1.read(remote((void* const*)((const char*)real_area1 + pointer_align)));
       const void* addr_pointed2 = snapshot2.read(remote((void* const*)((const char*)real_area2 + pointer_align)));
@@ -705,13 +698,11 @@ static bool heap_area_differ_with_type(simgrid::mc::StateComparator& state, cons
 static simgrid::mc::Type* get_offset_type(void* real_base_address, simgrid::mc::Type* type, int offset, int area_size,
                                           const simgrid::mc::Snapshot& snapshot)
 {
-
   // Beginning of the block, the inferred variable type if the type of the block:
   if (offset == 0)
     return type;
 
   switch (type->type) {
-
   case DW_TAG_structure_type:
   case DW_TAG_class_type:
     if (type->full_type)
@@ -739,7 +730,6 @@ static simgrid::mc::Type* get_offset_type(void* real_base_address, simgrid::mc::
   default:
     /* FIXME: other cases ? */
     return nullptr;
-
   }
 }
 
@@ -828,7 +818,6 @@ static bool heap_area_differ(simgrid::mc::StateComparator& state, const void* ar
       type_size = -1;
     else
       type_size = type->byte_size;
-
   }
 
   simgrid::mc::Region* heap_region1 = MC_get_heap_region(snapshot1);
@@ -897,7 +886,6 @@ static bool heap_area_differ(simgrid::mc::StateComparator& state, const void* ar
       check_ignore = heapinfo1->busy_block.ignore;
 
   } else if ((heapinfo1->type > 0) && (heapinfo2->type > 0)) {      /* Fragmented block */
-
     // Fragment number:
     ssize_t frag1 = ((uintptr_t)(ADDR2UINT(area1) % (BLOCKSIZE))) >> heapinfo1->type;
     ssize_t frag2 = ((uintptr_t)(ADDR2UINT(area2) % (BLOCKSIZE))) >> heapinfo2->type;
@@ -955,7 +943,6 @@ static bool heap_area_differ(simgrid::mc::StateComparator& state, const void* ar
     }
     // Type inference from the block type.
     else if (state.types_<1>(block1, frag1) != nullptr || state.types_<2>(block2, frag2) != nullptr) {
-
       offset1 = (char*)area1 - (char*)real_addr_frag1;
       offset2 = (char*)area2 - (char*)real_addr_frag2;
 
@@ -1136,7 +1123,6 @@ static bool areas_differ_with_type(simgrid::mc::StateComparator& state, const vo
           return areas_differ_with_type(state, addr_pointed1, snapshot1, region1, addr_pointed2, snapshot2, region2,
                                         type->subtype, pointer_level);
       } else {
-
         // TODO, We do not handle very well the case where
         // it belongs to a different (non-heap) region from the current one.
 
@@ -1174,7 +1160,6 @@ static bool global_variables_differ(simgrid::mc::StateComparator& state, simgrid
   const std::vector<simgrid::mc::Variable>& variables = object_info->global_variables;
 
   for (simgrid::mc::Variable const& current_var : variables) {
-
     // If the variable is not in this object, skip it:
     // We do not expect to find a pointer to something which is not reachable
     // by the global variables.
index 48b3dca..a3fc1e9 100644 (file)
@@ -514,11 +514,9 @@ void SIMIX_run()
 
     XBT_DEBUG("### time %f, #processes %zu, #to_run %zu", time, simix_global->process_list.size(),
               simix_global->actors_to_run.size());
-
   } while (time > -1.0 || not simix_global->actors_to_run.empty());
 
   if (not simix_global->process_list.empty()) {
-
     if (simix_global->process_list.size() <= simix_global->daemons.size()) {
       XBT_CRITICAL("Oops! Daemon actors cannot do any blocking activity (communications, synchronization, etc) "
                    "once the simulation is over. Please fix your on_exit() functions.");
@@ -565,7 +563,6 @@ void SIMIX_display_process_status()
     simgrid::kernel::actor::ActorImpl* actor = kv.second;
 
     if (actor->waiting_synchro) {
-
       const char* synchro_description = "unknown";
       // we don't care about the Activity type to get its name, use RawImpl
       const char* name =
index ad939da..beea76c 100644 (file)
 
 static int running_processes = 0;
 
-void smpi_init_fortran_types(){
-   if(simgrid::smpi::F2C::lookup() == nullptr){
-     MPI_COMM_WORLD->add_f();
-     MPI_BYTE->add_f();//MPI_BYTE
-     MPI_CHAR->add_f();//MPI_CHARACTER
-     if(sizeof(void*)==8) {
-       MPI_C_BOOL->add_f();//MPI_LOGICAL
-       MPI_INT->add_f();//MPI_INTEGER
-     } else {
-       MPI_C_BOOL->add_f();//MPI_LOGICAL
-       MPI_LONG->add_f();//MPI_INTEGER
-     }
-     MPI_INT8_T->add_f();//MPI_INTEGER1
-     MPI_INT16_T->add_f();//MPI_INTEGER2
-     MPI_INT32_T->add_f();//MPI_INTEGER4
-     MPI_INT64_T->add_f();//MPI_INTEGER8
-     MPI_REAL->add_f();//MPI_REAL
-     MPI_REAL4->add_f();//MPI_REAL4
-     MPI_REAL8->add_f();//MPI_REAL8
-     MPI_DOUBLE->add_f();//MPI_DOUBLE_PRECISION
-     MPI_COMPLEX8->add_f();//MPI_COMPLEX
-     MPI_COMPLEX16->add_f();//MPI_DOUBLE_COMPLEX
-     if(sizeof(void*)==8)
-       MPI_2INT->add_f();//MPI_2INTEGER
-     else
-       MPI_2LONG->add_f();//MPI_2INTEGER
-     MPI_UINT8_T->add_f();//MPI_LOGICAL1
-     MPI_UINT16_T->add_f();//MPI_LOGICAL2
-     MPI_UINT32_T->add_f();//MPI_LOGICAL4
-     MPI_UINT64_T->add_f();//MPI_LOGICAL8
-     MPI_2FLOAT->add_f();//MPI_2REAL
-     MPI_2DOUBLE->add_f();//MPI_2DOUBLE_PRECISION
-     MPI_PTR->add_f();//MPI_AINT
-     MPI_OFFSET->add_f();//MPI_OFFSET
-     MPI_AINT->add_f();//MPI_COUNT
-     MPI_REAL16->add_f();//MPI_REAL16
-     MPI_PACKED->add_f();//MPI_PACKED
-     MPI_COMPLEX8->add_f();//MPI_COMPLEX8
-     MPI_COMPLEX16->add_f();//MPI_COMPLEX16
-     MPI_COMPLEX32->add_f();//MPI_COMPLEX32
-
-     MPI_MAX->add_f();
-     MPI_MIN->add_f();
-     MPI_MAXLOC->add_f();
-     MPI_MINLOC->add_f();
-     MPI_SUM->add_f();
-     MPI_PROD->add_f();
-     MPI_LAND->add_f();
-     MPI_LOR->add_f();
-     MPI_LXOR->add_f();
-     MPI_BAND->add_f();
-     MPI_BOR->add_f();
-     MPI_BXOR->add_f();
-
-     MPI_ERRORS_RETURN->add_f();
-     MPI_ERRORS_ARE_FATAL->add_f();
-   }
+void smpi_init_fortran_types()
+{
+  if (simgrid::smpi::F2C::lookup() == nullptr) {
+    MPI_COMM_WORLD->add_f();
+    MPI_BYTE->add_f(); // MPI_BYTE
+    MPI_CHAR->add_f(); // MPI_CHARACTER
+    if (sizeof(void*) == 8) {
+      MPI_C_BOOL->add_f(); // MPI_LOGICAL
+      MPI_INT->add_f();    // MPI_INTEGER
+    } else {
+      MPI_C_BOOL->add_f(); // MPI_LOGICAL
+      MPI_LONG->add_f();   // MPI_INTEGER
+    }
+    MPI_INT8_T->add_f();    // MPI_INTEGER1
+    MPI_INT16_T->add_f();   // MPI_INTEGER2
+    MPI_INT32_T->add_f();   // MPI_INTEGER4
+    MPI_INT64_T->add_f();   // MPI_INTEGER8
+    MPI_REAL->add_f();      // MPI_REAL
+    MPI_REAL4->add_f();     // MPI_REAL4
+    MPI_REAL8->add_f();     // MPI_REAL8
+    MPI_DOUBLE->add_f();    // MPI_DOUBLE_PRECISION
+    MPI_COMPLEX8->add_f();  // MPI_COMPLEX
+    MPI_COMPLEX16->add_f(); // MPI_DOUBLE_COMPLEX
+    if (sizeof(void*) == 8)
+      MPI_2INT->add_f(); // MPI_2INTEGER
+    else
+      MPI_2LONG->add_f();   // MPI_2INTEGER
+    MPI_UINT8_T->add_f();   // MPI_LOGICAL1
+    MPI_UINT16_T->add_f();  // MPI_LOGICAL2
+    MPI_UINT32_T->add_f();  // MPI_LOGICAL4
+    MPI_UINT64_T->add_f();  // MPI_LOGICAL8
+    MPI_2FLOAT->add_f();    // MPI_2REAL
+    MPI_2DOUBLE->add_f();   // MPI_2DOUBLE_PRECISION
+    MPI_PTR->add_f();       // MPI_AINT
+    MPI_OFFSET->add_f();    // MPI_OFFSET
+    MPI_AINT->add_f();      // MPI_COUNT
+    MPI_REAL16->add_f();    // MPI_REAL16
+    MPI_PACKED->add_f();    // MPI_PACKED
+    MPI_COMPLEX8->add_f();  // MPI_COMPLEX8
+    MPI_COMPLEX16->add_f(); // MPI_COMPLEX16
+    MPI_COMPLEX32->add_f(); // MPI_COMPLEX32
+
+    MPI_MAX->add_f();
+    MPI_MIN->add_f();
+    MPI_MAXLOC->add_f();
+    MPI_MINLOC->add_f();
+    MPI_SUM->add_f();
+    MPI_PROD->add_f();
+    MPI_LAND->add_f();
+    MPI_LOR->add_f();
+    MPI_LXOR->add_f();
+    MPI_BAND->add_f();
+    MPI_BOR->add_f();
+    MPI_BXOR->add_f();
+
+    MPI_ERRORS_RETURN->add_f();
+    MPI_ERRORS_ARE_FATAL->add_f();
+  }
 }
 
 extern "C" { // This should really use the C linkage to be usable from Fortran
 
-
-void mpi_init_(int* ierr) {
-    smpi_init_fortran_types();
-   *ierr = MPI_Init(nullptr, nullptr);
-   running_processes++;
+void mpi_init_(int* ierr)
+{
+  smpi_init_fortran_types();
+  *ierr = MPI_Init(nullptr, nullptr);
+  running_processes++;
 }
 
-void mpi_finalize_(int* ierr) {
-   *ierr = MPI_Finalize();
-   running_processes--;
+void mpi_finalize_(int* ierr)
+{
+  *ierr = MPI_Finalize();
+  running_processes--;
 }
 
-void mpi_abort_(int* comm, int* errorcode, int* ierr) {
+void mpi_abort_(int* comm, int* errorcode, int* ierr)
+{
   *ierr = MPI_Abort(simgrid::smpi::Comm::f2c(*comm), *errorcode);
 }
 
-double mpi_wtime_() {
-   return MPI_Wtime();
+double mpi_wtime_()
+{
+  return MPI_Wtime();
 }
 
-double mpi_wtick_() {
+double mpi_wtick_()
+{
   return MPI_Wtick();
 }
 
-void mpi_group_incl_(int* group, int* n, int* ranks, int* group_out, int* ierr) {
+void mpi_group_incl_(int* group, int* n, int* ranks, int* group_out, int* ierr)
+{
   MPI_Group tmp;
 
   *ierr = MPI_Group_incl(simgrid::smpi::Group::f2c(*group), *n, ranks, &tmp);
@@ -108,36 +114,43 @@ void mpi_group_incl_(int* group, int* n, int* ranks, int* group_out, int* ierr)
   }
 }
 
-void mpi_initialized_(int* flag, int* ierr){
+void mpi_initialized_(int* flag, int* ierr)
+{
   *ierr = MPI_Initialized(flag);
 }
 
-void mpi_get_processor_name_(char *name, int *resultlen, int* ierr){
+void mpi_get_processor_name_(char* name, int* resultlen, int* ierr)
+{
   //fortran does not handle string endings cleanly, so initialize everything before
   memset(name, 0, MPI_MAX_PROCESSOR_NAME);
   *ierr = MPI_Get_processor_name(name, resultlen);
 }
 
-void mpi_get_count_(MPI_Status * status, int* datatype, int *count, int* ierr){
+void mpi_get_count_(MPI_Status* status, int* datatype, int* count, int* ierr)
+{
   *ierr = MPI_Get_count(FORT_STATUS_IGNORE(status), simgrid::smpi::Datatype::f2c(*datatype), count);
 }
 
-void mpi_attr_get_(int* comm, int* keyval, int* attr_value, int* flag, int* ierr ){
+void mpi_attr_get_(int* comm, int* keyval, int* attr_value, int* flag, int* ierr)
+{
   int* value = nullptr;
   *ierr = MPI_Attr_get(simgrid::smpi::Comm::f2c(*comm), *keyval, &value, flag);
   if(*flag == 1)
     *attr_value=*value;
 }
 
-void mpi_error_string_(int* errorcode, char* string, int* resultlen, int* ierr){
+void mpi_error_string_(int* errorcode, char* string, int* resultlen, int* ierr)
+{
   *ierr = MPI_Error_string(*errorcode, string, resultlen);
 }
 
-void mpi_win_fence_( int* assert,  int* win, int* ierr){
+void mpi_win_fence_(int* assert, int* win, int* ierr)
+{
   *ierr =  MPI_Win_fence(* assert, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_free_( int* win, int* ierr){
+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) {
@@ -145,31 +158,37 @@ void mpi_win_free_( int* win, int* ierr){
   }
 }
 
-void mpi_win_create_( int *base, MPI_Aint* size, int* disp_unit, int* info, int* comm, int *win, int* ierr){
+void mpi_win_create_(int* base, MPI_Aint* size, int* disp_unit, int* info, int* comm, int* win, int* ierr)
+{
   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();
- }
 if (*ierr == MPI_SUCCESS) {
+    *win = tmp->add_f();
 }
 }
 
-void mpi_win_post_(int* group, int assert, int* win, int* ierr){
+void mpi_win_post_(int* group, int assert, int* win, int* ierr)
+{
   *ierr =  MPI_Win_post(simgrid::smpi::Group::f2c(*group), assert, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_start_(int* group, int assert, int* win, int* ierr){
+void mpi_win_start_(int* group, int assert, int* win, int* ierr)
+{
   *ierr =  MPI_Win_start(simgrid::smpi::Group::f2c(*group), assert, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_complete_(int* win, int* ierr){
+void mpi_win_complete_(int* win, int* ierr)
+{
   *ierr =  MPI_Win_complete(simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_wait_(int* win, int* ierr){
+void mpi_win_wait_(int* win, int* ierr)
+{
   *ierr =  MPI_Win_wait(simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_set_name_ (int*  win, char * name, int* ierr, int size){
+void mpi_win_set_name_(int* win, char* name, int* ierr, int size)
+{
   //handle trailing blanks
   while(name[size-1]==' ')
     size--;
@@ -184,13 +203,15 @@ void mpi_win_set_name_ (int*  win, char * name, int* ierr, int size){
   xbt_free(tname);
 }
 
-void mpi_win_get_name_ (int*  win, char * name, int* len, int* ierr){
+void mpi_win_get_name_(int* win, char* name, int* len, int* ierr)
+{
   *ierr = MPI_Win_get_name(simgrid::smpi::Win::f2c(*win),name,len);
   if(*len>0)
     name[*len]=' ';//blank padding, not \0
 }
 
-void mpi_win_allocate_( MPI_Aint* size, int* disp_unit, int* info, int* comm, void* base, int* win, int* ierr){
+void mpi_win_allocate_(MPI_Aint* size, int* disp_unit, int* info, int* comm, void* base, int* win, int* ierr)
+{
   MPI_Win tmp;
   *ierr =  MPI_Win_allocate( *size, *disp_unit, simgrid::smpi::Info::f2c(*info), simgrid::smpi::Comm::f2c(*comm),static_cast<void*>(base),&tmp);
  if(*ierr == MPI_SUCCESS) {
@@ -198,11 +219,13 @@ void mpi_win_allocate_( MPI_Aint* size, int* disp_unit, int* info, int* comm, vo
  }
 }
 
-void mpi_win_attach_(int* win, int* base, MPI_Aint* size, int* ierr){
+void mpi_win_attach_(int* win, int* base, MPI_Aint* size, int* ierr)
+{
   *ierr =  MPI_Win_attach(simgrid::smpi::Win::f2c(*win), static_cast<void*>(base), *size);
 }
 
-void mpi_win_create_dynamic_( int* info, int* comm, int *win, int* ierr){
+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) {
@@ -210,85 +233,103 @@ void mpi_win_create_dynamic_( int* info, int* comm, int *win, int* ierr){
  }
 }
 
-void mpi_win_detach_(int* win, int* base, int* ierr){
+void mpi_win_detach_(int* win, int* base, int* ierr)
+{
   *ierr =  MPI_Win_detach(simgrid::smpi::Win::f2c(*win), static_cast<void*>(base));
 }
 
-void mpi_win_set_info_(int*  win, int* info, int* ierr){
+void mpi_win_set_info_(int* win, int* info, int* ierr)
+{
   *ierr =  MPI_Win_set_info(simgrid::smpi::Win::f2c(*win), simgrid::smpi::Info::f2c(*info));
 }
 
-void mpi_win_get_info_(int*  win, int* info, int* ierr){
+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();
- }
 if (*ierr == MPI_SUCCESS) {
+    *info = tmp->add_f();
 }
 }
 
-void mpi_win_get_group_(int*  win, int* group, int* ierr){
+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();
- }
 if (*ierr == MPI_SUCCESS) {
+    *group = tmp->add_f();
 }
 }
 
-void mpi_win_get_attr_(int* win, int* type_keyval, MPI_Aint* attribute_val, int* flag, int* ierr){
-   MPI_Aint* value = nullptr;
+void mpi_win_get_attr_(int* win, int* type_keyval, MPI_Aint* attribute_val, int* flag, int* ierr)
+{
+  MPI_Aint* value = nullptr;
   *ierr = MPI_Win_get_attr(simgrid::smpi::Win::f2c(*win), *type_keyval, &value, flag);
   if (*flag == 1)
     *attribute_val = *value;
 }
 
-void mpi_win_set_attr_(int* win, int* type_keyval, MPI_Aint* att, int* ierr){
- MPI_Aint* val = (MPI_Aint*)xbt_malloc(sizeof(MPI_Aint));
- *val=*att;
+void mpi_win_set_attr_(int* win, int* type_keyval, MPI_Aint* att, int* ierr)
+{
+  MPI_Aint* val = (MPI_Aint*)xbt_malloc(sizeof(MPI_Aint));
+  *val          = *att;
   *ierr = MPI_Win_set_attr(simgrid::smpi::Win::f2c(*win), *type_keyval, val);
 }
 
-void mpi_win_delete_attr_(int* win, int* comm_keyval, int* ierr){
+void mpi_win_delete_attr_(int* win, int* comm_keyval, int* ierr)
+{
   *ierr = MPI_Win_delete_attr (simgrid::smpi::Win::f2c(*win),  *comm_keyval);
 }
 
-void mpi_win_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr){
+void mpi_win_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr)
+{
   smpi_copy_fn _copy_fn={nullptr,nullptr,nullptr,nullptr,nullptr,(*(int*)copy_fn) == 0 ? nullptr : reinterpret_cast<MPI_Win_copy_attr_function_fort*>(copy_fn)};
   smpi_delete_fn _delete_fn={nullptr,nullptr,nullptr,nullptr,nullptr,(*(int*)delete_fn) == 0 ? nullptr : reinterpret_cast<MPI_Win_delete_attr_function_fort*>(delete_fn)};
   *ierr = simgrid::smpi::Keyval::keyval_create<simgrid::smpi::Win>(_copy_fn, _delete_fn, keyval, extra_state);
 }
 
-void mpi_win_free_keyval_(int* keyval, int* ierr){
+void mpi_win_free_keyval_(int* keyval, int* ierr)
+{
   *ierr = MPI_Win_free_keyval( keyval);
 }
 
-void mpi_win_lock_(int* lock_type, int* rank, int* assert, int* win, int* ierr){
+void mpi_win_lock_(int* lock_type, int* rank, int* assert, int* win, int* ierr)
+{
   *ierr = MPI_Win_lock(*lock_type, *rank, *assert, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_lock_all_(int* assert, int* win, int* ierr){
+void mpi_win_lock_all_(int* assert, int* win, int* ierr)
+{
   *ierr = MPI_Win_lock_all(*assert, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_unlock_(int* rank, int* win, int* ierr){
+void mpi_win_unlock_(int* rank, int* win, int* ierr)
+{
   *ierr = MPI_Win_unlock(*rank, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_unlock_all_(int* win, int* ierr){
+void mpi_win_unlock_all_(int* win, int* ierr)
+{
   *ierr = MPI_Win_unlock_all(simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_flush_(int* rank, int* win, int* ierr){
+void mpi_win_flush_(int* rank, int* win, int* ierr)
+{
   *ierr = MPI_Win_flush(*rank, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_flush_local_(int* rank, int* win, int* ierr){
+void mpi_win_flush_local_(int* rank, int* win, int* ierr)
+{
   *ierr = MPI_Win_flush_local(*rank, simgrid::smpi::Win::f2c(*win));
 }
-void mpi_win_flush_all_(int* win, int* ierr){
+
+void mpi_win_flush_all_(int* win, int* ierr)
+{
   *ierr = MPI_Win_flush_all(simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_win_flush_local_all_(int* win, int* ierr){
+void mpi_win_flush_local_all_(int* win, int* ierr)
+{
   *ierr = MPI_Win_flush_local_all(simgrid::smpi::Win::f2c(*win));
 }
 
@@ -307,7 +348,8 @@ void mpi_win_dup_fn_(int* /*win*/, int* /*keyval*/, int* /*extrastate*/, MPI_Ain
   *ierr=MPI_SUCCESS;
 }
 
-void mpi_info_create_( int *info, int* ierr){
+void mpi_info_create_(int* info, int* ierr)
+{
   MPI_Info tmp;
   *ierr =  MPI_Info_create(&tmp);
   if(*ierr == MPI_SUCCESS) {
@@ -315,7 +357,8 @@ void mpi_info_create_( int *info, int* ierr){
   }
 }
 
-void mpi_info_set_( int *info, char *key, char *value, int* ierr, unsigned int keylen, unsigned int valuelen){
+void mpi_info_set_(int* info, char* key, char* value, int* ierr, unsigned int keylen, unsigned int valuelen)
+{
   //handle trailing blanks
   while(key[keylen-1]==' ')
     keylen--;
@@ -342,7 +385,8 @@ void mpi_info_set_( int *info, char *key, char *value, int* ierr, unsigned int k
   xbt_free(tvalue);
 }
 
-void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, int* ierr, unsigned int keylen ){
+void mpi_info_get_(int* info, char* key, int* valuelen, char* value, int* flag, int* ierr, unsigned int keylen)
+{
   while(key[keylen-1]==' ')
     keylen--;
   while(*key==' '){//handle leading blanks
@@ -366,7 +410,8 @@ void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, i
   }
 }
 
-void mpi_info_free_(int* info, int* ierr){
+void mpi_info_free_(int* info, int* ierr)
+{
   MPI_Info tmp = simgrid::smpi::Info::f2c(*info);
   *ierr =  MPI_Info_free(&tmp);
   if(*ierr == MPI_SUCCESS) {
@@ -374,14 +419,16 @@ void mpi_info_free_(int* info, int* ierr){
   }
 }
 
-void mpi_get_( int *origin_addr, int* origin_count, int* origin_datatype, int *target_rank,
-    MPI_Aint* target_disp, int *target_count, int* tarsmpi_type_f2c, int* win, int* ierr){
+void mpi_get_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+              int* target_count, int* tarsmpi_type_f2c, int* win, int* ierr)
+{
   *ierr =  MPI_Get( 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));
 }
 
-void mpi_rget_( int *origin_addr, int* origin_count, int* origin_datatype, int *target_rank,
-    MPI_Aint* target_disp, int *target_count, int* tarsmpi_type_f2c, int* win, int* request, int* ierr){
+void mpi_rget_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+               int* target_count, int* tarsmpi_type_f2c, int* win, int* request, int* ierr)
+{
   MPI_Request req;
   *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);
@@ -390,14 +437,17 @@ void mpi_rget_( int *origin_addr, int* origin_count, int* origin_datatype, int *
   }
 }
 
-void mpi_accumulate_( int *origin_addr, int* origin_count, int* origin_datatype, int *target_rank,
-    MPI_Aint* target_disp, int *target_count, int* tarsmpi_type_f2c, int* op, int* win, int* ierr){
+void mpi_accumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+                     int* target_count, int* tarsmpi_type_f2c, int* op, int* win, int* ierr)
+{
   *ierr =  MPI_Accumulate( 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));
 }
 
-void mpi_raccumulate_( int *origin_addr, int* origin_count, int* origin_datatype, int *target_rank,
-    MPI_Aint* target_disp, int *target_count, int* tarsmpi_type_f2c, int* op, int* win, int* request, int* ierr){
+void mpi_raccumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
+                      MPI_Aint* target_disp, int* target_count, int* tarsmpi_type_f2c, int* op, int* win, int* request,
+                      int* ierr)
+{
   MPI_Request req;
   *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);
@@ -406,14 +456,16 @@ void mpi_raccumulate_( int *origin_addr, int* origin_count, int* origin_datatype
   }
 }
 
-void mpi_put_( int *origin_addr, int* origin_count, int* origin_datatype, int *target_rank,
-    MPI_Aint* target_disp, int *target_count, int* tarsmpi_type_f2c, int* win, int* ierr){
+void mpi_put_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+              int* target_count, int* tarsmpi_type_f2c, int* win, int* ierr)
+{
   *ierr =  MPI_Put( 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));
 }
 
-void mpi_rput_( int *origin_addr, int* origin_count, int* origin_datatype, int *target_rank,
-    MPI_Aint* target_disp, int *target_count, int* tarsmpi_type_f2c, int* win, int* request, int* ierr){
+void mpi_rput_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+               int* target_count, int* tarsmpi_type_f2c, int* win, int* request, int* ierr)
+{
   MPI_Request req;
   *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);
@@ -422,7 +474,9 @@ void mpi_rput_( int *origin_addr, int* origin_count, int* origin_datatype, int *
   }
 }
 
-void mpi_fetch_and_op_( int *origin_addr, int* result_addr, int* datatype, int* target_rank, MPI_Aint* target_disp, int* op, int* win, int* ierr){
+void mpi_fetch_and_op_(int* origin_addr, int* result_addr, int* datatype, int* target_rank, MPI_Aint* target_disp,
+                       int* op, int* win, int* ierr)
+{
   *ierr =  MPI_Fetch_and_op( static_cast<void *>(origin_addr),
               static_cast<void *>(result_addr), simgrid::smpi::Datatype::f2c(*datatype),*target_rank,
               *target_disp, simgrid::smpi::Op::f2c(*op), simgrid::smpi::Win::f2c(*win));
@@ -436,9 +490,10 @@ void mpi_compare_and_swap_(int* origin_addr, int* compare_addr, int* result_addr
               *target_disp, simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_get_accumulate_(int *origin_addr, int* origin_count, int* origin_datatype, int* result_addr,
-                        int* result_count, int* result_datatype, int* target_rank, MPI_Aint* target_disp, int* target_count,
-                        int* target_datatype, int* op, int* win, int* ierr){
+void mpi_get_accumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* result_addr, int* result_count,
+                         int* result_datatype, int* target_rank, MPI_Aint* target_disp, int* target_count,
+                         int* target_datatype, int* op, int* win, int* ierr)
+{
   *ierr =
       MPI_Get_accumulate(static_cast<void*>(origin_addr), *origin_count, simgrid::smpi::Datatype::f2c(*origin_datatype),
                          static_cast<void*>(result_addr), *result_count, simgrid::smpi::Datatype::f2c(*result_datatype),
@@ -446,9 +501,10 @@ void mpi_get_accumulate_(int *origin_addr, int* origin_count, int* origin_dataty
                          simgrid::smpi::Op::f2c(*op), simgrid::smpi::Win::f2c(*win));
 }
 
-void mpi_rget_accumulate_(int *origin_addr, int* origin_count, int* origin_datatype, int* result_addr,
-                        int* result_count, int* result_datatype, int* target_rank, MPI_Aint* target_disp, int* target_count,
-                        int* target_datatype, int* op, int* win, int* request, int* ierr){
+void mpi_rget_accumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* result_addr,
+                          int* result_count, int* result_datatype, int* target_rank, MPI_Aint* target_disp,
+                          int* target_count, int* target_datatype, int* op, int* win, int* request, int* ierr)
+{
   MPI_Request req;
   *ierr = MPI_Rget_accumulate(static_cast<void*>(origin_addr), *origin_count,
                               simgrid::smpi::Datatype::f2c(*origin_datatype), static_cast<void*>(result_addr),
@@ -461,49 +517,55 @@ void mpi_rget_accumulate_(int *origin_addr, int* origin_count, int* origin_datat
 }
 
 //following are automatically generated, and have to be checked
-void mpi_finalized_ (int * flag, int* ierr){
- *ierr = MPI_Finalized(flag);
+void mpi_finalized_(int* flag, int* ierr)
+{
+  *ierr = MPI_Finalized(flag);
 }
 
-void mpi_init_thread_ (int* required, int *provided, int* ierr){
+void mpi_init_thread_(int* required, int* provided, int* ierr)
+{
   smpi_init_fortran_types();
   *ierr = MPI_Init_thread(nullptr, nullptr,*required, provided);
   running_processes++;
 }
 
-void mpi_query_thread_ (int *provided, int* ierr){
- *ierr = MPI_Query_thread(provided);
+void mpi_query_thread_(int* provided, int* ierr)
+{
+  *ierr = MPI_Query_thread(provided);
 }
 
-void mpi_is_thread_main_ (int *flag, int* ierr){
-
- *ierr = MPI_Is_thread_main(flag);
+void mpi_is_thread_main_(int* flag, int* ierr)
+{
 *ierr = MPI_Is_thread_main(flag);
 }
 
-void mpi_address_ (void *location, MPI_Aint * address, int* ierr){
-
- *ierr = MPI_Address(location, address);
+void mpi_address_(void* location, MPI_Aint* address, int* ierr)
+{
 *ierr = MPI_Address(location, address);
 }
 
-void mpi_get_address_ (void *location, MPI_Aint * address, int* ierr){
-
- *ierr = MPI_Get_address(location, address);
+void mpi_get_address_(void* location, MPI_Aint* address, int* ierr)
+{
 *ierr = MPI_Get_address(location, address);
 }
 
-void mpi_pcontrol_ (int* level , int* ierr){
- *ierr = MPI_Pcontrol(*static_cast<const int*>(level));
+void mpi_pcontrol_(int* level, int* ierr)
+{
+  *ierr = MPI_Pcontrol(*static_cast<const int*>(level));
 }
 
-void mpi_op_create_ (void * function, int* commute, int* op, int* ierr){
+void mpi_op_create_(void* function, int* commute, int* op, int* ierr)
+{
   MPI_Op tmp;
*ierr = MPI_Op_create(reinterpret_cast<MPI_User_function*>(function),*commute, &tmp);
if(*ierr == MPI_SUCCESS) {
-   tmp->set_fortran_op();
-   *op = tmp->add_f();
- }
 *ierr = MPI_Op_create(reinterpret_cast<MPI_User_function*>(function), *commute, &tmp);
 if (*ierr == MPI_SUCCESS) {
+    tmp->set_fortran_op();
+    *op = tmp->add_f();
 }
 }
 
-void mpi_op_free_ (int* op, int* ierr){
+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) {
@@ -511,11 +573,13 @@ void mpi_op_free_ (int* op, int* ierr){
   }
 }
 
-void mpi_op_commutative_ (int* op, int* commute, int* ierr){
+void mpi_op_commutative_(int* op, int* commute, int* ierr)
+{
   *ierr = MPI_Op_commutative(simgrid::smpi::Op::f2c(*op), commute);
 }
 
-void mpi_group_free_ (int* group, int* ierr){
+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);
@@ -524,66 +588,69 @@ void mpi_group_free_ (int* group, int* ierr){
   *ierr = MPI_SUCCESS;
 }
 
-void mpi_group_size_ (int* group, int *size, int* ierr){
-
- *ierr = MPI_Group_size(simgrid::smpi::Group::f2c(*group), size);
+void mpi_group_size_(int* group, int* size, int* ierr)
+{
 *ierr = MPI_Group_size(simgrid::smpi::Group::f2c(*group), size);
 }
 
-void mpi_group_rank_ (int* group, int *rank, int* ierr){
-
- *ierr = MPI_Group_rank(simgrid::smpi::Group::f2c(*group), rank);
+void mpi_group_rank_(int* group, int* rank, int* ierr)
+{
 *ierr = MPI_Group_rank(simgrid::smpi::Group::f2c(*group), rank);
 }
 
 void mpi_group_translate_ranks_ (int* group1, int* n, int *ranks1, int* group2, int *ranks2, int* ierr)
 {
-
  *ierr = MPI_Group_translate_ranks(simgrid::smpi::Group::f2c(*group1), *n, ranks1, simgrid::smpi::Group::f2c(*group2), ranks2);
 }
 
-void mpi_group_compare_ (int* group1, int* group2, int *result, int* ierr){
-
- *ierr = MPI_Group_compare(simgrid::smpi::Group::f2c(*group1), simgrid::smpi::Group::f2c(*group2), result);
+void mpi_group_compare_(int* group1, int* group2, int* result, int* ierr)
+{
 *ierr = MPI_Group_compare(simgrid::smpi::Group::f2c(*group1), simgrid::smpi::Group::f2c(*group2), result);
 }
 
-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();
- }
+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();
+  }
 }
 
-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();
- }
+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();
+  }
 }
 
-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();
- }
+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();
+  }
 }
 
-void mpi_group_excl_ (int* group, int* n, int *ranks, int* newgroup, int* ierr){
+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();
- }
 *ierr = MPI_Group_excl(simgrid::smpi::Group::f2c(*group), *n, ranks, &tmp);
 if (*ierr == MPI_SUCCESS) {
+    *newgroup = tmp->add_f();
 }
 }
 
 void mpi_group_range_incl_ (int* group, int* n, int ranges[][3], int* newgroup, int* ierr)
 {
   MPI_Group tmp;
- *ierr = MPI_Group_range_incl(simgrid::smpi::Group::f2c(*group), *n, ranges, &tmp);
if(*ierr == MPI_SUCCESS) {
-   *newgroup = tmp->add_f();
- }
 *ierr = MPI_Group_range_incl(simgrid::smpi::Group::f2c(*group), *n, ranges, &tmp);
 if (*ierr == MPI_SUCCESS) {
+    *newgroup = tmp->add_f();
 }
 }
 
 void mpi_group_range_excl_ (int* group, int* n, int ranges[][3], int* newgroup, int* ierr)
index 6ff061d..eda4b56 100644 (file)
@@ -775,7 +775,7 @@ int PMPI_Win_flush_local_all(MPI_Win win){
 
 int PMPI_Win_shared_query (MPI_Win win, int rank, MPI_Aint* size, int* disp_unit, void* baseptr)
 {
-  if (win==MPI_WIN_NULL)
+  if (win == MPI_WIN_NULL)
     return MPI_ERR_TYPE;
   else
     return win->shared_query(rank, size, disp_unit, baseptr);
@@ -785,31 +785,30 @@ int PMPI_Win_get_attr (MPI_Win win, int keyval, void *attribute_val, int* flag)
 {
   static MPI_Aint size;
   static MPI_Aint disp_unit;
-  if (win==MPI_WIN_NULL)
+  if (win == MPI_WIN_NULL)
     return MPI_ERR_TYPE;
   else{
-  switch (keyval) {
-    case MPI_WIN_BASE :
-      *static_cast<void**>(attribute_val)  = win->base();
-      *flag = 1;
-      return MPI_SUCCESS;
-    case MPI_WIN_SIZE :
-      size = win->size();
-      *static_cast<MPI_Aint**>(attribute_val)  = &size;
-      *flag = 1;
-      return MPI_SUCCESS;
-    case MPI_WIN_DISP_UNIT :
-      disp_unit=win->disp_unit();
-      *static_cast<MPI_Aint**>(attribute_val)  = &disp_unit;
-      *flag = 1;
-      return MPI_SUCCESS;
-    default:
-      return win->attr_get<simgrid::smpi::Win>(keyval, attribute_val, flag);
+    switch (keyval) {
+      case MPI_WIN_BASE:
+        *static_cast<void**>(attribute_val) = win->base();
+        *flag                               = 1;
+        return MPI_SUCCESS;
+      case MPI_WIN_SIZE:
+        size                                    = win->size();
+        *static_cast<MPI_Aint**>(attribute_val) = &size;
+        *flag                                   = 1;
+        return MPI_SUCCESS;
+      case MPI_WIN_DISP_UNIT:
+        disp_unit                               = win->disp_unit();
+        *static_cast<MPI_Aint**>(attribute_val) = &disp_unit;
+        *flag                                   = 1;
+        return MPI_SUCCESS;
+      default:
+        return win->attr_get<simgrid::smpi::Win>(keyval, attribute_val, flag);
+    }
   }
 }
 
-}
-
 int PMPI_Win_set_attr (MPI_Win win, int type_keyval, void *attribute_val)
 {
   if (win==MPI_WIN_NULL)
index ab1ebfb..4834e84 100644 (file)
@@ -252,17 +252,14 @@ static void smpi_init_papi()
       }
 
       // NOTE: We cannot use a map here, as we must obey the order of the counters
-      // This is important for PAPI: We need to map the values of counters back
-      // to the event_names (so, when PAPI_read() has finished)!
+      // This is important for PAPI: We need to map the values of counters back to the event_names (so, when PAPI_read()
+      // has finished)!
       papi_counter_t counters2values;
 
-      // Iterate over all counters that were specified for this specific
-      // unit.
-      // Note that we need to remove the name of the unit
-      // (that could also be the "default" value), which always comes first.
-      // Hence, we start at ++(events.begin())!
+      // Iterate over all counters that were specified for this specific unit.
+      // Note that we need to remove the name of the unit (that could also be the "default" value), which always comes
+      // first. Hence, we start at ++(events.begin())!
       for (Tokenizer::iterator events_it = ++(event_tokens.begin()); events_it != event_tokens.end(); ++events_it) {
-
         int event_code   = PAPI_NULL;
         char* event_name = const_cast<char*>((*events_it).c_str());
         if (PAPI_event_name_to_code(event_name, &event_code) != PAPI_OK) {
@@ -576,7 +573,6 @@ int smpi_main(const char* executable, int argc, char* argv[])
   if (MC_is_active()) {
     MC_run();
   } else {
-
     SIMIX_run();
 
     xbt_os_walltimer_stop(global_timer);
index 9b2a263..ef02210 100644 (file)
@@ -303,25 +303,26 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
   return mem;
 }
 
-
-void *smpi_shared_malloc_intercept(size_t size, const char *file, int line) {
+void* smpi_shared_malloc_intercept(size_t size, const char* file, int line)
+{
   if( smpi_cfg_auto_shared_malloc_thresh() == 0 || size < smpi_cfg_auto_shared_malloc_thresh())
     return ::operator new(size);
   else
     return smpi_shared_malloc(size, file, line);
 }
 
-void* smpi_shared_calloc_intercept(size_t num_elm, size_t elem_size, const char* file, int line){
+void* smpi_shared_calloc_intercept(size_t num_elm, size_t elem_size, const char* file, int line)
+{
   if( smpi_cfg_auto_shared_malloc_thresh() == 0 || elem_size*num_elm < smpi_cfg_auto_shared_malloc_thresh()){
     void* ptr = ::operator new(elem_size*num_elm);
     memset(ptr, 0, elem_size*num_elm);
     return ptr;
   } else
     return smpi_shared_malloc(elem_size*num_elm, file, line);
-
 }
 
-void *smpi_shared_malloc(size_t size, const char *file, int line) {
+void* smpi_shared_malloc(size_t size, const char* file, int line)
+{
   if (size > 0 && smpi_cfg_shared_malloc() == SharedMallocType::LOCAL) {
     return smpi_shared_malloc_local(size, file, line);
   } else if (smpi_cfg_shared_malloc() == SharedMallocType::GLOBAL) {
index d99290b..c907155 100644 (file)
@@ -168,11 +168,9 @@ void Request::print_request(const char *message)
        message, this, buf_, size_, src_, dst_, tag_, flags_);
 }
 
-
 /* factories, to hide the internal flags from the caller */
 MPI_Request Request::bsend_init(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
-
   return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                      comm->group()->actor(dst)->get_pid(), tag, comm,
                      MPI_REQ_PERSISTENT | MPI_REQ_SEND | MPI_REQ_PREPARED | MPI_REQ_BSEND);
@@ -180,7 +178,6 @@ MPI_Request Request::bsend_init(const void *buf, int count, MPI_Datatype datatyp
 
 MPI_Request Request::send_init(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
-
   return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                      comm->group()->actor(dst)->get_pid(), tag, comm,
                      MPI_REQ_PERSISTENT | MPI_REQ_SEND | MPI_REQ_PREPARED);
@@ -846,7 +843,6 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status)
       // FIXME Handle the case of a partial shared malloc.
       if (((req->flags_ & MPI_REQ_ACCUMULATE) != 0) ||
           (datatype->flags() & DT_FLAG_DERIVED)) { // && (not smpi_is_shared(req->old_buf_))){
-
         if (not smpi_process()->replaying() && smpi_cfg_privatization() != SmpiPrivStrategies::NONE &&
             static_cast<char*>(req->old_buf_) >= smpi_data_exe_start &&
             static_cast<char*>(req->old_buf_) < smpi_data_exe_start + smpi_data_exe_size) {
@@ -1108,7 +1104,8 @@ int Request::waitsome(int incount, MPI_Request requests[], int *indices, MPI_Sta
   return count;
 }
 
-MPI_Request Request::f2c(int id) {
+MPI_Request Request::f2c(int id)
+{
   char key[KEY_SIZE];
   if(id==MPI_FORTRAN_REQUEST_NULL)
     return static_cast<MPI_Request>(MPI_REQUEST_NULL);
@@ -1123,7 +1120,8 @@ void Request::free_f(int id)
   }
 }
 
-int Request::get_status(MPI_Request req, int* flag, MPI_Status * status){
+int Request::get_status(MPI_Request req, int* flag, MPI_Status* status)
+{
   *flag=0;
 
   if(req != MPI_REQUEST_NULL && req->action_ != nullptr) {
@@ -1150,8 +1148,9 @@ int Request::get_status(MPI_Request req, int* flag, MPI_Status * status){
   return MPI_SUCCESS;
 }
 
-int Request::grequest_start( MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPI_Request *request){
-
+int Request::grequest_start(MPI_Grequest_query_function* query_fn, MPI_Grequest_free_function* free_fn,
+                            MPI_Grequest_cancel_function* cancel_fn, void* extra_state, MPI_Request* request)
+{
   *request = new Request();
   (*request)->flags_ |= MPI_REQ_GENERALIZED;
   (*request)->flags_ |= MPI_REQ_PERSISTENT;
@@ -1166,7 +1165,8 @@ int Request::grequest_start( MPI_Grequest_query_function *query_fn, MPI_Grequest
   return MPI_SUCCESS;
 }
 
-int Request::grequest_complete( MPI_Request request){
+int Request::grequest_complete(MPI_Request request)
+{
   if ((!(request->flags_ & MPI_REQ_GENERALIZED)) || request->generalized_funcs->mutex==NULL) 
     return MPI_ERR_REQUEST;
   request->generalized_funcs->mutex->lock();
index c73780d..5433be3 100644 (file)
@@ -247,7 +247,6 @@ double surf_parse_get_speed(const char* string, const char* entity_kind, const s
 
 static std::vector<double> surf_parse_get_all_speeds(char* speeds, const char* entity_kind, const std::string& id)
 {
-
   std::vector<double> speed_per_pstate;
 
   if (strchr(speeds, ',') == nullptr){