Skip to content

Commit

Permalink
Fix whole node allocation for SpiderLauncher
Browse files Browse the repository at this point in the history
  • Loading branch information
tikk3r committed Oct 25, 2019
1 parent ff0f1b7 commit be08f82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GRID_LRT/application/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def __init__(self, numjobs=1, token_type='t_test',
self.numjobs = numjobs
self.parameter_step = parameter_step
self.token_type = token_type
self.wholenodes = 'false'
self.wholenodes = False

if 'wholenode' in kwargs:
self.wholenodes = kwargs['wholenode']
Expand All @@ -349,7 +349,7 @@ def __init__(self, numjobs=1, token_type='t_test',
else:
self.ncpu = 1
if self.ncpu == 0:
self.wholenodes = 'true'
self.wholenodes = True
if "queue" in kwargs:
self.queue = kwargs['queue']
else:
Expand Down Expand Up @@ -379,9 +379,9 @@ def build_slurm_file(self, database=None):
raise IOError("Launch file doesn't exist! "+self.launch_file)
slurmfile = '#!/usr/bin/env bash\n'
if self.wholenodes:
slurmfile += '#SBATCH --exclusive --nodes=1 --cpus-per-task={ncpu:d} -p {queue:s} --array 1-{njobs:d}%{concurrent:d}\n'
slurmfile += '#SBATCH --exclusive --nodes=1 --ntasks 1--cpus-per-task={ncpu:d} -p {queue:s} --array 1-{njobs:d}%{concurrent:d}\n'
else:
slurmfile += '#SBATCH --nodes=1 --cpus-per-task={ncpu:d} -p {queue:s} --array 1-{njobs:d}%{concurrent:d}\n'
slurmfile += '#SBATCH --nodes=1 --ntasks 1 --cpus-per-task={ncpu:d} -p {queue:s} --array 1-{njobs:d}%{concurrent:d}\n'
slurmfile += """
echo Job landed on $(hostname)
JOBDIR=$(mktemp -d -p $TMPDIR)
Expand Down

0 comments on commit be08f82

Please sign in to comment.