Boost logo

Boost Users :

Subject: Re: [Boost-users] uBlas with Atlas
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 2010-03-12 13:19:37


Am 12.03.2010 um 18:20 schrieb Rutger ter Borg:

> Kraus Philipp wrote:
>
>> Hello,
>>
>> I try to install the numerical bindings for my boost, but I can't
>> compile
>> the examples. I had installed and compilde the Atlas Lib 3.9.23 with
>> Lapack support and the Boost 1.42 with MPI Support under OS X Leo.
>>
>> I take a look at
>> http://www.opentissue.org/wikitissue/index.php/Boost_bindings but I
>> had
>> checked out the bindungs with and without the -v1 prefix and try
>> to compile the examples under the lib directory.
>>
>> How can I work with the boost uBlas structures and the Atlas lib,
>> so I
>> can use
>> the Cholesky factorisation with a uBlas matrix? Can you help me to
>> install
>> the bindings correctly?
>>
>
> Sure, I can help with the one without the -v1 suffix. The
> regressions tests
> should work for 98%, the examples however aren't ported yet to the
> newer
> bindings structure. One of the major changes in the newer bindings
> is that
> if you would like to use atlas, it's still blas, so
>
> bindings::atlas::gemm( ... )
>
> becomes
>
> bindings::blas::gemm( ... )
>
> and if you would like to compile and link against ATLAS, define
>
> BOOST_NUMERIC_BINDINGS_BLAS_CBLAS
>
> Hope this helps, please let me know if I can help further.

Thank a lot, but I run into errors, because I can't see my error.

1. I had checked out svn co http://svn.boost.org/svn/boost/sandbox/numeric_bindings/boost/numeric/bindings
but there isn't a "atlas" subdirectory

2. I had compiled my atlas like http://math-atlas.sourceforge.net/atlas_install/atlas_install.html#SECTION00041000000000000000
without fortran and the lapack. I had got 4 libs

3. I have took the example on http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Linear_Algebra_With_UBLAS
but without the atlas subdir I can't compile it.

4. Then I try to write my own example:

#define BOOST_NUMERIC_BINDINGS_BLAS_CBLAS

#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/bindings/blas/level1.hpp>
or
#include <boost/numeric/bindings/blas/level1/nrm2.hpp>

namespace ublas = boost::numeric::ublas;
namespace atlas = boost::numeric::bindings::atlas;

int main() {
     ublas::vector<float> sv (8);
     std::cout << atlas::nrm2 (sv) << std::endl;
}

but the namespace isn't defined. So I search the nrm2.hpp
and set the include directly, but it doesn't work.

I don't understand how to use the bindings, because I can't
find a documentation with a working example like on the
boost main page.

Thanks a lot.

Phil



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net