diff --git a/reframe/core/launchers/mpi.py b/reframe/core/launchers/mpi.py index 68da3ad4e4..87436243c7 100644 --- a/reframe/core/launchers/mpi.py +++ b/reframe/core/launchers/mpi.py @@ -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') diff --git a/unittests/test_launchers.py b/unittests/test_launchers.py index e7511c53e9..c9ae9c0dae 100644 --- a/unittests/test_launchers.py +++ b/unittests/test_launchers.py @@ -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): @@ -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):