| 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 $result; # success=0, failure=nonzero |
| 12 |
|
| 13 |
#************************************ |
| 14 |
# Modal solver utilties test |
| 15 |
#************************************ |
| 16 |
|
| 17 |
$result = system ('./ModalSolverUtils/ModalSolverUtils_test.exe'); |
| 18 |
if ($result != 0) { |
| 19 |
# If we failed run it again in verbose mode. |
| 20 |
$success = 0; |
| 21 |
printf |
| 22 |
"\n\n*****************************************". |
| 23 |
"\n*** Running ModalSolverUtils test ****". |
| 24 |
"\n*****************************************\n\n"; |
| 25 |
system ('./ModalSolverUtils/ModalSolverUtils_test.exe -v'); |
| 26 |
} else { |
| 27 |
printf |
| 28 |
"\n ****** ModalSolverUtils test PASSED ****** \n"; |
| 29 |
} |
| 30 |
|
| 31 |
#************************************ |
| 32 |
# MVOPTester utilties test |
| 33 |
#************************************ |
| 34 |
|
| 35 |
$result = system ('./MVOPTester/MVOPTester_test.exe'); |
| 36 |
if ($result != 0) { |
| 37 |
# If we failed run it again in verbose mode. |
| 38 |
$success = 0; |
| 39 |
printf |
| 40 |
"\n\n*****************************************". |
| 41 |
"\n*** Running MVOPTester test ****". |
| 42 |
"\n*****************************************\n\n"; |
| 43 |
system ('./MVOPTester/MVOPTester_test.exe -v'); |
| 44 |
} else { |
| 45 |
printf |
| 46 |
"\n ****** MVOPTester test PASSED ****** \n"; |
| 47 |
} |
| 48 |
|
| 49 |
#************************************ |
| 50 |
# Block Krylov-Schur test |
| 51 |
#************************************ |
| 52 |
|
| 53 |
$result = system ('./BlockKrylovSchur/BlockKrylovSchur_test.exe'); |
| 54 |
if ($result != 0) { |
| 55 |
# If we failed run it again in verbose mode. |
| 56 |
$success = 0; |
| 57 |
printf |
| 58 |
"\n\n*****************************************". |
| 59 |
"\n*** Running BlockKrylovSchur test ****". |
| 60 |
"\n*****************************************\n\n"; |
| 61 |
system ('./BlockKrylovSchur/BlockKrylovSchur_test.exe -v'); |
| 62 |
} else { |
| 63 |
printf |
| 64 |
"\n ****** BlockKrylovSchur test PASSED ****** \n"; |
| 65 |
} |
| 66 |
|
| 67 |
#************************************ |
| 68 |
# Block Davidson test |
| 69 |
#************************************ |
| 70 |
|
| 71 |
$result = system ('./BlockDavidson/BlockDavidson_test.exe'); |
| 72 |
if ($result != 0) { |
| 73 |
# If we failed run it again in verbose mode. |
| 74 |
$success = 0; |
| 75 |
printf |
| 76 |
"\n\n*****************************************". |
| 77 |
"\n*** Running BlockDavidson test ****". |
| 78 |
"\n*****************************************\n\n"; |
| 79 |
system ('./BlockDavidson/BlockDavidson_test.exe -v'); |
| 80 |
} else { |
| 81 |
printf |
| 82 |
"\n ****** BlockDavidson test PASSED ****** \n"; |
| 83 |
} |
| 84 |
|
| 85 |
#************************************ |
| 86 |
# LOBPCG test |
| 87 |
#************************************ |
| 88 |
|
| 89 |
$result = system ('./LOBPCG/LOBPCG_test.exe'); |
| 90 |
if ($result != 0) { |
| 91 |
# If we failed run it again in verbose mode. |
| 92 |
$success = 0; |
| 93 |
printf |
| 94 |
"\n\n*****************************************". |
| 95 |
"\n*** Running LOBPCG test ****". |
| 96 |
"\n*****************************************\n\n"; |
| 97 |
system ('./LOBPCG/LOBPCG_test.exe -v'); |
| 98 |
} else { |
| 99 |
printf |
| 100 |
"\n ****** LOBPCG test PASSED ****** \n"; |
| 101 |
} |
| 102 |
|
| 103 |
# Return 0 if all the tests were successful, else return -1. |
| 104 |
exit ($success ? 0 : -1 ); |
| 105 |
|