From 2e40a9adfe3ec3fc72dc5ca21ff38208eddd34a0 Mon Sep 17 00:00:00 2001 From: hinder Date: Tue, 24 Jul 2012 14:32:00 +0000 Subject: 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 --- lib/sbin/RunTestUtils.pl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib') 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'})) -- cgit v1.2.3