Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 11 additions & 1 deletion reframe/core/launchers/mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ def command(self, job):
@register_launcher('alps')
class AlpsLauncher(JobLauncher):
def command(self, job):
return ['aprun', '-B']
cmd = ['aprun', '-n', str(job.num_tasks)]
if job.num_tasks_per_node:
cmd += ['-N', str(job.num_tasks_per_node)]

if job.num_cpus_per_task:
cmd += ['-d', str(job.num_cpus_per_task)]

if job.use_smt:
cmd += ['-j', '0']

return cmd


@register_launcher('mpirun')
Expand Down
8 changes: 4 additions & 4 deletions unittests/test_launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ def launcher(self):

@property
def expected_command(self):
return 'aprun -B --foo'
return 'aprun -n 4 -N 2 -d 2 -j 0 --foo'

@property
def expected_minimal_command(self):
return 'aprun -B --foo'
return 'aprun -n 1 --foo'


class TestMpirunLauncher(_TestLauncher, unittest.TestCase):
Expand Down Expand Up @@ -191,11 +191,11 @@ def launcher(self):

@property
def expected_command(self):
return 'ddt --offline aprun -B --foo'
return 'ddt --offline aprun -n 4 -N 2 -d 2 -j 0 --foo'

@property
def expected_minimal_command(self):
return 'ddt --offline aprun -B --foo'
return 'ddt --offline aprun -n 1 --foo'


class TestLocalLauncher(_TestLauncher, unittest.TestCase):
Expand Down