Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 5 Jul 2018 13:24:39 +0000 (15:24 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 5 Jul 2018 13:24:39 +0000 (15:24 +0200)
src/s4u/s4u_Barrier.cpp
src/simgrid/sg_config.cpp
src/smpi/internals/smpi_bench.cpp
src/smpi/internals/smpi_global.cpp

index 713245c..a8ce588 100644 (file)
@@ -18,10 +18,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_barrier, "S4U barrier");
 namespace simgrid {
 namespace s4u {
 
-Barrier::Barrier(unsigned int count) : expected_processes_(count)
+Barrier::Barrier(unsigned int expected_processes) : mutex_(Mutex::create()), cond_(ConditionVariable::create()), expected_processes_(expected_processes)
 {
-  mutex_ = Mutex::create();
-  cond_  = ConditionVariable::create();
 }
 
 /**
index c026309..415a9c7 100644 (file)
@@ -446,6 +446,9 @@ void sg_config_init(int *argc, char **argv)
   simgrid::config::declare_flag<std::string>("smpi/alltoallv", "Which collective to use for alltoallv", "");
   simgrid::config::declare_flag<std::string>("smpi/bcast", "Which collective to use for bcast", "");
   simgrid::config::declare_flag<std::string>("smpi/reduce", "Which collective to use for reduce", "");
+
+  simgrid::config::declare_flag<int>("smpi/plugin/lb/migration-frequency", "After how many migrations should the load balancer"
+                                                        "compute a new mapping?", 10);
 #endif // HAVE_SMPI
 
   /* Others */
index ac7f78c..f7101a3 100644 (file)
@@ -166,7 +166,7 @@ void smpi_bench_end()
 
     for (auto const& pair : counter_data) {
       simgrid::instr::VariableType* variable = static_cast<simgrid::instr::VariableType*>(container->type_->by_name(pair.first));
-      variable->set_event(surf_get_clock(), pair.second);
+      variable->set_event(SIMIX_get_clock(), pair.second);
     }
   }
 #endif
index 3ce72e1..bb67c34 100644 (file)
@@ -366,7 +366,7 @@ static void smpi_init_options(){
   simgrid::smpi::Colls::smpi_coll_cleanup_callback = nullptr;
   smpi_cpu_threshold                               = simgrid::config::get_value<double>("smpi/cpu-threshold");
   smpi_host_speed                                  = simgrid::config::get_value<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);
+  xbt_assert(smpi_host_speed > 0.0, "You're trying to set the host_speed to a non-positive value (given: %f)", smpi_host_speed);
   std::string smpi_privatize_option = simgrid::config::get_value<std::string>("smpi/privatization");
   if (smpi_privatize_option == "no" || smpi_privatize_option == "0")
     smpi_privatize_global_variables = SmpiPrivStrategies::NONE;