Skip to content

Commit

Permalink
Merge branch 'fix/srun_termination' of github.com:radical-cybertools/…
Browse files Browse the repository at this point in the history
…radical.pilot into fix/srun_termination
  • Loading branch information
andre-merzky committed Dec 4, 2024
2 parents 98780bb + 682f587 commit d549958
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/radical/pilot/agent/executing/popen.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def initialize(self):
#
def cancel_task(self, uid):

self._log.debug('request cancel task %s', uid)
self._watch_queue.put([self.TO_CANCEL, uid])


Expand Down Expand Up @@ -289,7 +290,6 @@ def _watch(self):
# next step. Also check for a requested cancellation for the tasks.
def _check_running(self, to_watch, to_cancel):

#
action = False

# `to_watch.remove()` in the loop requires copy to iterate over the list
Expand Down
5 changes: 3 additions & 2 deletions src/radical/pilot/utils/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ def _control_cb(self, topic, msg):
with self._cancel_lock:
self._cancel_list += uids

# scheduler handles cancelation itself
if 'AgentSchedulingComponent' in repr(self):
# scheduler and executor handle cancelation directly
if 'agent.scheduler' in repr(self) or \
'agent.executing' in repr(self):
self.control_cb(topic, msg)
return

Expand Down

0 comments on commit d549958

Please sign in to comment.