File tree Expand file tree Collapse file tree
pulsar/managers/util/job_script Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export GALAXY_SLOTS_CONFIGURED=" 1"
2- if [ -n " $SLURM_NTASKS " ]; then
3- # May want to multiply this by ${SLURM_CPUS_PER_TASK:-1}.
4- # SLURM_NTASKS is total tasks over all nodes so this is
5- # shouldn't be used for multi-node requests.
6- GALAXY_SLOTS=" $SLURM_NTASKS "
2+ if [ -n " $SLURM_CPUS_ON_NODE " ]; then
3+ # This should be valid on SLURM except in the case that srun is used to
4+ # submit additional job steps under an existing allocation, which we do not
5+ # currently do.
6+ GALAXY_SLOTS=" $SLURM_CPUS_ON_NODE "
7+ elif [ -n " $SLURM_NTASKS " ] || [ -n " $SLURM_CPUS_PER_TASK " ]; then
8+ # $SLURM_CPUS_ON_NODE should be set correctly on SLURM (even on old
9+ # installations), but keep the $SLURM_NTASKS logic as a backup since this
10+ # was the previous method under SLURM.
11+ #
12+ # Multiply these values since SLURM_NTASKS is total tasks over all nodes.
13+ # GALAXY_SLOTS maps to CPUS on a single node and shouldn't be used for
14+ # multi-node requests.
15+ GALAXY_SLOTS=` expr " ${SLURM_NTASKS:- 1} " \* " ${SLURM_CPUS_PER_TASK:- 1} " `
716elif [ -n " $NSLOTS " ]; then
817 GALAXY_SLOTS=" $NSLOTS "
918elif [ -n " $PBS_NCPUS " ]; then
You can’t perform that action at this time.
0 commit comments