OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000310OMNeT++runtime / Cmdenvpublic2011-05-17 18:362017-02-01 16:53
Reporterjesjones 
Assigned Toandras 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.1 
Target VersionFixed in Version5.1pre3 
Summary0000310: Can't suppress Cmdenv output
DescriptionWe typically run lots and lots of simulations and record the output of each test with each seed. This is a lot of data to wade through and we really don't want to see lines that we never care about. Ideally there should be a way to suppress all of the normal status info that Cmdenv writes out.
Additional InformationHere is a start at doing this sort of thing:

--- a/src/cmdenv/cmdenv.cc
+++ b/src/cmdenv/cmdenv.cc
@@ -224,7 +224,8 @@ void Cmdenv::run()
         bool startrun_done = false;
         try
         {
- ::fprintf(fout, "\nPreparing for running configuration %s, run #%d...\n", opt_configname.c_str(), runnumber);
+ if (strcmp(opt_runstoexec.c_str(), "0") != 0)
+ ::fprintf(fout, "\nPreparing for running configuration %s, run #%d...\n", opt_configname.c_str(), runnumber);
             ::fflush(fout);
 
             cfg->activateConfig(opt_configname.c_str(), runnumber);
@@ -264,7 +265,8 @@ void Cmdenv::run()
             // finish() should not be called.
             simulate();
 
- ::fprintf(fout, "\nCalling finish() at end of Run #%d...\n", runnumber);
+ if (strcmp(opt_runstoexec.c_str(), "0") != 0)
+ ::fprintf(fout, "\nCalling finish() at end of Run #%d...\n", runnumber);
             ::fflush(fout);
             simulation.callFinish();
             flushLastLine();
@@ -410,10 +412,11 @@ void Cmdenv::simulate()
         deinstallSignalHandler();
 
         stoppedWithTerminationException(e);
- displayMessage(e);
+ if (!opt_expressmode)
+ displayMessage(e);
         return;
     }
- catch (std::exception& e)
+ catch (std::exception&)
     {
         if (opt_expressmode)
             doStatusUpdate(speedometer);
@@ -472,7 +475,7 @@ void Cmdenv::doStatusUpdate(Speedometer& speedometer)
                 cMessage::getLiveMessageCount(),
                 simulation.msgQueue.getLength());
     }
- else
+ else if (opt_interactive)
     {
         ::fprintf(fout, "** Event #%"LL"d T=%s Elapsed: %s%s ev/sec=%g\n",
                 simulation.getEventNumber(),
@@ -573,7 +576,7 @@ std::string Cmdenv::gets(const char *prompt, const char *defaultReply)
             ::fprintf(fout, "(default: %s) ", defaultReply);
         ::fflush(fout);
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0001302)
andras (administrator)
2017-02-01 16:53

Most messages (Preparing..., Calling finish(), etc) can now be turned of with the new "silent" (-s) option. Express-mode status updates can be disabled by setting cmdenv-status-frequency (which expects an interval in seconds) to a sufficiently high value.

- Issue History
Date Modified Username Field Change
2011-05-17 18:36 jesjones New Issue
2017-02-01 16:53 andras Note Added: 0001302
2017-02-01 16:53 andras Status new => resolved
2017-02-01 16:53 andras Fixed in Version => 5.1pre3
2017-02-01 16:53 andras Resolution open => fixed
2017-02-01 16:53 andras Assigned To => andras


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker