summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wootton <38671868+dwootton-ny@users.noreply.github.com>2018-05-10 13:49:18 -0400
committerscheibelp <scheibel1@llnl.gov>2018-05-10 10:49:18 -0700
commit9c4522ecbd8601c46158c2498adb6168f5476754 (patch)
tree0de5a0d7c149e473f30e2891b5dcdc506318efec
parentf4a46f4fc394147f4f8d7820cb432fcbdfb3d0b3 (diff)
downloadspack-9c4522ecbd8601c46158c2498adb6168f5476754.tar.gz
spack-9c4522ecbd8601c46158c2498adb6168f5476754.tar.bz2
spack-9c4522ecbd8601c46158c2498adb6168f5476754.tar.xz
spack-9c4522ecbd8601c46158c2498adb6168f5476754.zip
petsc: specify number of processors used for test case (#8015)
For Spectrum MPI, if -np is omitted, the default behavior is to assign one process per process slot, where the default process slot allocation is one per core. On systems with many cores, the number of processes can exceed the size of the grid specified when the testcase is run and the test case fails. This specifies a small number of processes when running the test case to prevent failure.
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index ba120aac8f..6ad968bbe4 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -296,6 +296,18 @@ class Petsc(Package):
cc('ex50.c', '-I%s' % prefix.include, '-L%s' % prefix.lib,
'-lpetsc', '-lm', '-o', 'ex50')
run = Executable(join_path(spec['mpi'].prefix.bin, 'mpirun'))
+ # For Spectrum MPI, if -np is omitted, the default behavior is
+ # to assign one process per process slot, where the default
+ # process slot allocation is one per core. On systems with
+ # many cores, the number of processes can exceed the size of
+ # the grid specified when the testcase is run and the test case
+ # fails. Specify a small number of processes to prevent
+ # failure.
+ # For more information about Spectrum MPI invocation, see URL
+ # https://www.ibm.com/support/knowledgecenter/en/SSZTET_10.1.0/smpi02/smpi02_mpirun_options.html
+ if ('spectrum-mpi' in spec):
+ run.add_default_arg('-np')
+ run.add_default_arg('4')
run('ex50', '-da_grid_x', '4', '-da_grid_y', '4')
if 'superlu-dist' in spec:
run('ex50',