- changed status to open
- removed comment
simfactory doesn't know how to handle 'old' simulations
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'
Keyword:
Comments (11)
-
reporter -
- removed comment
This seems correct. Does it work?
-
- removed comment
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,7 +831,10 @@ num_smt = simenv.OptionsManager.GetOption('num-smt') if num_smt == None: if existingProperties != None: - num_smt = existingProperties.numsmt + try: + num_smt = existingProperties.numsmt + except AttributeError: + num_smt = GetMachineOption('num-smt') else: num_smt = GetMachineOption('num-smt') try:
-
- removed comment
The else branch of "if existingProperties != None" is missing.
-
reporter - removed comment
I edited the patch now.
-
- removed comment
There is no patch any more.
-
reporter - removed comment
I edited the comment which contains the patch. I now also added it as file.
-
- changed status to open
- removed comment
Did you test this for both cases (num_smt exists and does not exist)? If so, please apply.
-
reporter - removed comment
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? :)
-
reporter - removed comment
Ok to apply?
-
reporter - changed status to resolved
- removed comment
Committed as of r1995
- Log in to comment
I could restart using the following change, but I am not sure if this would be the correct way to patch it: