| 1 |
#!/usr/bin/perl -w |
| 2 |
use strict; |
| 3 |
use strict 'refs'; |
| 4 |
|
| 5 |
printf |
| 6 |
"\n*****************************************************". |
| 7 |
"\n*** Running Anasazi tests (no news is good news) ****". |
| 8 |
"\n*****************************************************\n"; |
| 9 |
|
| 10 |
my $success = 1; # Boolean (false=0,true=nonzero) |
| 11 |
my $mpirun; # stratus="prun -n", any other platform="mpirun -np" |
| 12 |
my $result; # success=0, failure=nonzero |
| 13 |
# |
| 14 |
# Check for the mpirun command on this platform, which will |
| 15 |
# be set by the test harness. If it isn't specified, use 'mpirun'. |
| 16 |
# |
| 17 |
$result = $ENV{"TRILINOS_TEST_HARNESS_MPIGO_COMMAND"}; |
| 18 |
if (!$result) { |
| 19 |
$result = "mpirun -np"; |
| 20 |
} |
| 21 |
$mpirun = $result . " 3 "; |
| 22 |
|
| 23 |
#************************************ |
| 24 |
# Modal solver utils test |
| 25 |
#************************************ |
| 26 |
|
| 27 |
$result = system ($mpirun . "./ModalSolverUtils/ModalSolverUtils_test.exe"); |
| 28 |
if ($result != 0) { |
| 29 |
# If we failed run it again in verbose mode. |
| 30 |
$success = 0; |
| 31 |
printf |
| 32 |
"\n\n*****************************************". |
| 33 |
"\n*** Running ModalSolverUtils test ****". |
| 34 |
"\n*****************************************\n\n"; |
| 35 |
system ($mpirun . "./ModalSolverUtils/ModalSolverUtils_test.exe -v"); |
| 36 |
} else { |
| 37 |
printf |
| 38 |
"\n ****** ModalSolverUtils MPI test PASSED ****** \n"; |
| 39 |
} |
| 40 |
|
| 41 |
#************************************ |
| 42 |
# MVOPTester utils test |
| 43 |
#************************************ |
| 44 |
|
| 45 |
$result = system ($mpirun . "./MVOPTester/MVOPTester_test.exe"); |
| 46 |
if ($result != 0) { |
| 47 |
# If we failed run it again in verbose mode. |
| 48 |
$success = 0; |
| 49 |
printf |
| 50 |
"\n\n*****************************************". |
| 51 |
"\n*** Running MVOPTester test ****". |
| 52 |
"\n*****************************************\n\n"; |
| 53 |
system ($mpirun . "./MVOPTester/MVOPTester_test.exe -v"); |
| 54 |
} else { |
| 55 |
printf |
| 56 |
"\n ****** MVOPTester MPI test PASSED ****** \n"; |
| 57 |
} |
| 58 |
|
| 59 |
#************************************ |
| 60 |
# Block Krylov-Schur test |
| 61 |
#************************************ |
| 62 |
|
| 63 |
$result = system ($mpirun . "./BlockKrylovSchur/BlockKrylovSchur_test.exe"); |
| 64 |
if ($result != 0) { |
| 65 |
# If we failed run it again in verbose mode. |
| 66 |
$success = 0; |
| 67 |
printf |
| 68 |
"\n\n*****************************************". |
| 69 |
"\n*** Running BlockKrylovSchur test ****". |
| 70 |
"\n*****************************************\n\n"; |
| 71 |
system ($mpirun . "./BlockKrylovSchur/BlockKrylovSchur_test.exe -v"); |
| 72 |
} else { |
| 73 |
printf |
| 74 |
"\n ****** BlockKrylovSchur MPI test PASSED ****** \n"; |
| 75 |
} |
| 76 |
|
| 77 |
#************************************ |
| 78 |
# Block Davidson test |
| 79 |
#************************************ |
| 80 |
|
| 81 |
$result = system ($mpirun . "./BlockDavidson/BlockDavidson_test.exe"); |
| 82 |
if ($result != 0) { |
| 83 |
# If we failed run it again in verbose mode. |
| 84 |
$success = 0; |
| 85 |
printf |
| 86 |
"\n\n*****************************************". |
| 87 |
"\n*** Running BlockDavidson test ****". |
| 88 |
"\n*****************************************\n\n"; |
| 89 |
system ($mpirun . "./BlockDavidson/BlockDavidson_test.exe -v"); |
| 90 |
} else { |
| 91 |
printf |
| 92 |
"\n ****** BlockDavidson MPI test PASSED ****** \n"; |
| 93 |
} |
| 94 |
|
| 95 |
#************************************ |
| 96 |
# LOBPCG test |
| 97 |
#************************************ |
| 98 |
|
| 99 |
$result = system ($mpirun . "./LOBPCG/LOBPCG_test.exe"); |
| 100 |
if ($result != 0) { |
| 101 |
# If we failed run it again in verbose mode. |
| 102 |
$success = 0; |
| 103 |
printf |
| 104 |
"\n\n*****************************************". |
| 105 |
"\n*** Running LOBPCG test ****". |
| 106 |
"\n*****************************************\n\n"; |
| 107 |
system ($mpirun . "./LOBPCG/LOBPCG_test.exe -v"); |
| 108 |
} else { |
| 109 |
printf |
| 110 |
"\n ****** LOBPCG MPI test PASSED ****** \n"; |
| 111 |
} |
| 112 |
|
| 113 |
|
| 114 |
# Return 0 if all the tests were successful, else return -1. |
| 115 |
exit ($success ? 0 : -1 ); |