Skip to content

Commit 20f08cb

Browse files
committed
Support HTCondor in CLUSTER_SLOTS_STATEMENT.sh
HTCondor sets a couple of environment variables read by various frameworks to control the number of threads they are allowed to use. A list can be found on the HTCondor docs https://htcondor.readthedocs.io/en/24.0/admin-manual/configuration-macros.html#STARTER_NUM_THREADS_ENV_VARS. The list itself is configurable (it is an HTCondor configuration macro). Any of these variables can be used to set GALAXY_SLOTS. Set it using the variable ROOT_MAX_THREADS (designed to control the ROOT data analysis framework from CERN).
1 parent b60890c commit 20f08cb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pulsar/managers/util/job_script/CLUSTER_SLOTS_STATEMENT.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ elif [ -n "$LSB_DJOB_NUMPROC" ]; then
2626
elif [ -n "$GALAXY_SLOTS" ]; then
2727
# kubernetes runner injects GALAXY_SLOTS into environment
2828
GALAXY_SLOTS=$GALAXY_SLOTS
29+
elif [ -n "$ROOT_MAX_THREADS" ]; then
30+
# HTCondor sets a couple of environment variables read by various
31+
# frameworks to control the number of threads they are allowed to use. A
32+
# list can be found in the HTCondor docs (the list itself is configurable,
33+
# as it is an HTCondor configuration macro).
34+
#
35+
# https://htcondor.readthedocs.io/en/24.0/admin-manual/
36+
# configuration-macros.html#STARTER_NUM_THREADS_ENV_VARS
37+
#
38+
# Any of these variables can be used to set GALAXY_SLOTS. Set it using the
39+
# variable ROOT_MAX_THREADS (designed to control the ROOT data analysis
40+
# framework from CERN).
41+
GALAXY_SLOTS="$ROOT_MAX_THREADS"
2942
else
3043
GALAXY_SLOTS="1"
3144
unset GALAXY_SLOTS_CONFIGURED

0 commit comments

Comments
 (0)