Boost logo

Ublas :

From: e r (erwann.rogard_at_[hidden])
Date: 2008-03-23 21:58:16


Maik Beckmann wrote:
> Am Dienstag 11 März 2008 08:13:02 schrieb Kresimir Fresl:
>> Docs and examples for bindings library are in boost-sandbox:
>>
>> http://boost.cvs.sourceforge.net/boost-sandbox/boost-sandbox/libs/numeric/b
>> indings/
>>
>
> CVS has been replaced by subversion a while ago. Now the right way is to
> checkout the bindings code via
> svn co http://svn.boost.org/svn/boost/sandbox/boost/numeric/bindings \
> ublas_extensions/boost/numeric/bindings
> and the examples and docs via
> svn co http://svn.boost.org/svn/boost/sandbox/libs/numeric/bindings \
> ublas_extensions/libs/numeric/bindings
>
> Best,
> -- Maik
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>

Please, a bit of help:

I am able to compile and run the example in :

http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Linear_Algebra_With_UBLAS:

g++ -I/usr/local/include/boost_1_34_1 -I/usr/local/atlas/include
-I/usr/local/include/boost-bindings -O0 -g3 -Wall -c -fmessage-length=0
-MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
Finished building: ../main.cpp
Building target: testing_numeric_bindings
Invoking: GCC C++ Linker
g++ -L/usr/local/atlas/lib -o"testing_numeric_bindings" ./main.o
-llapack -lf77blas -lcblas -latlas
Finished building target: testing_numeric_bindings
Build complete for project testing_numeric_bindings

but not the example here:

http://boost.cvs.sourceforge.net/boost-sandbox/boost-sandbox/libs/numeric/bindings/lapack/test/ublas_potrf_potrs.cc?revision=1.2&view=markup

first I have to comment out utils.h and init_symm and print_m (what is
utils.h?)

second, here's what i get:

Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/include/boost_1_34_1 -I/usr/local/atlas/include
-I/usr/local/include/boost-bindings -O0 -g3 -Wall -c -fmessage-length=0
-MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
In file included from
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:20,
                 from ../main.cpp:8:
/usr/local/include/boost-bindings/boost/numeric/bindings/traits/type_traits.hpp:21:48:
warning: boost/numeric/bindings/traits/type.h: No such file or directory
In file included from ../main.cpp:8:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:22:50:
warning: boost/numeric/bindings/lapack/lapack.h: No such file or directory
/usr/local/include/boost-bindings/boost/numeric/bindings/traits/type_traits.hpp:55:
error: expected initializer before ‘*’ token
/usr/local/include/boost-bindings/boost/numeric/bindings/traits/type_traits.hpp:56:
error: expected initializer before ‘*’ token
/usr/local/include/boost-bindings/boost/numeric/bindings/traits/type_traits.hpp:58:
error: expected initializer before ‘*’ token
/usr/local/include/boost-bindings/boost/numeric/bindings/traits/type_traits.hpp:59:
error: expected initializer before ‘*’ token
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::posv(char,
int, int, float*, int, float*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:69:
error: ‘LAPACK_SPOSV’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::posv(char,
int, int, double*, int, double*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:77:
error: ‘LAPACK_DPOSV’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::posv(char,
int, int, boost::numeric::bindings::traits::complex_f*, int,
boost::numeric::bindings::traits::complex_f*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:86:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:87:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:87:
error: ‘LAPACK_CPOSV’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::posv(char,
int, int, boost::numeric::bindings::traits::complex_d*, int,
boost::numeric::bindings::traits::complex_d*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:96:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:97:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:97:
error: ‘LAPACK_ZPOSV’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::posv(char,
SymmMatrA&, MatrB&)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:122:
error: there are no arguments to ‘assert’ that depend on a template
parameter, so a declaration of ‘assert’ must be available
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:122:
error: (if you use ‘-fpermissive’, G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrf(char,
int, float*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:172:
error: ‘LAPACK_SPOTRF’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrf(char,
int, double*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:179:
error: ‘LAPACK_DPOTRF’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrf(char,
int, boost::numeric::bindings::traits::complex_f*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:186:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:186:
error: ‘LAPACK_CPOTRF’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrf(char,
int, boost::numeric::bindings::traits::complex_d*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:193:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:193:
error: ‘LAPACK_ZPOTRF’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::potrf(char, SymmMatrA&)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:213:
error: there are no arguments to ‘assert’ that depend on a template
parameter, so a declaration of ‘assert’ must be available
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrs(char,
int, int, const float*, int, float*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:256:
error: ‘LAPACK_SPOTRS’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrs(char,
int, int, const double*, int, double*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:264:
error: ‘LAPACK_DPOTRS’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrs(char,
int, int, const boost::numeric::bindings::traits::complex_f*, int,
boost::numeric::bindings::traits::complex_f*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:273:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:274:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:274:
error: ‘LAPACK_CPOTRS’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘void boost::numeric::bindings::lapack::detail::potrs(char,
int, int, const boost::numeric::bindings::traits::complex_d*, int,
boost::numeric::bindings::traits::complex_d*, int, int*)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:283:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:284:
error: ‘complex_ptr’ is not a member of ‘boost::numeric::bindings::traits’
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:284:
error: ‘LAPACK_ZPOTRS’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::potrs(char, const
SymmMatrA&, MatrB&)’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:313:
error: there are no arguments to ‘assert’ that depend on a template
parameter, so a declaration of ‘assert’ must be available
../main.cpp: In function ‘int main()’:
../main.cpp:62: warning: comparison between signed and unsigned integer
expressions
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::potrf(char,
SymmMatrA&) [with SymmMatrA = m_t]’:
../main.cpp:81: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:213:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::potrs(char, const
SymmMatrA&, MatrB&) [with SymmMatrA = m_t, MatrB = m_t]’:
../main.cpp:83: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:313:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::potrf(char,
SymmMatrA&) [with SymmMatrA = cm_t]’:
../main.cpp:129: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:213:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::potrs(char, const
SymmMatrA&, MatrB&) [with SymmMatrA = cm_t, MatrB = cm_t]’:
../main.cpp:131: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:313:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrf(char,
SymmMatrA&) [with SymmMatrA =
boost::numeric::ublas::symmetric_adaptor<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
boost::numeric::ublas::basic_lower<long unsigned int> >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:239:
  instantiated from ‘int
boost::numeric::bindings::lapack::potrf(SymmMatrA&) [with SymmMatrA =
symml_t]’
../main.cpp:74: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:200:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrs(char,
const SymmMatrA&, MatrB&) [with SymmMatrA =
boost::numeric::ublas::symmetric_adaptor<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
boost::numeric::ublas::basic_lower<long unsigned int> >, MatrB =
boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:347:
  instantiated from ‘int boost::numeric::bindings::lapack::potrs(const
SymmMatrA&, MatrB&) [with SymmMatrA = symml_t, MatrB = m_t]’
../main.cpp:76: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:291:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrf(char,
SymmMatrA&) [with SymmMatrA = boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:222:
  instantiated from ‘int boost::numeric::bindings::lapack::potrf(char,
SymmMatrA&) [with SymmMatrA = m_t]’
../main.cpp:81: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:200:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrs(char,
const SymmMatrA&, MatrB&) [with SymmMatrA =
boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
MatrB = boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:326:
  instantiated from ‘int boost::numeric::bindings::lapack::potrs(char,
const SymmMatrA&, MatrB&) [with SymmMatrA = m_t, MatrB = m_t]’
../main.cpp:83: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:291:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrf(char,
SymmMatrA&) [with SymmMatrA =
boost::numeric::ublas::matrix<std::complex<float>,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<std::complex<float>,
std::allocator<std::complex<float> > > >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:222:
  instantiated from ‘int boost::numeric::bindings::lapack::potrf(char,
SymmMatrA&) [with SymmMatrA = cm_t]’
../main.cpp:129: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:200:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrs(char,
const SymmMatrA&, MatrB&) [with SymmMatrA =
boost::numeric::ublas::matrix<std::complex<float>,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<std::complex<float>,
std::allocator<std::complex<float> > > >, MatrB =
boost::numeric::ublas::matrix<std::complex<float>,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<std::complex<float>,
std::allocator<std::complex<float> > > >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:326:
  instantiated from ‘int boost::numeric::bindings::lapack::potrs(char,
const SymmMatrA&, MatrB&) [with SymmMatrA = cm_t, MatrB = cm_t]’
../main.cpp:131: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:291:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrf(char,
SymmMatrA&) [with SymmMatrA =
boost::numeric::ublas::hermitian_adaptor<boost::numeric::ublas::matrix<std::complex<float>,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<std::complex<float>,
std::allocator<std::complex<float> > > >,
boost::numeric::ublas::basic_upper<long unsigned int> >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:239:
  instantiated from ‘int
boost::numeric::bindings::lapack::potrf(SymmMatrA&) [with SymmMatrA =
hermu_t]’
../main.cpp:139: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:200:
error: ‘assert’ was not declared in this scope
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:
In function ‘int boost::numeric::bindings::lapack::detail::potrs(char,
const SymmMatrA&, MatrB&) [with SymmMatrA =
boost::numeric::ublas::hermitian_adaptor<boost::numeric::ublas::matrix<std::complex<float>,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<std::complex<float>,
std::allocator<std::complex<float> > > >,
boost::numeric::ublas::basic_upper<long unsigned int> >, MatrB =
boost::numeric::ublas::matrix<std::complex<float>,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<std::complex<float>,
std::allocator<std::complex<float> > > >]’:
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:347:
  instantiated from ‘int boost::numeric::bindings::lapack::potrs(const
SymmMatrA&, MatrB&) [with SymmMatrA = hermu_t, MatrB = cm_t]’
../main.cpp:141: instantiated from here
/usr/local/include/boost-bindings/boost/numeric/bindings/lapack/posv.hpp:291:
error: ‘assert’ was not declared in this scope
make: *** [main.o] Error 1
make: Target `all' not remade because of errors.
Build complete for project testing_numeric_bindings_cholesky