radical-project / campaign_manager

https://radicalcm.readthedocs.io/en/latest/
MIT License
1 stars 0 forks source link

state cleanup for repeated runs? #16

Open andre-merzky opened 4 years ago

andre-merzky commented 4 years ago

Lets see in how many ways we can break this :-D This is number one:

bookkeep1 = Bookkeeper(campaign=campaign, resources=res, planner='heft')
bookkeep1.run()

bookkeep2 = Bookkeeper(campaign=campaign, resources=res, planner='random')
bookkeep2.run()

results in

Traceback (most recent call last):
  File "examples/bookkeping.py", line 61, in <module>
    bookkeep2 = Bookkeeper(campaign=campaign, resources=res, planner='random')
  File "/home/merzky/radical/radical.campaign/ve3/lib/python3.7/site-packages/radical/cm/bookkeeper/bookkeeper.py", line 43, in __init__
    self._exec_state_lock  = ru.RLock('workflows_state_lock')
  File "/home/merzky/radical/radical.campaign/ve3/lib/python3.7/site-packages/radical/utils/debug.py", line 600, in __init__
    _debug_helper.register_rlock(self.name, self)
  File "/home/merzky/radical/radical.campaign/ve3/lib/python3.7/site-packages/radical/utils/debug.py", line 478, in register_rlock
    assert(name not in self.rlocks), name
AssertionError: workflows_state_lock
iparask commented 4 years ago

Thank you Andre. This is important because it will now allow me to run experiments!

I think I should make sure that all locks are released with the system terminates, right? If you have any other suggestions, please let me know