Skip to content

Commit

Permalink
Merge pull request #1 from natefoo/lparsons_galaxy_slots
Browse files Browse the repository at this point in the history
Prefer $SLURM_CPUS_ON_NODE for $GALAXY_SLOTS to other SLURM variables.
  • Loading branch information
lparsons committed Jan 4, 2016
2 parents d24bc3d + 1c21ba8 commit 9bbe4b8
Showing 1 changed file with 10 additions and 1 deletion.
@@ -1,5 +1,14 @@
export GALAXY_SLOTS_CONFIGURED="1"
if [ -n "$SLURM_NTASKS" ] || [ -n "$SLURM_CPUS_PER_TASK" ]; then
if [ -n "$SLURM_CPUS_ON_NODE" ]; then
# This should be valid on SLURM except in the case that srun is used to
# submit additional job steps under an existing allocation, which we do not
# currently do.
GALAXY_SLOTS="$SLURM_CPUS_ON_NODE"
elif [ -n "$SLURM_NTASKS" ] || [ -n "$SLURM_CPUS_PER_TASK" ]; then
# $SLURM_CPUS_ON_NODE should be set correctly on SLURM (even on old
# installations), but keep the $SLURM_NTASKS logic as a backup since this
# was the previous method under SLURM.
#
# Multiply these values since SLURM_NTASKS is total tasks over all nodes.
# GALAXY_SLOTS maps to CPUS on a single node and shouldn't be used for
# multi-node requests.
Expand Down

0 comments on commit 9bbe4b8

Please sign in to comment.