Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change xbt_cfg_get_double -> simgrid::config::get_config<double>.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 19 Apr 2018 10:58:51 +0000 (12:58 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 19 Apr 2018 14:06:43 +0000 (16:06 +0200)
src/smpi/internals/smpi_global.cpp
src/smpi/internals/smpi_shared.cpp
src/smpi/mpi/smpi_request.cpp
src/surf/plugins/host_dvfs.cpp

index f2a5b48..6e379ab 100644 (file)
@@ -228,7 +228,7 @@ static void smpi_check_options()
              "Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.");
   }
 
-  xbt_assert(xbt_cfg_get_double("smpi/cpu-threshold") >= 0,
+  xbt_assert(simgrid::config::get_config<double>("smpi/cpu-threshold") >= 0,
              "The 'smpi/cpu-threshold' option cannot have negative values [anymore]. If you want to discard "
              "the simulation of any computation, please use 'smpi/simulate-computation:no' instead.");
 }
@@ -360,8 +360,8 @@ static void smpi_init_options(){
     return;
   simgrid::smpi::Colls::set_collectives();
   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");
+  smpi_cpu_threshold                               = simgrid::config::get_config<double>("smpi/cpu-threshold");
+  smpi_host_speed                                  = simgrid::config::get_config<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")
index bc42b78..358a78a 100644 (file)
@@ -199,7 +199,8 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
   xbt_assert(not use_huge_page,
              "Huge pages are not available on your system, you cannot use the smpi/shared-malloc-hugepage option.");
 #endif
-  smpi_shared_malloc_blocksize = static_cast<unsigned long>(xbt_cfg_get_double("smpi/shared-malloc-blocksize"));
+  smpi_shared_malloc_blocksize =
+      static_cast<unsigned long>(simgrid::config::get_config<double>("smpi/shared-malloc-blocksize"));
   void* mem;
   size_t allocated_size;
   if(use_huge_page) {
index 3b4f02d..ad1a0ce 100644 (file)
@@ -668,7 +668,7 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   // This can speed up the execution of certain applications by an order of magnitude, such as HPL
   static int nsleeps = 1;
   double speed        = simgrid::s4u::Actor::self()->get_host()->getSpeed();
-  double maxrate = xbt_cfg_get_double("smpi/iprobe-cpu-usage");
+  double maxrate      = simgrid::config::get_config<double>("smpi/iprobe-cpu-usage");
   MPI_Request request = new Request(nullptr, 0, MPI_CHAR,
                                     source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(),
                                     simgrid::s4u::this_actor::get_pid(), tag, comm, PERSISTENT | RECV);
index d141f54..993a397 100644 (file)
@@ -42,7 +42,7 @@ public:
   void init()
   {
     const char* local_sampling_rate_config = host_->getProperty(property_sampling_rate);
-    double global_sampling_rate_config     = xbt_cfg_get_double(property_sampling_rate);
+    double global_sampling_rate_config     = simgrid::config::get_config<double>(property_sampling_rate);
     if (local_sampling_rate_config != nullptr) {
       sampling_rate = std::stod(local_sampling_rate_config);
     } else {