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.
This commit is contained in:
parent
f4a46f4fc3
commit
9c4522ecbd
@ -296,6 +296,18 @@ def install(self, spec, prefix):
|
||||
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',
|
||||
|
Loading…
Reference in New Issue
Block a user