summaryrefslogtreecommitdiff
path: root/lib/sbin
diff options
context:
space:
mode:
authorhinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-07-24 14:32:00 +0000
committerhinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-07-24 14:32:00 +0000
commit2e40a9adfe3ec3fc72dc5ca21ff38208eddd34a0 (patch)
tree02aa4443072bcd02d4b2d965d396e995e3f6f025 /lib/sbin
parentc1e50375d6302656b13d27dfbfec26d9b5ee7fb0 (diff)
Generate a fatal error if trying to run tests on more than one process without having MPI
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4849 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r--lib/sbin/RunTestUtils.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index 0fc50920..3174db31 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -457,13 +457,23 @@ sub FindRunCommand
# Look to see if MPI is dfined
my $have_mpi = ParseExtras($config_data);
+
+ my $nprocs = (defined ($ENV{'CCTK_TESTSUITE_RUN_PROCESSORS'}) ?
+ $ENV{'CCTK_TESTSUITE_RUN_PROCESSORS'} : 2);
+
if ($have_mpi)
{
- my $nprocs = (defined ($ENV{'CCTK_TESTSUITE_RUN_PROCESSORS'}) ?
- $ENV{'CCTK_TESTSUITE_RUN_PROCESSORS'} : 2);
$config_data->{'NPROCS'} =
&defprompt(' Enter number of processors ($nprocs)', $nprocs);
}
+ else
+ {
+ print "No MPI available\n";
+ if ($nprocs > 1)
+ {
+ die("Cannot run on $nprocs processes without an MPI implementation\n");
+ }
+ }
my $command;
if (defined ($ENV{'CCTK_TESTSUITE_RUN_COMMAND'}))