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

Private GIT Repository
Disable logging completely with a negative log_rate.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 10 Feb 2011 21:28:15 +0000 (22:28 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 10 Feb 2011 21:28:15 +0000 (22:28 +0100)
options.cpp
options.h
process.cpp

index 3e789cdb52bcff209fbbfaf2ffe7762e5ada5c7c..f3e2be399b7ea33bb35db9ac94ec8cd6e2e181af 100644 (file)
@@ -30,7 +30,7 @@ namespace opt {
     bool version_requested = false;
 
     // Simulation parameters
     bool version_requested = false;
 
     // Simulation parameters
-    unsigned log_rate = 1;
+    int log_rate = 1;
 
     // Platform and deployment
     std::string platform_file;
 
     // Platform and deployment
     std::string platform_file;
index fbc4851a50427caa2fb609b21ee038b3de207c64..ed5b49865376017823d012a9803403d9d4c6e7ae 100644 (file)
--- a/options.h
+++ b/options.h
@@ -21,7 +21,7 @@ namespace opt {
     extern bool version_requested;
 
     // Simulation parameters
     extern bool version_requested;
 
     // Simulation parameters
-    extern unsigned log_rate;
+    extern int log_rate;
 
     // Platform and deployment
     extern std::string platform_file;
 
     // Platform and deployment
     extern std::string platform_file;
index e5ba3cd0fa596d3cefcd56d9f9ba2e2d40897c02..92b75c972e00ef589a6b26df2c5c0edffbfdd941 100644 (file)
@@ -82,6 +82,8 @@ process::~process()
 {
     delete compute_thread;
     total_load_exit += real_load;
 {
     delete compute_thread;
     total_load_exit += real_load;
+    if (opt::log_rate < 0)
+        return;
     if (opt::bookkeeping) {
         XBT_INFO("Final load after %d:%d iterations: %g ; expected: %g",
                  lb_iter, comp_iter, real_load, expected_load);
     if (opt::bookkeeping) {
         XBT_INFO("Final load after %d:%d iterations: %g ; expected: %g",
                  lb_iter, comp_iter, real_load, expected_load);
@@ -94,7 +96,8 @@ process::~process()
 
 int process::run()
 {
 
 int process::run()
 {
-    XBT_INFO("Initial load: %g", real_load);
+    if (opt::log_rate >= 0)
+        XBT_INFO("Initial load: %g", real_load);
     XBT_VERB("Starting...");
     compute_thread->start();
     load_balance_loop();
     XBT_VERB("Starting...");
     compute_thread->start();
     load_balance_loop();