[mlpack-svn] r10130 - mlpack/trunk/src/mlpack/core/io

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Nov 3 13:43:28 EDT 2011


Author: mamidon
Date: 2011-11-03 13:43:28 -0400 (Thu, 03 Nov 2011)
New Revision: 10130

Modified:
   mlpack/trunk/src/mlpack/core/io/cli.cpp
Log:
Fixed regression w/ timers.


Modified: mlpack/trunk/src/mlpack/core/io/cli.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/cli.cpp	2011-11-03 17:15:23 UTC (rev 10129)
+++ mlpack/trunk/src/mlpack/core/io/cli.cpp	2011-11-03 17:43:28 UTC (rev 10130)
@@ -73,8 +73,10 @@
     Log::Info << "Program timers:" << std::endl;
     std::map<std::string, timeval> times = Timers::GetAllTimers();
     std::map<std::string, timeval>::iterator iter;
-    for(iter = times.begin(); iter != times.end(); iter++)
+    for(iter = times.begin(); iter != times.end(); iter++) {
+      Log::Info << iter->first << " -- ";
       Timers::PrintTimer(iter->first.c_str());
+    }
   }
 
   // Notify the user if we are debugging, but only if we actually parsed the
@@ -420,10 +422,13 @@
   std::list<std::string>::iterator iter;
   for (iter = rOpt.begin(); iter != rOpt.end(); iter++) {
   std::string str = *iter;
-  if (!vmap.count(str)) // If a required option isn't there...
-      Log::Fatal << "Required option --" << iter->c_str() << " is undefined."
-          << std::endl;
+  if (!vmap.count(str)) 
+  {// If a required option isn't there...
+    Timers::StopTimer("total_time"); //Execution stop here, pretty much.
+    Log::Fatal << "Required option --" << str.c_str() << " is undefined." 
+      << std::endl;
   }
+  }
 }
 
 /* Prints out the current hierachy */




More information about the mlpack-svn mailing list