]> AND Private Git Repository - loba.git/blobdiff - options.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add the possibility to specify the initial load with the average among the nodes.
[loba.git] / options.cpp
index 39f043c96ea2e70e4fc51ad143a00429b87ef1bd..cac9752ca9a168618584b933165d4b4457eec98d 100644 (file)
@@ -51,7 +51,7 @@ namespace opt {
         bool        enabled = false;
         std::string topology("clique");
         unsigned    nhosts = 0;
-        double      load = 0.0;
+        double      load = -1.0;
         bool        random_distribution = false;
         unsigned long random_seed = 0;
     }
@@ -379,8 +379,10 @@ void opt::print()
         DESCR("- topology", "%s", auto_depl::topology.c_str());
         DESCR("- number of hosts", "%s", h.val_or_string(auto_depl::nhosts,
                                                          "auto"));
-        DESCR("- initial load", "%s", h.val_or_string(auto_depl::load,
-                                                      "auto"));
+        if (auto_depl::load < 0.0)
+            DESCR("- initial load (average)", "%g", -auto_depl::load);
+        else
+            DESCR("- initial load (total)", "%g", auto_depl::load);
         DESCR("- random initial load distribution", "%s",
               h.on_off(auto_depl::random_distribution));
         DESCR("- random seed", "%s",
@@ -457,7 +459,7 @@ void opt::usage()
     if (opt::help_requested > 1)
         so_list(opt::topologies);
     std::clog << o("-L value")
-              << "total load with auto deployment, 0 for number of hosts"
+              << "total load with auto deployment, average if negative"
               << " [" << opt::auto_depl::load << "]\n";
     std::clog << o("-N value")
               << "number of hosts to use with auto deployment, 0 for max."
@@ -506,7 +508,7 @@ void opt::usage()
               << "maximum data transfer amount, 0 for no limit"
               << " [" << opt::max_transfer_amount << "]\n";
     std::clog << o("-Z")
-              << "toggle transfer integer of integer data shares only"
+              << "toggle transfer of integer data shares only"
               << " [" << opt_helper::on_off(opt::integer_transfer) << "]\n";
 
     std::clog << "\nEnd of the simulation:\n";