From 33178e7414f9e4eb009f2ba40e62472cd42971e4 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Sat, 12 Jun 2021 19:06:25 +0100 Subject: [PATCH] Made some changes to set the proces titles --- binarycpython/utils/grid.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index 910aaaac3..92332341c 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -143,10 +143,6 @@ class Population: # Create location where ensemble results are written to self.grid_ensemble_results = {} - # Set process name - setproctitle.setproctitle('binarycpython parent process') - setproctitle.setthreadtitle("binarycpyhon parent thread") - ################################################### # Argument functions ################################################### @@ -958,9 +954,11 @@ class Population: # https://www.programcreek.com/python/example/58176/multiprocessing.Value # https://stackoverflow.com/questions/17377426/shared-variable-in-pythons-multiprocessing - # Set up the manager object that can share info between processes + # Set process name + setproctitle.setproctitle('binarycpython parent process') + setproctitle.setthreadtitle("binarycpyhon parent thread") - # pathos_multiprocess + # Set up the manager object that can share info between processes manager = multiprocessing.Manager() job_queue = manager.Queue(maxsize=self.grid_options["max_queue_size"]) result_queue = manager.Queue(maxsize=self.grid_options["amt_cores"]) @@ -1056,7 +1054,7 @@ class Population: def _process_run_population_grid(self, job_queue, result_queue, ID): """ - Worker process that gets items from the job_queue and runs those systems. + Worker process that gets items from the job_queue and runs those systems. It keeps track of several things like failed systems, total time spent on systems etc. Input: -- GitLab