Skip to content

Commit a35cd7d

Browse files
committed
terminate even if signal is stale; faster termination for shuffle bounder
1 parent c8e1363 commit a35cd7d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: mpisppy/cylinders/spoke.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def got_kill_signal(self):
2727
"""
2828
shutdown_buf = self.receive_buffers[self._make_key(Field.SHUTDOWN, 0)]
2929
self.get_receive_buffer(shutdown_buf, Field.SHUTDOWN, 0)
30-
return (shutdown_buf.is_new() and shutdown_buf[0] == 1.0)
30+
return shutdown_buf[0] == 1.0
3131

3232
@abc.abstractmethod
3333
def main(self):

Diff for: mpisppy/cylinders/xhatshufflelooper_bounder.py

+4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def _vb(msg):
136136
_vb(f" Updating best to {next_scendict}")
137137
scenario_cycler.best = next_scendict["ROOT"]
138138

139+
if self.got_kill_signal():
140+
# time to go; don't solve next
141+
return
142+
139143
next_scendict = scenario_cycler.get_next()
140144
if next_scendict is not None:
141145
_vb(f" Trying next {next_scendict}")

0 commit comments

Comments
 (0)