Skip to content

Commit

Permalink
Disabled the use of os.setpgid(), which is at best not working and
Browse files Browse the repository at this point in the history
at worst causing errors on some systems.  Will need to find another
method for canceling ongoing simulations.
  • Loading branch information
RTimothyEdwards committed Mar 12, 2024
1 parent 7f2846a commit 8818cc1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cace/cace_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,8 @@ def stop_sims(self):
)

# Return all individual "Simulate" buttons to normal text
for simbutton in self.simbuttons.keys():
for simbname in self.simbuttons.keys():
simbutton = self.simbuttons[simbname]
simbutton.configure(text='Simulate')

def edit_param(self, param):
Expand Down Expand Up @@ -992,7 +993,13 @@ def sim_param(self, name):

# Diagnostic
print('Simulating parameter ' + name)
runtime_options['pid'] = os.getpid()
# NOTE: Commenting out the following line prevents the use of
# the process ID to set a common group ID that can be used to
# stop simulations by sending a kill signal to all threads.
# The method is not working, and on some systems os.setpgid()
# will not run.
#
# runtime_options['pid'] = os.getpid()
p = multiprocessing.Process(
target=self.cace_process,
args=(
Expand Down

0 comments on commit 8818cc1

Please sign in to comment.