diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-30 13:00:25 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-30 13:00:25 +0000 |
commit | 2e4812270e9f628c9424bae1a3f0e2852b9ee238 (patch) | |
tree | d16a03c10c35f5f902d84912c88be8533b904892 | |
parent | e92ba70ed8c07bed8a095b8055d117716d4f5a37 (diff) |
New runtest script
git-svn-id: http://svn.cactuscode.org/flesh/trunk@829 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/sbin/Runtest.pl | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/lib/sbin/Runtest.pl b/lib/sbin/Runtest.pl index 8d9c0e34..746e29e3 100644 --- a/lib/sbin/Runtest.pl +++ b/lib/sbin/Runtest.pl @@ -19,7 +19,6 @@ print <<EOT; ------------------------------- Cactus Code Test Suite Tool - Paul Walker + Joan Masso ------------------------------- EOT @@ -34,9 +33,37 @@ else $configs_dir = "configs"; } -$executable = &defprompt("Enter executable name (relative to Cactus home dir)",".${sep}exe${sep}cactus_$config"); -$command = &defprompt("Enter command to run executable"," "); +$current_directory = `pwd`; +chop($current_directory); +# Look to see if MPI is defined +$extra = "$current_directory${sep}configs${sep}$config${sep}config-data${sep}cctk_extradefs.h"; + +$mpi = 0; +if (-e "$extra") +{ + open(EXTRA,"<$extra"); + while(<EXTRA>) + { + if (/\#define MPI/) + { + $mpi = 1 + } + } +} + + +$executable = &defprompt("Enter executable name (relative to Cactus home dir)","exe${sep}cactus_$config"); + +if ($mpi) +{ + $numprocs = &defprompt("Enter number of processors","2"); + $command = &defprompt("Enter command to run executable","mpirun -np $numprocs "); +} +else +{ + $command = &defprompt("Enter command to run executable"," "); +} $tests = &defprompt("Run All tests or go to Menu", "All"); @@ -92,7 +119,7 @@ if ($tests =~ /All/) { print "[$i] $testnum{$i}: $testnames{$i}\n"; } print "\n Enter number of test to run (quit to end) : "; - $choice = <STDIN>; + $choice = <STDIN>; $choice =~ s/\n//; $choice =~ s/\s//; print "\n"; |