#1262: simfactory doesn't know how to handle 'old' simulations ------------------------+--------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Keywords: | ------------------------+--------------------------------------------------- Trying to restart a simulation after an update of simfactory I get {{{ $ sim submit A3_oct --procs=256 Assigned restart id: 2 Traceback (most recent call last): File "/home/knarf/utils/simfactory/bin/../lib/sim.py", line 148, in <module> main() File "/home/knarf/utils/simfactory/bin/../lib/sim.py", line 144, in main CommandDispatch() File "/home/knarf/utils/simfactory/bin/../lib/sim.py", line 106, in CommandDispatch module.main() File "/home/knarf/utils/simfactory/lib/sim-manage.py", line 397, in main CommandDispatch() File "/home/knarf/utils/simfactory/lib/sim-manage.py", line 376, in CommandDispatch exec("command_%s()" % command) File "<string>", line 1, in <module> File "/home/knarf/utils/simfactory/lib/sim-manage.py", line 267, in command_submit restart.userSubmit(simulationName) File "/home/knarf/utils/simfactory/lib/simrestart.py", line 353, in userSubmit self.submit(submitScript) File "/home/knarf/utils/simfactory/lib/simrestart.py", line 590, in submit (nodes, ppn_used, procs, ppn, procs_requested, num_procs, num_threads, num_smt) = simlib.GetProcs(existingProperties) File "/home/knarf/utils/simfactory/lib/simlib.py", line 834, in GetProcs num_smt = existingProperties.numsmt AttributeError: SimProperties instance has no attribute 'numsmt' }}}
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+-------------------------------------------------- Changes (by knarf):
* status: new => review
Comment:
I could restart using the following change, but I am not sure if this would be the correct way to patch it: {{{ Index: lib/simlib.py =================================================================== --- lib/simlib.py (revision 1990) +++ lib/simlib.py (working copy) @@ -830,7 +830,7 @@ suggested_num_smt = int(GetMachineOption('num-smt')) num_smt = simenv.OptionsManager.GetOption('num-smt') if num_smt == None: - if existingProperties != None: + if existingProperties != None and existingProperties.numsmt != None: num_smt = existingProperties.numsmt else: num_smt = GetMachineOption('num-smt') }}}
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
This seems correct. Does it work?
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by anonymous):
It seemed to work, but only because the previous (aborted) invocation wrote a new output-000? directory and the next invocation didn't find an old simulation there and didn't try to restart but started anew. *oh well*. Btw: the same bug also caused already queued simulations to about when they finally started after I updated simfactory.
This patch now works:
{{{ Index: lib/simlib.py =================================================================== --- lib/simlib.py (revision 1990) +++ lib/simlib.py (working copy) @@ -831,9 +831,10 @@ num_smt = simenv.OptionsManager.GetOption('num-smt') if num_smt == None: if existingProperties != None: - num_smt = existingProperties.numsmt - else: - num_smt = GetMachineOption('num-smt') + try: + num_smt = existingProperties.numsmt + except AttributeError: + num_smt = GetMachineOption('num-smt') try: num_smt = int(num_smt) except ValueError: }}}
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
The else branch of "if existingProperties != None" is missing.
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
I edited the patch now.
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
There is no patch any more.
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
I edited the comment which contains the patch. I now also added it as file.
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: reviewed_ok Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+-------------------------------------------------- Changes (by eschnett):
* status: review => reviewed_ok
Comment:
Did you test this for both cases (num_smt exists and does not exist)? If so, please apply.
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: reviewed_ok Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
I tested when num_smt didn't exist, and it worked. I didn't test for num_smt exists yet, as I don't have such a simulation to restart right now. However, what could go wrong here given the simplicity of the patch? :)
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: reviewed_ok Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
Ok to apply?
#1262: simfactory doesn't know how to handle 'old' simulations -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: closed Priority: major | Milestone: ET_2013_05 Component: SimFactory | Version: development version Resolution: fixed | Keywords: -------------------------+-------------------------------------------------- Changes (by knarf):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Committed as of r1995
trac@lists.einsteintoolkit.org