Skip to content

Commit

Permalink
further logging improvements
Browse files Browse the repository at this point in the history
add further descriptive logging to try and isolate issue with 4 GPUs per node runs
  • Loading branch information
sophiamaedler committed Dec 28, 2023
1 parent d0058f7 commit e19e265
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/sparcscore/pipeline/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ def process(self, input_image):

if available_GPUs >= 1:
n_processes = processes_per_GPU * available_GPUs
self.log(f"Proceeding in segmentation with {n_processes} number of processes.")
else:
n_processes = self.config["threads"]
available_GPUs = 1 #default to 1 GPU if non are available and a CPU only method is run
Expand Down
4 changes: 2 additions & 2 deletions src/sparcscore/pipeline/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,9 @@ def cellpose_segmentation(self, input_image):
gpu_id_list = current.gpu_id_list
self.log(f"gpu id list: {gpu_id_list}")
cpu_id = int(cpu_name[cpu_name.find('-') + 1:]) - 1
self.log("cpu id: {cpu_id}")
self.log(f"cpu id: {cpu_id}")
gpu_id = gpu_id_list[cpu_id]
self.log("gpu id: {gpu_id}")
self.log(f"gpu id: {gpu_id}")
self.log(f'starting process on GPU {gpu_id}')
status = "multi_GPU"
except:
Expand Down

0 comments on commit e19e265

Please sign in to comment.