[ET Trac] [Einstein Toolkit] #1815: simfactory: sim show-output selects inactive, queued restart

Einstein Toolkit trac-noreply at einsteintoolkit.org
Tue Sep 8 13:45:50 CDT 2015


#1815: simfactory: sim show-output selects inactive, queued restart
------------------------+---------------------------------------------------
 Reporter:  knarf       |       Owner:                     
     Type:  defect      |      Status:  new                
 Priority:  minor       |   Milestone:  ET_2015_11         
Component:  SimFactory  |     Version:  development version
 Keywords:              |  
------------------------+---------------------------------------------------
 {{{
 sim show-output NAME
 }}}
 currently selects the 'maximum' restart for output, which in case of
 queued up restarts is one that isn't (yet) running. It should select the
 currently active restart (if there is one), given that this version of
 simfactory is going to be retired anyway ....

 The patch could probably be done 'nicer', but this is the minimally
 invasive version.

 Patch:
 {{{
 diff --git a/lib/sim-manage.py b/lib/sim-manage.py
 index 87a26fd..c0e8343 100755
 --- a/lib/sim-manage.py
 +++ b/lib/sim-manage.py
 @@ -300,7 +300,12 @@ def command_show_output():
      if simenv.OptionsManager.HasOption('restart-id'):
          restart_id = simenv.OptionsManager.GetOption('restart-id')
      else:
 -        restart_id = restartlib.GetMaxRestartID(simulationName)
 +        restart = simrestart.SimRestart()
 +        restart.load(simulationName)
 +        restart_id = restartlib.GetActiveRestartId(restart)
 +        restart.done()
 +        if (restart_id == None):
 +          restart_id = restartlib.GetMaxRestartID(simulationName)

      restart = simrestart.SimRestart()
      ret = restart.load(simulationName, restart_id)

 }}}

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1815>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list