Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed slurm launcher #214

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions matador/compute/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ def run_command(self, seed):
elif self.mpi_library == 'archer':
command = ['aprun', '-n', str(self.ncores)] + command
elif self.mpi_library == 'slurm':
command = ['srun'] + command
command = ['srun', '--exclusive', '--ntasks', str(self.ncores)] + command
elif self.mpi_library in ['intel', 'default']:
command = ['mpirun', '-n', str(self.ncores)] + command
else:
Expand All @@ -1138,7 +1138,8 @@ def run_command(self, seed):
str(self.ncores), '-S', '12', '-d', '1'
] + command
elif self.mpi_library == 'slurm':
command = ['srun'] + command
command = ['srun', '--exclusive', '--ntasks', str(self.ncores * self.nnodes), '--ntasks-per-node',
str(self.ncores)] + command
elif self.mpi_library == 'intel':
command = ['mpirun', '-n', str(self.ncores * self.nnodes), '-ppn', str(self.ncores)] + command
else:
Expand Down Expand Up @@ -1734,7 +1735,7 @@ def _setup_compute_dir(self, seed, compute_dir, custom_params=False, generic=Fal
LOG.info('Using compute_dir: {}'.format(compute_dir))
if not os.path.isdir(compute_dir):
try:
os.makedirs(compute_dir)
os.makedirs(compute_dir, exist_ok=True)
except PermissionError as exc:
raise CriticalError('Invalid compute dir requested: {} {}'.format(compute_dir, exc))
# if compute_dir isn't simply inside this folder, make a symlink that is
Expand Down