From 48e05bf654ad6b397ed11d3536076bb0f7041e22 Mon Sep 17 00:00:00 2001 From: Marcelo Alvarez Date: Fri, 17 Dec 2021 17:08:40 -0800 Subject: [PATCH 1/2] fix mpi rank bug --- py/desispec/workflow/desi_proc_funcs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/py/desispec/workflow/desi_proc_funcs.py b/py/desispec/workflow/desi_proc_funcs.py index 9d7fdec16..463ec84f2 100755 --- a/py/desispec/workflow/desi_proc_funcs.py +++ b/py/desispec/workflow/desi_proc_funcs.py @@ -300,6 +300,7 @@ def determine_resources(ncameras, jobdesc, queue, nexps=1, forced_runtime=None, nspectro = (ncameras - 1) // 3 + 1 if jobdesc in ('ARC', 'TESTARC'): ncores, runtime = 10 * ncameras + 1, 45 # + 1 for worflow.schedule scheduler proc + ncores = max(ncores,21) elif jobdesc in ('FLAT', 'TESTFLAT'): ncores, runtime = 20 * nspectro, 25 elif jobdesc in ('SKY', 'TWILIGHT', 'SCIENCE','PRESTDSTAR','POSTSTDSTAR'): From 8e411217377b1e61ec5c4245af4814d445f9cc29 Mon Sep 17 00:00:00 2001 From: Marcelo Alvarez Date: Mon, 20 Dec 2021 15:04:32 -0800 Subject: [PATCH 2/2] ensure number of processes - 1 divisible by twenty --- py/desispec/workflow/desi_proc_funcs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/desispec/workflow/desi_proc_funcs.py b/py/desispec/workflow/desi_proc_funcs.py index 463ec84f2..655898b73 100755 --- a/py/desispec/workflow/desi_proc_funcs.py +++ b/py/desispec/workflow/desi_proc_funcs.py @@ -299,8 +299,8 @@ def determine_resources(ncameras, jobdesc, queue, nexps=1, forced_runtime=None, nspectro = (ncameras - 1) // 3 + 1 if jobdesc in ('ARC', 'TESTARC'): - ncores, runtime = 10 * ncameras + 1, 45 # + 1 for worflow.schedule scheduler proc - ncores = max(ncores,21) + ncores = 20 * (10*(ncameras+1)//20) # lowest multiple of 20 exceeding 10 per camera + ncores, runtime = ncores + 1, 45 # + 1 for worflow.schedule scheduler proc elif jobdesc in ('FLAT', 'TESTFLAT'): ncores, runtime = 20 * nspectro, 25 elif jobdesc in ('SKY', 'TWILIGHT', 'SCIENCE','PRESTDSTAR','POSTSTDSTAR'):