|
Boost-Commit : |
From: thomas.klimpel_at_[hidden]
Date: 2008-07-05 09:06:28
Author: klimpel
Date: 2008-07-05 09:06:27 EDT (Sat, 05 Jul 2008)
New Revision: 47108
URL: http://svn.boost.org/trac/boost/changeset/47108
Log:
run all available umfpack-bindings regression tests, using both in1 and in4 as input
Text files modified:
sandbox/libs/numeric/bindings/umfpack/test/Jamfile.v2 | 7 ++++---
sandbox/libs/numeric/bindings/umfpack/test/umf4.cc | 20 ++++++++++++++------
sandbox/libs/numeric/bindings/umfpack/test/umfpack_di_demo.cc | 40 ++++++++++++++++++++++++----------------
sandbox/libs/numeric/bindings/umfpack/test/umfpack_zi_demo.cc | 40 ++++++++++++++++++++++++----------------
4 files changed, 66 insertions(+), 41 deletions(-)
Modified: sandbox/libs/numeric/bindings/umfpack/test/Jamfile.v2
==============================================================================
--- sandbox/libs/numeric/bindings/umfpack/test/Jamfile.v2 (original)
+++ sandbox/libs/numeric/bindings/umfpack/test/Jamfile.v2 2008-07-05 09:06:27 EDT (Sat, 05 Jul 2008)
@@ -11,9 +11,10 @@
import testing ;
alias bindings-umfpack-tests :
- [ link umf4.cc ]
- [ link umfpack_di_demo.cc ]
+ [ run umf4.cc : a : in1 : : umf4_in1 ]
+ [ run umf4.cc : a : in4 : : umf4_in4 ]
+ [ run umfpack_di_demo.cc : -y ]
[ run umfpack_simple.cc ]
- [ link umfpack_zi_demo.cc ]
+ [ run umfpack_zi_demo.cc : -y ]
;
Modified: sandbox/libs/numeric/bindings/umfpack/test/umf4.cc
==============================================================================
--- sandbox/libs/numeric/bindings/umfpack/test/umf4.cc (original)
+++ sandbox/libs/numeric/bindings/umfpack/test/umf4.cc 2008-07-05 09:06:27 EDT (Sat, 05 Jul 2008)
@@ -128,6 +128,7 @@
cout << "Continue (y/n) -> ";
cin >> yes;
if (yes == 'y') break;
+ if (yes == 'n') exit (0);
}
}
@@ -247,13 +248,20 @@
// no aggressive absorption
Control [UMFPACK_AGGRESSIVE] = 0;
}
+ bool call_wait4y = true;
+ string ifs_name;
+ if (argc > 2) {
+ call_wait4y = false;
+ ifs_name = argv [2];
+ }
umf::report_control (Control);
// open the matrix file
- cout << "input file -> ";
- string ifs_name;
- cin >> ifs_name;
+ if (ifs_name.empty()) {
+ cout << "input file -> ";
+ cin >> ifs_name;
+ }
ifstream f (ifs_name.c_str());
if (!f) {
cout << "unable to open file" << endl;
@@ -276,7 +284,7 @@
cout << "matrix A: ";
umf::report_matrix (A, Control);
- wait4y();
+ if (call_wait4y) wait4y();
// symbolic factorization
umf::info_type<> Info;
@@ -293,7 +301,7 @@
}
umf::report_symbolic (Symbolic, Control);
- wait4y();
+ if (call_wait4y) wait4y();
// numeric factorization
umf::numeric_type<> Numeric;
@@ -309,7 +317,7 @@
}
umf::report_numeric (Numeric, Control);
- wait4y();
+ if (call_wait4y) wait4y();
// solve Ax=b
if (nrow == ncol && status == UMFPACK_OK) {
Modified: sandbox/libs/numeric/bindings/umfpack/test/umfpack_di_demo.cc
==============================================================================
--- sandbox/libs/numeric/bindings/umfpack/test/umfpack_di_demo.cc (original)
+++ sandbox/libs/numeric/bindings/umfpack/test/umfpack_di_demo.cc 2008-07-05 09:06:27 EDT (Sat, 05 Jul 2008)
@@ -104,6 +104,7 @@
cout << "Continue (y/n) -> ";
cin >> yes;
if (yes == 'y') break;
+ if (yes == 'n') exit (0);
}
}
@@ -163,7 +164,14 @@
/* main program */
/* ------------------------------------------------------------------- */
-int main() {
+int main (int argc, char **argv) {
+ bool call_wait4y = true;
+ if (argc > 1) {
+ char *s = argv [1];
+ if (s [0] == '-' && s [1] == 'y') {
+ call_wait4y = false;
+ }
+ }
/* ---------------------------------------------------------------- */
/* initialisations */
@@ -210,7 +218,7 @@
/* symbolic factorisation */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSymbolic factorisation:" << endl;
@@ -229,7 +237,7 @@
/* numeric factorisation */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nNumeric factorisation:" << endl;
@@ -248,7 +256,7 @@
/* solve Ax=b */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b:" << endl;
@@ -269,7 +277,7 @@
/* solve Ax=b, broken down into steps */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b (broken down into steps):" << endl;
@@ -299,7 +307,7 @@
/* solve A'x=b */
/* ------------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve A'x = b:" << endl;
@@ -320,7 +328,7 @@
/* modify one numerical value in the column-form of A */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nModify A (1,4) if present:" << endl;
@@ -344,7 +352,7 @@
/* redo the numeric factorization */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nRedo the numeric factorization:" << endl;
@@ -371,7 +379,7 @@
/* solve Ax=b, with the modified A */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b with the modified A:" << endl;
@@ -392,7 +400,7 @@
/* modify all of the numerical values of A, but not the pattern */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nModify numerical values of A:" << endl;
@@ -413,7 +421,7 @@
/* redo the numeric factorization */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nRedo the numeric factorization:" << endl;
@@ -432,7 +440,7 @@
/* solve Ax=b, with the modified A */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b with the modified A:" << endl;
@@ -460,7 +468,7 @@
/* C = transpose of A */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nC = transpose of A:" << endl;
@@ -472,7 +480,7 @@
/* symbolic factorization of C */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSymbolic factorization of C:" << endl;
@@ -489,7 +497,7 @@
/* numeric factorization of C */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nNumeric factorization of C:" << endl;
@@ -506,7 +514,7 @@
/* solve C'x=b */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve C'x = b:" << endl;
Modified: sandbox/libs/numeric/bindings/umfpack/test/umfpack_zi_demo.cc
==============================================================================
--- sandbox/libs/numeric/bindings/umfpack/test/umfpack_zi_demo.cc (original)
+++ sandbox/libs/numeric/bindings/umfpack/test/umfpack_zi_demo.cc 2008-07-05 09:06:27 EDT (Sat, 05 Jul 2008)
@@ -113,6 +113,7 @@
cout << "Continue (y/n) -> ";
cin >> yes;
if (yes == 'y') break;
+ if (yes == 'n') exit (0);
}
}
@@ -172,7 +173,14 @@
/* main program */
/* ------------------------------------------------------------------- */
-int main() {
+int main (int argc, char **argv) {
+ bool call_wait4y = true;
+ if (argc > 1) {
+ char *s = argv [1];
+ if (s [0] == '-' && s [1] == 'y') {
+ call_wait4y = false;
+ }
+ }
/* ---------------------------------------------------------------- */
/* initialisations */
@@ -225,7 +233,7 @@
/* symbolic factorisation */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSymbolic factorisation:" << endl;
@@ -244,7 +252,7 @@
/* numeric factorisation */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nNumeric factorisation:" << endl;
@@ -263,7 +271,7 @@
/* solve Ax=b */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b:" << endl;
@@ -284,7 +292,7 @@
/* solve Ax=b, broken down into steps */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b (broken down into steps):" << endl;
@@ -315,7 +323,7 @@
/* note that this is the complex conjugate transpose, A' */
/* ------------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve A'x = b:" << endl;
@@ -336,7 +344,7 @@
/* modify one numerical value in the column-form of A */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nModify A (1,4) if present:" << endl;
@@ -360,7 +368,7 @@
/* redo the numeric factorization */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nRedo the numeric factorization:" << endl;
@@ -387,7 +395,7 @@
/* solve Ax=b, with the modified A */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b with the modified A:" << endl;
@@ -409,7 +417,7 @@
/* modify all of the numerical values of A, but not the pattern */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nModify numerical values of A:" << endl;
@@ -433,7 +441,7 @@
/* redo the numeric factorization */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nRedo the numeric factorization:" << endl;
@@ -452,7 +460,7 @@
/* solve Ax=b, with the modified A */
/* ------------------------------------------------------------------ */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve Ax = b with the modified A:" << endl;
@@ -480,7 +488,7 @@
/* C = transpose of A */
/* ---------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nC = transpose of A:" << endl;
@@ -492,7 +500,7 @@
/* symbolic factorization of C */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSymbolic factorization of C:" << endl;
@@ -509,7 +517,7 @@
/* numeric factorization of C */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nNumeric factorization of C:" << endl;
@@ -526,7 +534,7 @@
/* solve C'x=b */
/* ----------------------------------------------------------------- */
- wait4y();
+ if (call_wait4y) wait4y();
cout << "\nSolve C'x = b:" << endl;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk