Anonymous | Login | 2022-06-26 05:13 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000310 | OMNeT++ | runtime / Cmdenv | public | 2011-05-17 17:36 | 2017-02-01 16:53 | ||||
Reporter | jesjones | ||||||||
Assigned To | andras | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 4.1 | ||||||||
Target Version | Fixed in Version | 5.1pre3 | |||||||
Summary | 0000310: Can't suppress Cmdenv output | ||||||||
Description | We 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 Information | Here 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); | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
|
(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. |
![]() |
|||
Date Modified | Username | Field | Change |
2011-05-17 17: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 - 2022 MantisBT Team |