]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/internals/smpi_global.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Fix branch conditions
[simgrid.git] / src / smpi / internals / smpi_global.cpp
index cd07e115170c53791af574eb47f10b213f98498a..069b7f2f2bd2f2e012b74e3e9b5536eedb62be64 100644 (file)
@@ -368,6 +368,7 @@ static void smpi_init_options(){
   simgrid::smpi::Colls::smpi_coll_cleanup_callback = nullptr;
   smpi_cpu_threshold                               = xbt_cfg_get_double("smpi/cpu-threshold");
   smpi_host_speed                                  = xbt_cfg_get_double("smpi/host-speed");
+  xbt_assert(smpi_host_speed >= 0, "You're trying to set the host_speed to a negative value (%f)", smpi_host_speed);
   std::string smpi_privatize_option                = xbt_cfg_get_string("smpi/privatization");
   if (smpi_privatize_option == "no" || smpi_privatize_option == "0")
     smpi_privatize_global_variables = SMPI_PRIVATIZE_NONE;
@@ -541,10 +542,8 @@ int smpi_main(const char* executable, int argc, char *argv[])
         smpi_run_entry_point(entry_point, args);
       });
     };
-
   }
   else {
-
     // Load the dynamic library and resolve the entry point:
     void* handle = dlopen(executable, RTLD_LAZY | RTLD_LOCAL);
     if (handle == nullptr)
@@ -560,7 +559,6 @@ int smpi_main(const char* executable, int argc, char *argv[])
         smpi_run_entry_point(entry_point, args);
       });
     };
-
   }
 
   SMPI_init();