show-output is broken

Create issue
Issue #321 closed
Erik Schnetter created an issue

The command show-output is broken on my laptop. Here is the relevant screen output;

Info: Simfactory command: ./simfactory/bin/../lib/sim.py "show-output" "empty-redshift-2011.03.02-11.04.47" Info: Version 1238:1242M The Simulation Factory: Manage Cactus simulations

Info: defs: /Users/eschnett/EinsteinToolkit-hg/simfactory/etc/defs.ini Info: defs.local: /Users/eschnett/EinsteinToolkit-hg/simfactory/etc/defs.local.ini Info: Cactus Directory: /Users/eschnett/EinsteinToolkit-hg Info: simenv.COMMAND: show-output Info: Executing command: show_output Traceback (most recent call last): File "./simfactory/bin/../lib/sim.py", line 141, in <module> main() File "./simfactory/bin/../lib/sim.py", line 138, in main CommandDispatch() File "./simfactory/bin/../lib/sim.py", line 105, in CommandDispatch module.main() File "/Users/eschnett/EinsteinToolkit-hg/simfactory/lib/sim-manage.py", line 335, in main CommandDispatch() File "/Users/eschnett/EinsteinToolkit-hg/simfactory/lib/sim-manage.py", line 314, in CommandDispatch exec("command_%s()" % command) File "<string>", line 1, in <module> NameError: name 'command_show_output' is not defined

Keyword:

Comments (4)

  1. Erik Schnetter reporter
    • removed comment

    This breaks the test script. Without show-output, we cannot test whether submitted simulations actually run or complete.

  2. anonymous
    • changed status to resolved
    • removed comment

    this has been fixed as of revision r1258. This would have been something that any contributor to simfactory could have fixed with very little effort. While I am more then happy to correct these problems, and most of them are my mistakes (I'll admit that freely), since there's a big push towards contribution, a bit of effort here would be appreciated.

    Somehow, the show_output command was renamed to show_display. It was correctly renamed in simrestart.py to show_display as well. This change was wrong -- I'm really not sure why it was renamed from show_output to show_display. Anyway, the CommandDispatch function inside of each sim-*py file looks at known_commands data structure present, and attempts to run the function command_(command-name) with dashes replaced by underscores, so for this specific instance, the command show-output is attempted to be run as command_show_output. Since show_output was renamed to show_display (still confused by this, it might have been a side effect of a find/replace regex), it was attempted to run command_show_output, but it didn't exist, as it was renamed command_show_display.

    Please, contributors, attempt to investigate crashes/errors yourself and identify if its an easy solution. If it is, please go ahead and commit a fix yourself, especially if its a blocker/critical issue.

  3. Log in to comment