Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50167 - in sandbox/libs/numeric/bindings: . mumps/test
From: thomas.klimpel_at_[hidden]
Date: 2008-12-06 17:24:20


Author: klimpel
Date: 2008-12-06 17:24:20 EST (Sat, 06 Dec 2008)
New Revision: 50167
URL: http://svn.boost.org/trac/boost/changeset/50167

Log:
activate mumps tests

Added:
   sandbox/libs/numeric/bindings/mumps/test/Jamfile.v2 (contents, props changed)
Text files modified:
   sandbox/libs/numeric/bindings/Jamfile.v2 | 1 +
   sandbox/libs/numeric/bindings/mumps/test/mumps_ublas.cpp | 12 ++++++------
   sandbox/libs/numeric/bindings/numeric-bindings.jam | 16 ++++++++++++++++
   3 files changed, 23 insertions(+), 6 deletions(-)

Modified: sandbox/libs/numeric/bindings/Jamfile.v2
==============================================================================
--- sandbox/libs/numeric/bindings/Jamfile.v2 (original)
+++ sandbox/libs/numeric/bindings/Jamfile.v2 2008-12-06 17:24:20 EST (Sat, 06 Dec 2008)
@@ -11,4 +11,5 @@
 build-project atlas ;
 build-project blas/test ;
 build-project lapack/test ;
+build-project mumps/test ;
 build-project umfpack/test ;

Added: sandbox/libs/numeric/bindings/mumps/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/libs/numeric/bindings/mumps/test/Jamfile.v2 2008-12-06 17:24:20 EST (Sat, 06 Dec 2008)
@@ -0,0 +1,16 @@
+# Copyright Thomas Klimpel 2008.
+# Use, modification and distribution are subject to the
+# Boost Software License, Version 1.0. (See accompanying file
+# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+project libs/numeric/bindings/mumps/test : requirements
+ <include>$(BOOST_ROOT)
+ <include>$(BOOST)
+ <library>/numeric-bindings//mumps_lib ;
+
+import testing ;
+
+alias bindings-mumps-tests :
+ [ run mumps_ublas.cpp ]
+;
+

Modified: sandbox/libs/numeric/bindings/mumps/test/mumps_ublas.cpp
==============================================================================
--- sandbox/libs/numeric/bindings/mumps/test/mumps_ublas.cpp (original)
+++ sandbox/libs/numeric/bindings/mumps/test/mumps_ublas.cpp 2008-12-06 17:24:20 EST (Sat, 06 Dec 2008)
@@ -9,7 +9,7 @@
 #include <complex>
 
 template <typename T>
-int test() {
+int test(double eps) {
   namespace ublas = ::boost::numeric::ublas ;
   namespace mumps = ::boost::numeric::bindings::mumps ;
 
@@ -73,15 +73,15 @@
   std::cout << "w : " << w << std::endl ;
   std::cout << "v : " << v << std::endl ;
 
- if ( norm_2( v - w ) > 1.e-10 * norm_2( v ) ) return 1 ;
+ if ( norm_2( v - w ) > eps * norm_2( v ) ) return 1 ;
 
   return 0 ;
 }
 
 int main() {
- if ( test<float>() ) return 1 ;
- if ( test<double>() ) return 2 ;
- if ( test< std::complex<float> >() ) return 3 ;
- if ( test< std::complex<double> >() ) return 4 ;
+ if ( test<float>(1e-5) ) return 1 ;
+ if ( test<double>(1e-10) ) return 2 ;
+ if ( test< std::complex<float> >(1e-5) ) return 3 ;
+ if ( test< std::complex<double> >(1e-10) ) return 4 ;
   return 0 ;
 }

Modified: sandbox/libs/numeric/bindings/numeric-bindings.jam
==============================================================================
--- sandbox/libs/numeric/bindings/numeric-bindings.jam (original)
+++ sandbox/libs/numeric/bindings/numeric-bindings.jam 2008-12-06 17:24:20 EST (Sat, 06 Dec 2008)
@@ -27,6 +27,10 @@
 LAPACK_PATH ?= $(NUMERIC_LIB_PATH) ;
 LAPACK_LIB ?= lapack ;
 
+MUMPS_INCLUDE ?= $(NUMERIC_LIB_PATH)/MUMPS_4.8.1/include ;
+MUMPS_PATH ?= $(NUMERIC_LIB_PATH)/MUMPS_4.8.1/lib ;
+MUMPS_LIB ?= mumps_common ;
+
 UMFPACK_INCLUDE ?= $(SUITESPARSE_INCLUDE)/UMFPACK/Include ;
 UFCONFIG_INCLUDE ?= $(SUITESPARSE_INCLUDE)/UFconfig ;
 AMD_INCLUDE ?= $(SUITESPARSE_INCLUDE)/AMD/Include ;
@@ -49,6 +53,18 @@
 lib blas_lib : fortran_lib : <name>$(BLAS_LIB) <search>$(BLAS_PATH) ;
 lib lapack_lib : fortran_lib : <name>$(LAPACK_LIB) <search>$(LAPACK_PATH) <use>blas_lib : : <library>blas_lib ;
 
+lib pthread ;
+lib mpiseq : : <search>$(MUMPS_PATH)/../libseq ;
+lib pord : : <search>$(MUMPS_PATH) ;
+lib smumps : : <search>$(MUMPS_PATH) ;
+lib dmumps : : <search>$(MUMPS_PATH) ;
+lib cmumps : : <search>$(MUMPS_PATH) ;
+lib zmumps : : <search>$(MUMPS_PATH) ;
+lib mumps_lib : smumps dmumps cmumps zmumps pord
+ fortran_lib mpiseq blas_lib pthread
+ : <name>$(MUMPS_LIB) <search>$(MUMPS_PATH)
+ : : <include>$(MUMPS_INCLUDE) ;
+
 lib amd_lib : : <name>$(AMD_LIB) <search>$(AMD_PATH)
             : : <include>$(AMD_INCLUDE)
                 <include>$(UFCONFIG_INCLUDE) ;


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