From 8818cc12383b5e9ad7f7e2e297a40435aa8dfeb4 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 12 Mar 2024 16:42:40 -0400 Subject: [PATCH] Disabled the use of os.setpgid(), which is at best not working and at worst causing errors on some systems. Will need to find another method for canceling ongoing simulations. --- cace/cace_gui.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cace/cace_gui.py b/cace/cace_gui.py index d3def04..b734a95 100755 --- a/cace/cace_gui.py +++ b/cace/cace_gui.py @@ -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): @@ -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=(