Boost logo

Ublas :

Subject: Re: [ublas] [bindings] New traits system
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2010-01-15 06:39:19


Rutger ter Borg wrote:
> I've also started to port the atlas regressions, which has uncovered some
> bugs and missing features in the blas (and lapack) bindings. Apart from
> this, in which Jamfile are BOOST_NUMERIC_BINDINGS_BLAS_CBLAS and/or
> BOOST_NUMERIC_BINDINGS_LAPACK_CLAPACK to be added? Somewhere near ATLAS, I
> guess, so we can run the resulting atlas/blas regressions on all supported
> backends. However, bjam gave errors on all of my trials.

What I typed (in the libs/numeric/bindings/atlas directory) to test your reported porting of ublas_symm2 was

bjam define=BOOST_NUMERIC_BINDINGS_LAPACK_CLAPACK define=BOOST_NUMERIC_BINDINGS_BLAS_CBLAS ublas_symm2

This worked, but this is just me cheating again. What you are interested in is probably "svn diff numeric-bindings.jam":

Index: numeric-bindings.jam
===================================================================
--- numeric-bindings.jam (revision 59031)
+++ numeric-bindings.jam (working copy)
@@ -94,9 +94,11 @@
 lib atlas_lib : : <name>$(ATLAS_LIB) <search>$(ATLAS_PATH)
               : : <include>$(ATLAS_INCLUDE) ;
 lib cblas_lib : : <name>$(CBLAS_LIB) <search>$(ATLAS_PATH)
- : : <include>$(ATLAS_INCLUDE) ;
+ : : <include>$(ATLAS_INCLUDE)
+ <define>BOOST_NUMERIC_BINDINGS_BLAS_CBLAS ;
 lib lapack_atlas_lib : : <name>$(LAPACK_ATLAS_LIB) <search>$(ATLAS_PATH)
- : : <include>$(ATLAS_INCLUDE) ;
+ : : <include>$(ATLAS_INCLUDE)
+ <define>BOOST_NUMERIC_BINDINGS_LAPACK_CLAPACK ;
 
 lib f_blas_lib : fortran_lib : <name>$(BLAS_LIB) <search>$(BLAS_PATH) ;
 lib f_lapack_lib : fortran_lib : <name>$(LAPACK_LIB) <search>$(LAPACK_PATH) <use>blas_lib

This "official" way is described under

http://www.boost.org/doc/tools/build/doc/html/bbv2/tasks/libraries.html

slightly edited quote:
Library targets are created using the lib rule, which follows the common syntax (http://www.boost.org/doc/tools/build/doc/html/bbv2/overview/targets.html#bbv2.main-target-rule-syntax):

rule rule-name (
     main-target-name :
     sources + :
     requirements * :
     default-build * :
     usage-requirements * )

So in the file "libs/numeric/bindings/numeric_bindings.jam" the library target "cblas_lib" needs the usage-requirement "<define>BOOST_NUMERIC_BINDINGS_BLAS_CBLAS" and the library target "lapack_atlas_lib" needs the usage-requirement
"<define>BOOST_NUMERIC_BINDINGS_LAPACK_CLAPACK".

This is exactly what the above modifications do.

Regards,
Thomas