summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-10-29 16:15:45 +0000
committerrhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-10-29 16:15:45 +0000
commit6d686ed054a596a443670bafdc81a9fe2311e88a (patch)
tree7c13c4922cc7d6f1dda50f6c9c5ae0fbb60e8314 /lib
parent8fae3455222415485b5e7a2987a9e0b70ee4642b (diff)
Always run tests with requested number of processes
This is discussed in ticket #1075. Original patch by Erik Schnetter. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4901 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/sbin/RunTestUtils.pl52
1 files changed, 25 insertions, 27 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index 86c05f0e..a71b3b97 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -893,23 +893,6 @@ sub WriteFullResults
}
push (@summary, "$message\n") if ($missingtests > 0);
- # Different number of processors required
- $message = " Tests missed for different number of processors required:\n";
- $missingtests = 0;
- foreach $thorn (sort split(' ',$testdata->{'THORNS'}))
- {
- foreach $parfile (sort split(' ',$testdata->{"$thorn TESTS"}))
- {
- my $nprocs = $testdata->{"$thorn $parfile NPROCS"};
- next unless ($nprocs);
- $message .= "\n ".$parfile." in ". $thorn."\n";
- $message .= " (". $testdata->{"$thorn $parfile DESC"}.")\n";
- $message .= " Requires $nprocs processors\n";
- $missingtests++;
- }
- }
- push (@summary, "$message\n") if ($missingtests > 0);
-
# Different numbers of test files
$message = " Tests with different number of test files:\n\n";
@@ -1059,7 +1042,18 @@ sub WriteFullResults
{
foreach $file (sort split(' ',$rundata->{"$thorn PASSED"}))
{
- push (@summary, " $file (from $thorn)");
+ my $nprocs_available = $config_data->{'NPROCS'};
+ my $nprocs = $testdata->{"$thorn $file NPROCS"};
+ my $nprocstext = "";
+ if ($nprocs)
+ {
+ $nprocstext = " using $nprocs MPI processes";
+ }
+ else
+ {
+ $nprocs = $nprocs_available;
+ }
+ push (@summary, " $file (from $thorn$nprocstext)");
}
}
}
@@ -1073,7 +1067,10 @@ sub WriteFullResults
{
foreach $file (sort split(' ',$rundata->{"$thorn FAILED"}))
{
- push (@summary, " $file (from $thorn)");
+ my $nprocs_available = $config_data->{'NPROCS'};
+ my $nprocs = $testdata->{"$thorn $file NPROCS"};
+ $nprocs = $nprocs_available unless $nprocs;
+ push (@summary, " $file (from $thorn using $nprocs MPI processes)");
}
}
}
@@ -1242,9 +1239,13 @@ sub RunTest
chdir ($testdata->{"$thorn $test TESTRUNDIR"}) ;
# substitute the ($nprocs, $exe, $parfile) templates in the command
+ my $nprocs_available = $config_data->{'NPROCS'};
+ my $nprocs = $testdata->{"$thorn $test NPROCS"};
+ $nprocs = $nprocs_available unless $nprocs;
+ my $exe = $config_data->{'EXE'};
my $cmd = $config_data->{'COMMAND'};
- $cmd =~ s/\$exe/$config_data->{'EXE'}/g;
- $cmd =~ s/\$nprocs/$config_data->{'NPROCS'}/g;
+ $cmd =~ s/\$exe/$exe/g;
+ $cmd =~ s/\$nprocs/$nprocs/g;
$cmd =~ s/\$parfile/$parfile/g;
$retcode = &RunCactus($output,$test,$cmd);
@@ -1694,16 +1695,13 @@ sub ParseAllParameterFiles
$testdata->{"$thorn $testbase MISSING"} .= $missing;
$testdata->{'NUNRUNNABLE'}++;
}
- elsif ($nprocs_required != $nprocs_available)
- {
- $testdata->{"$thorn UNRUNNABLE"} .= "$testbase ";
- $testdata->{"$thorn $testbase NPROCS"} = $nprocs_required;
- $testdata->{'NUNRUNNABLE'}++;
- }
else
{
$testdata->{"$thorn RUNNABLE"} .= "$testbase ";
$testdata->{"$thorn TESTED"} = 1;
+ if($nprocs_required != $nprocs_available) {
+ $testdata->{"$thorn $testbase NPROCS"} = $nprocs_required;
+ }
$testdata->{'NRUNNABLE'}++;
$nrunnable++;
}