Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case Engine signals
[simgrid.git] / src / smpi / internals / smpi_global.cpp
index 902237b..75c8a9d 100644 (file)
@@ -87,7 +87,7 @@ simgrid::smpi::Process* smpi_process()
   ActorPtr me = Actor::self();
   if (me == nullptr) // This happens sometimes (eg, when linking against NS3 because it pulls openMPI...)
     return nullptr;
-  simgrid::msg::ActorExt* msgExt = static_cast<simgrid::msg::ActorExt*>(me->get_impl()->userdata);
+  simgrid::msg::ActorExt* msgExt = static_cast<simgrid::msg::ActorExt*>(me->get_impl()->getUserData());
   return static_cast<simgrid::smpi::Process*>(msgExt->data);
 }
 
@@ -221,7 +221,7 @@ static void smpi_check_options()
   xbt_assert(simgrid::config::get_value<int>("smpi/async-small-thresh") <=
              simgrid::config::get_value<int>("smpi/send-is-detached-thresh"));
 
-  if (xbt_cfg_is_default_value("smpi/host-speed")) {
+  if (simgrid::config::is_default("smpi/host-speed")) {
     XBT_INFO("You did not set the power of the host running the simulation.  "
              "The timings will certainly not be accurate.  "
              "Use the option \"--cfg=smpi/host-speed:<flops>\" to set its value."
@@ -386,20 +386,20 @@ static void smpi_init_options(){
   }
 #endif
 
-    if (smpi_cpu_threshold < 0)
-      smpi_cpu_threshold = DBL_MAX;
-
-    std::string val = simgrid::config::get_value<std::string>("smpi/shared-malloc");
-    if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) {
-      smpi_cfg_shared_malloc = shmalloc_global;
-    } else if (val == "local") {
-      smpi_cfg_shared_malloc = shmalloc_local;
-    } else if ((val == "no") || (val == "0") || (val == "off")) {
-      smpi_cfg_shared_malloc = shmalloc_none;
-    } else {
-      xbt_die("Invalid value '%s' for option smpi/shared-malloc. Possible values: 'on' or 'global', 'local', 'off'",
-              val.c_str());
-    }
+  if (smpi_cpu_threshold < 0)
+    smpi_cpu_threshold = DBL_MAX;
+
+  std::string val = simgrid::config::get_value<std::string>("smpi/shared-malloc");
+  if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) {
+    smpi_cfg_shared_malloc = shmalloc_global;
+  } else if (val == "local") {
+    smpi_cfg_shared_malloc = shmalloc_local;
+  } else if ((val == "no") || (val == "0") || (val == "off")) {
+    smpi_cfg_shared_malloc = shmalloc_none;
+  } else {
+    xbt_die("Invalid value '%s' for option smpi/shared-malloc. Possible values: 'on' or 'global', 'local', 'off'",
+            val.c_str());
+  }
 }
 
 typedef std::function<int(int argc, char *argv[])> smpi_entry_point_type;
@@ -595,8 +595,6 @@ int smpi_main(const char* executable, int argc, char *argv[])
   }
   smpi_global_destroy();
 
-  TRACE_end();
-
   return smpi_exit_status;
 }
 
@@ -618,7 +616,7 @@ void SMPI_init(){
   smpi_init_options();
   smpi_global_init();
   smpi_check_options();
-  simgrid::s4u::onSimulationEnd.connect(TRACE_smpi_release);
+  simgrid::s4u::on_simulation_end.connect(TRACE_smpi_release);
 }
 
 void SMPI_finalize(){