Skip to content

Commit 4c90d0c

Browse files
authored
Merge pull request #405 from kysrpex/cluster_slots_statement_htcondor
Support HTCondor in CLUSTER_SLOTS_STATEMENT.sh
2 parents b60890c + 43e499c commit 4c90d0c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pulsar/managers/util/job_script/CLUSTER_SLOTS_STATEMENT.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ 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 "$PYTHON_CPU_COUNT" ]; then
30+
# HTCondor sets several environment variables, including PYTHON_CPU_COUNT,
31+
# to control how many threads jobs may spawn. A list is available in the
32+
# HTCondor documentation https://htcondor.readthedocs.io/en/24.0
33+
# /admin-manual/configuration-macros.html#STARTER_NUM_THREADS_ENV_VARS.
34+
GALAXY_SLOTS="$PYTHON_CPU_COUNT"
2935
else
3036
GALAXY_SLOTS="1"
3137
unset GALAXY_SLOTS_CONFIGURED

0 commit comments

Comments
 (0)