LAPACK bindings error

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

LAPACK bindings error

dmitrypek
Hello,

I would like to solve a linear system of equations Ax=b, using LAPACK bindings.
I have installed the sandbox package and followed the examples I found on the Web.
I get the following error when compiling:

boost/numeric/bindings/detail/property_map.hpp:30:85:
error: no type named 'property_map' in 'struct boost::numeric::bindings::detail::adaptor_access<boost::numeric::ublas::matrix<double>,
void>'  typedef typename mpl::at< typename adaptor_access<T>::property_map,
Key >::type type;

I would appreciate any ideas on what I can do.
Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: LAPACK bindings error

Rutger ter Borg-2
On 2014-03-21 23:48, dmitrypek wrote:

> Hello,
>
> I would like to solve a linear system of equations Ax=b, using LAPACK
> bindings.
> I have installed the sandbox package and followed the examples I found on
> the Web.
> I get the following error when compiling:
>
> boost/numeric/bindings/detail/property_map.hpp:30:85:
> error: no type named 'property_map' in 'struct
> boost::numeric::bindings::detail::adaptor_access<boost::numeric::ublas::matrix&lt;double>,
> void>'  typedef typename mpl::at< typename adaptor_access<T>::property_map,
> Key >::type type;
>
> I would appreciate any ideas on what I can do.
> Thanks.
>
>

You are missing an include for binding ublas' matrices,

#include <boost/numeric/bindings/ublas/matrix.hpp>

Regards,

Rutger



_______________________________________________
ublas mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: LAPACK bindings error

dmitrypek
Thanks for the suggestion. This file is already included. Here is the list
of .h files I am including:

#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/vector_proxy.hpp>
#include <boost/numeric/ublas/lu.hpp>
#include <boost/numeric/ublas/triangular.hpp>
#include <boost/numeric/bindings/lapack/driver/gesv.hpp>
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>

Here is the full error message:

                                            ^
In file included from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/adaptor.hpp:49:0,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/begin.hpp:12,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:18,
                 from /home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:25,
                 from /home/dmitry/zfilter/src/tpsdemo/spline.cpp:19:
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp: In instantiation of 'struct boost::numeric::bindings::detail::property_at<boost::numeric::ublas::matrix<double>, boost::numeric::bindings::tag::value_type>':
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/value_type.hpp:20:70:   required from 'struct boost::numeric::bindings::value_type<boost::numeric::ublas::matrix<double> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:234:51:   required from 'std::ptrdiff_t boost::numeric::bindings::lapack::gesv(MatrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::numeric::ublas::matrix<double>; VectorIPIV = boost::numeric::ublas::permutation_matrix<long unsigned int>; MatrixB = boost::numeric::ublas::matrix<double>; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:86:23:   required from 'int LU_Solve(boost::numeric::ublas::matrix<T>&, boost::numeric::ublas::matrix<T>&) [with T = double]'
/home/dmitry/zfilter/src/tpsdemo/spline.cpp:110:33:   required from here
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp:35:85: error: no type named 'property_map' in 'struct boost::numeric::bindings::detail::adaptor_access<boost::numeric::ublas::matrix<double>, void>'
     typedef typename mpl::at< typename adaptor_access<T>::property_map, Key >::type type;


As you can see there seems to be a problem in detail/property_map.hpp and/or mpl/at.hpp. Do you have any idea what is going on?

Thanks for your help.

Dmitry



On Sat, Mar 22, 2014 at 5:31 AM, Rutger ter Borg-2 [via Boost] <[hidden email]> wrote:
On 2014-03-21 23:48, dmitrypek wrote:

> Hello,
>
> I would like to solve a linear system of equations Ax=b, using LAPACK
> bindings.
> I have installed the sandbox package and followed the examples I found on
> the Web.
> I get the following error when compiling:
>
> boost/numeric/bindings/detail/property_map.hpp:30:85:
> error: no type named 'property_map' in 'struct
> boost::numeric::bindings::detail::adaptor_access<boost::numeric::ublas::matrix&lt;double>,
> void>'  typedef typename mpl::at< typename adaptor_access<T>::property_map,
> Key >::type type;
>
> I would appreciate any ideas on what I can do.
> Thanks.
>
>
You are missing an include for binding ublas' matrices,

#include <boost/numeric/bindings/ublas/matrix.hpp>

Regards,

Rutger



_______________________________________________
ublas mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]



If you reply to this email, your message will be added to the discussion below:
http://boost.2283326.n4.nabble.com/LAPACK-bindings-error-tp4660582p4660586.html
To unsubscribe from LAPACK bindings error, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: LAPACK bindings error

Thomas Klimpel-2
Hi,

> This file is already included. Here is the list of .h files I am including:

The file

#include <boost/numeric/bindings/ublas/matrix.hpp>

is not included. Instead, you have included

#include <boost/numeric/ublas/matrix.hpp>
and
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
 
The fact that the file "bindings/traits/ublas_matrix.hpp" even exists in your include path means that
1) either you are not using a current version of numeric_bindings
2) or you also have an old version of numeric_bindings also in your include path
3) or you have not removed the files that are no longer part of numeric_bindings.

If you are using a current version of numeric_bindings, you can also try to include
#include <boost/numeric/bindings/ublas.hpp>
then you don't need to worry about the details of the required include files.

Regards, 
Thomas Klimpel
_______________________________________________
ublas mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: LAPACK bindings error

dmitrypek
Thomas,

Is this the latest version of boost/numeric/bindings?
https://svn.boost.org/svn/boost/sandbox/numeric_bindings/boost/numeric/bindings/

I followed your advice and included boost/numeric/bindings/ublas/matrix.hpp.
I still get quite a few errors (see below). If I include ublas.hpp I also see a number of similar errors.

Thanks very  much.

Dmitry

In file included from /home/dmitry/zfilter/boost_1_55_0/boost/serialization/trac
king.hpp:20:0,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/serialization/nvp.
hpp:32,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/serialization/arra
y.hpp:19,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/stor
age.hpp:21,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/vect
or.hpp:19,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/blas/matr
ix.hpp:16,
                 from /home/dmitry/zfilter/src/tpsdemo/spline.cpp:16:
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
 In instantiation of 'static std::ptrdiff_t boost::numeric::bindings::lapack::ge
sv_impl<Value>::invoke(MatrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::n
umeric::ublas::matrix<double>; VectorIPIV = boost::numeric::ublas::permutation_m
atrix<long unsigned int>; MatrixB = boost::numeric::ublas::matrix<double>; Value
 = double; std::ptrdiff_t = long int]':
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
234:51:   required from 'std::ptrdiff_t boost::numeric::bindings::lapack::gesv(M
atrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::numeric::ublas::matrix<do
uble>; VectorIPIV = boost::numeric::ublas::permutation_matrix<long unsigned int>
; MatrixB = boost::numeric::ublas::matrix<double>; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:87:23:   required from 'int L
U_Solve(boost::numeric::ublas::matrix<T>&, boost::numeric::ublas::matrix<T>&) [w
ith T = double]'
/home/dmitry/zfilter/src/tpsdemo/spline.cpp:110:33:   required from here
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
191:9: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_
ASSERTION_FAILURE<false>'
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );

In file included from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/d
etail/adaptor.hpp:49:0,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/b
egin.hpp:12,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/u
blas/matrix.hpp:12,
                 from /home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:16,
                 from /home/dmitry/zfilter/src/tpsdemo/spline.cpp:19:
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp
: In instantiation of 'struct boost::numeric::bindings::detail::property_at<cons
t boost::numeric::ublas::permutation_matrix<long unsigned int>, boost::numeric::
bindings::tag::entity>':
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/rank.hpp:19:8:   requir
ed from 'struct boost::numeric::bindings::rank<const boost::numeric::ublas::perm
utation_matrix<long unsigned int> >'
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/greater.hpp:60
:29:   required from 'struct boost::mpl::greater_tag<boost::numeric::bindings::r
ank<const boost::numeric::ublas::permutation_matrix<long unsigned int> > >'
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/greater.hpp:67
:8:   required from 'struct boost::mpl::greater<boost::numeric::bindings::tag::a
ddressing_index<1>, boost::numeric::bindings::rank<const boost::numeric::ublas::
permutation_matrix<long unsigned int> > >'
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/nested_type_wknd.hpp:26:31:   r
equired from 'struct boost::mpl::aux::nested_type_wknd<boost::mpl::greater<boost
::numeric::bindings::tag::addressing_index<1>, boost::numeric::bindings::rank<co
nst boost::numeric::ublas::permutation_matrix<long unsigned int> > > >'
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/and.hpp:48:8:
  required from 'struct boost::mpl::and_<boost::mpl::greater<boost::numeric::bin
dings::tag::addressing_index<1>, boost::numeric::bindings::rank<const boost::num
eric::ublas::permutation_matrix<long unsigned int> > >, boost::mpl::not_<boost::
numeric::bindings::detail::is_same_at<const boost::numeric::ublas::permutation_m
atrix<long unsigned int>, boost::numeric::bindings::tag::size_type<1>, long int>
 >, mpl_::bool_<true>, mpl_::bool_<true>, mpl_::bool_<true> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:80:63:   requi
red from 'struct boost::numeric::bindings::result_of::size<const boost::numeric:
:ublas::permutation_matrix<long unsigned int>, boost::numeric::bindings::tag::ad
dressing_index<1> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:102:1:   requi
red by substitution of 'template<class T> typename boost::enable_if<boost::mpl::
less<boost::numeric::bindings::rank<T>, mpl_::int_<2> >, typename boost::numeric
::bindings::result_of::size<const T>::type>::type boost::numeric::bindings::size
(const T&) [with T = boost::numeric::ublas::permutation_matrix<long unsigned int
>]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
199:9:   required from 'static std::ptrdiff_t boost::numeric::bindings::lapack::
gesv_impl<Value>::invoke(MatrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost:
:numeric::ublas::matrix<double>; VectorIPIV = boost::numeric::ublas::permutation
_matrix<long unsigned int>; MatrixB = boost::numeric::ublas::matrix<double>; Val
ue = double; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
234:51:   required from 'std::ptrdiff_t boost::numeric::bindings::lapack::gesv(M
atrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::numeric::ublas::matrix<do
uble>; VectorIPIV = boost::numeric::ublas::permutation_matrix<long unsigned int>
; MatrixB = boost::numeric::ublas::matrix<double>; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:87:23:   required from 'int L
U_Solve(boost::numeric::ublas::matrix<T>&, boost::numeric::ublas::matrix<T>&) [w
ith T = double]'
/home/dmitry/zfilter/src/tpsdemo/spline.cpp:110:33:   required from here
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp
:30:85: error: no type named 'property_map' in 'struct boost::numeric::bindings:
:detail::adaptor_access<const boost::numeric::ublas::permutation_matrix<long uns
igned int>, void>'
     typedef typename mpl::at< typename adaptor_access<T>::property_map, Key >::
type type;

     ^
In file included from /home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/include_p
reprocessed.hpp:37:0,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/compariso
n_op.hpp:35,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/mpl/greater.hpp:19
,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/serialization/trac
king.hpp:25,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/serialization/nvp.
hpp:32,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/serialization/arra
y.hpp:19,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/stor
age.hpp:21,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/vect
or.hpp:19,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/matr
ix.hpp:16,
                 from /home/dmitry/zfilter/src/tpsdemo/spline.cpp:16:
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/nested_type_wknd.hpp: In instan
tiation of 'struct boost::mpl::aux::nested_type_wknd<boost::mpl::greater<boost::
numeric::bindings::tag::addressing_index<1>, boost::numeric::bindings::rank<cons
t boost::numeric::ublas::permutation_matrix<long unsigned int> > > >':
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/and.hpp:48:8:
  required from 'struct boost::mpl::and_<boost::mpl::greater<boost::numeric::bin
dings::tag::addressing_index<1>, boost::numeric::bindings::rank<const boost::num
eric::ublas::permutation_matrix<long unsigned int> > >, boost::mpl::not_<boost::
numeric::bindings::detail::is_same_at<const boost::numeric::ublas::permutation_m
atrix<long unsigned int>, boost::numeric::bindings::tag::size_type<1>, long int>
 >, mpl_::bool_<true>, mpl_::bool_<true>, mpl_::bool_<true> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:80:63:   requi
red from 'struct boost::numeric::bindings::result_of::size<const boost::numeric:
:ublas::permutation_matrix<long unsigned int>, boost::numeric::bindings::tag::ad
dressing_index<1> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:102:1:   requi
red by substitution of 'template<class T> typename boost::enable_if<boost::mpl::
less<boost::numeric::bindings::rank<T>, mpl_::int_<2> >, typename boost::numeric
::bindings::result_of::size<const T>::type>::type boost::numeric::bindings::size
(const T&) [with T = boost::numeric::ublas::permutation_matrix<long unsigned int
>]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
199:9:   required from 'static std::ptrdiff_t boost::numeric::bindings::lapack::
gesv_impl<Value>::invoke(MatrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost:
:numeric::ublas::matrix<double>; VectorIPIV = boost::numeric::ublas::permutation
_matrix<long unsigned int>; MatrixB = boost::numeric::ublas::matrix<double>; Val
ue = double; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
234:51:   required from 'std::ptrdiff_t boost::numeric::bindings::lapack::gesv(M
atrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::numeric::ublas::matrix<do
uble>; VectorIPIV = boost::numeric::ublas::permutation_matrix<long unsigned int>
; MatrixB = boost::numeric::ublas::matrix<double>; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:87:23:   required from 'int L
U_Solve(boost::numeric::ublas::matrix<T>&, boost::numeric::ublas::matrix<T>&) [w
ith T = double]'
/home/dmitry/zfilter/src/tpsdemo/spline.cpp:110:33:   required from here
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/nested_type_wknd.hpp:26:31: err
or: no type named 'type' in 'struct boost::mpl::greater<boost::numeric::bindings
::tag::addressing_index<1>, boost::numeric::bindings::rank<const boost::numeric:
:ublas::permutation_matrix<long unsigned int> > >'
 template< typename T > struct nested_type_wknd
In file included from /home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/include_p
reprocessed.hpp:37:0,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/mpl/and.hpp:42,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/deta
il/config.hpp:25,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/exce
ption.hpp:19,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/stor
age.hpp:25,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/vect
or.hpp:19,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/ublas/matr
ix.hpp:16,
                 from /home/dmitry/zfilter/src/tpsdemo/spline.cpp:16:
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/and.hpp: In in
stantiation of 'struct boost::mpl::and_<boost::mpl::greater<boost::numeric::bind
ings::tag::addressing_index<1>, boost::numeric::bindings::rank<const boost::nume
ric::ublas::permutation_matrix<long unsigned int> > >, boost::mpl::not_<boost::n
umeric::bindings::detail::is_same_at<const boost::numeric::ublas::permutation_ma
trix<long unsigned int>, boost::numeric::bindings::tag::size_type<1>, long int>
>, mpl_::bool_<true>, mpl_::bool_<true>, mpl_::bool_<true> >':
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:80:63:   requi
red from 'struct boost::numeric::bindings::result_of::size<const boost::numeric:
:ublas::permutation_matrix<long unsigned int>, boost::numeric::bindings::tag::ad
dressing_index<1> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:102:1:   requi
red by substitution of 'template<class T> typename boost::enable_if<boost::mpl::
less<boost::numeric::bindings::rank<T>, mpl_::int_<2> >, typename boost::numeric
::bindings::result_of::size<const T>::type>::type boost::numeric::bindings::size
(const T&) [with T = boost::numeric::ublas::permutation_matrix<long unsigned int
>]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
199:9:   required from 'static std::ptrdiff_t boost::numeric::bindings::lapack::
gesv_impl<Value>::invoke(MatrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost:
:numeric::ublas::matrix<double>; VectorIPIV = boost::numeric::ublas::permutation
_matrix<long unsigned int>; MatrixB = boost::numeric::ublas::matrix<double>; Val
ue = double; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
234:51:   required from 'std::ptrdiff_t boost::numeric::bindings::lapack::gesv(M
atrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::numeric::ublas::matrix<do
uble>; VectorIPIV = boost::numeric::ublas::permutation_matrix<long unsigned int>
; MatrixB = boost::numeric::ublas::matrix<double>; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:87:23:   required from 'int L
U_Solve(boost::numeric::ublas::matrix<T>&, boost::numeric::ublas::matrix<T>&) [w
ith T = double]'
/home/dmitry/zfilter/src/tpsdemo/spline.cpp:110:33:   required from here
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/and.hpp:48:8:
error: 'value' is not a member of 'boost::mpl::aux::nested_type_wknd<boost::mpl:
:greater<boost::numeric::bindings::tag::addressing_index<1>, boost::numeric::bin
dings::rank<const boost::numeric::ublas::permutation_matrix<long unsigned int> >
 > >'
 struct and_
        ^
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/and.hpp: In in
stantiation of 'struct boost::mpl::and_<boost::mpl::greater<boost::numeric::bind
ings::tag::addressing_index<1>, boost::numeric::bindings::rank<const boost::nume
ric::ublas::permutation_matrix<long unsigned int> > >, boost::numeric::bindings:
:detail::is_same_at<const boost::numeric::ublas::permutation_matrix<long unsigne
d int>, boost::numeric::bindings::tag::size_type<1>, long int>, mpl_::bool_<true
>, mpl_::bool_<true>, mpl_::bool_<true> >':
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:80:63:   requi
red from 'struct boost::numeric::bindings::result_of::size<const boost::numeric:
:ublas::permutation_matrix<long unsigned int>, boost::numeric::bindings::tag::ad
dressing_index<1> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:102:1:   requi
red by substitution of 'template<class T> typename boost::enable_if<boost::mpl::
less<boost::numeric::bindings::rank<T>, mpl_::int_<2> >, typename boost::numeric
::bindings::result_of::size<const T>::type>::type boost::numeric::bindings::size
(const T&) [with T = boost::numeric::ublas::permutation_matrix<long unsigned int
>]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
199:9:   required from 'static std::ptrdiff_t boost::numeric::bindings::lapack::
gesv_impl<Value>::invoke(MatrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost:
:numeric::ublas::matrix<double>; VectorIPIV = boost::numeric::ublas::permutation
_matrix<long unsigned int>; MatrixB = boost::numeric::ublas::matrix<double>; Val
ue = double; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
234:51:   required from 'std::ptrdiff_t boost::numeric::bindings::lapack::gesv(M
atrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::numeric::ublas::matrix<do
uble>; VectorIPIV = boost::numeric::ublas::permutation_matrix<long unsigned int>
; MatrixB = boost::numeric::ublas::matrix<double>; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:87:23:   required from 'int L
U_Solve(boost::numeric::ublas::matrix<T>&, boost::numeric::ublas::matrix<T>&) [w
ith T = double]'
/home/dmitry/zfilter/src/tpsdemo/spline.cpp:110:33:   required from here
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/preprocessed/gcc/and.hpp:48:8:
error: 'value' is not a member of 'boost::mpl::aux::nested_type_wknd<boost::mpl:
:greater<boost::numeric::bindings::tag::addressing_index<1>, boost::numeric::bin
dings::rank<const boost::numeric::ublas::permutation_matrix<long unsigned int> >
 > >'
In file included from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/d
etail/adaptor.hpp:49:0,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/b
egin.hpp:12,
                 from /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/u
blas/matrix.hpp:12,
                 from /home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:16,
                 from /home/dmitry/zfilter/src/tpsdemo/spline.cpp:19:
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp
: In instantiation of 'struct boost::numeric::bindings::detail::property_at<cons
t boost::numeric::ublas::permutation_matrix<long unsigned int>, boost::numeric::
bindings::tag::size_type<1> >':
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp
:40:8:   required from 'struct boost::numeric::bindings::detail::is_same_at<cons
t boost::numeric::ublas::permutation_matrix<long unsigned int>, boost::numeric::
bindings::tag::size_type<1>, long int>'
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/aux_/nested_type_wknd.hpp:26:31:   r
equired from 'struct boost::mpl::aux::nested_type_wknd<boost::numeric::bindings:
:detail::is_same_at<const boost::numeric::ublas::permutation_matrix<long unsigne
d int>, boost::numeric::bindings::tag::size_type<1>, long int> >'
/home/dmitry/zfilter/boost_1_55_0/boost/mpl/not.hpp:39:8:   required from 'struc
t boost::mpl::not_<boost::numeric::bindings::detail::is_same_at<const boost::num
eric::ublas::permutation_matrix<long unsigned int>, boost::numeric::bindings::ta
g::size_type<1>, long int> >'
/home/dmitry/zfilter/boost_1_55_0/boost/utility/enable_if.hpp:36:10:   required
from 'struct boost::enable_if<boost::mpl::not_<boost::numeric::bindings::detail:
:is_same_at<const boost::numeric::ublas::permutation_matrix<long unsigned int>,
boost::numeric::bindings::tag::size_type<1>, long int> >, void>'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/get.hpp:83:54:
 [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disabl
e ]
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:80:63:   requi
red from 'struct boost::numeric::bindings::result_of::size<const boost::numeric:
:ublas::permutation_matrix<long unsigned int>, boost::numeric::bindings::tag::ad
dressing_index<1> >'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/size.hpp:102:1:   requi
red by substitution of 'template<class T> typename boost::enable_if<boost::mpl::
less<boost::numeric::bindings::rank<T>, mpl_::int_<2> >, typename boost::numeric
::bindings::result_of::size<const T>::type>::type boost::numeric::bindings::size
(const T&) [with T = boost::numeric::ublas::permutation_matrix<long unsigned int
>]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
199:9:   required from 'static std::ptrdiff_t boost::numeric::bindings::lapack::
gesv_impl<Value>::invoke(MatrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost:
:numeric::ublas::matrix<double>; VectorIPIV = boost::numeric::ublas::permutation
_matrix<long unsigned int>; MatrixB = boost::numeric::ublas::matrix<double>; Val
ue = double; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
234:51:   required from 'std::ptrdiff_t boost::numeric::bindings::lapack::gesv(M
atrixA&, VectorIPIV&, MatrixB&) [with MatrixA = boost::numeric::ublas::matrix<do
uble>; VectorIPIV = boost::numeric::ublas::permutation_matrix<long unsigned int>
; MatrixB = boost::numeric::ublas::matrix<double>; std::ptrdiff_t = long int]'
/home/dmitry/zfilter/src/tpsdemo/ludecomposition.h:87:23:   required from 'int L
U_Solve(boost::numeric::ublas::matrix<T>&, boost::numeric::ublas::matrix<T>&) [with T = double]'
/home/dmitry/zfilter/src/tpsdemo/spline.cpp:110:33:   required from here
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp
:30:85: error: no type named 'property_map' in 'struct boost::numeric::bindings:
:detail::adaptor_access<const boost::numeric::ublas::permutation_matrix<long uns
igned int>, void>'
     typedef typename mpl::at< typename adaptor_access<T>::property_map, Key >::
type type;

...




On Mon, Mar 24, 2014 at 9:10 AM, Thomas Klimpel-2 [via Boost] <[hidden email]> wrote:
Hi,

> This file is already included. Here is the list of .h files I am including:

The file

#include <boost/numeric/bindings/ublas/matrix.hpp>

is not included. Instead, you have included

#include <boost/numeric/ublas/matrix.hpp>
and
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
 
The fact that the file "bindings/traits/ublas_matrix.hpp" even exists in your include path means that
1) either you are not using a current version of numeric_bindings
2) or you also have an old version of numeric_bindings also in your include path
3) or you have not removed the files that are no longer part of numeric_bindings.

If you are using a current version of numeric_bindings, you can also try to include
#include <boost/numeric/bindings/ublas.hpp>
then you don't need to worry about the details of the required include files.

Regards, 
Thomas Klimpel
_______________________________________________
ublas mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]


If you reply to this email, your message will be added to the discussion below:
http://boost.2283326.n4.nabble.com/LAPACK-bindings-error-tp4660582p4660663.html
To unsubscribe from LAPACK bindings error, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: LAPACK bindings error

Thomas Klimpel-2
Hi,


> Is this the latest version of boost/numeric/bindings?
> https://svn.boost.org/svn/boost/sandbox/numeric_bindings/boost/numeric/bindings/

Yes, at least that's the version I use. (Maybe I should try to get up to speed with "git", so I could answer such questions with more confidence.)


I think the errors that you showed now should be fixable. The first error I see is
 
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
191:9: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
 
One issue here is that the lapack routine xGESV expects two matrices: A of size (n,n), and B of size(n,nrhs). The bindings are generated automatically, and we didn't generate a version to also accept a vector for B. (Not sure whether this would be desirable.)  
In case you already tried to use a matrix for B, you might have forgotten to add "blas::column_major", i.e. "ublas::matrix<double, ublas::column_major>" instead of just "ublas::matrix<double>", because lapack always expects column_major matrices.


Another error I see is
 
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp
:30:85: error: no type named 'property_map' in 'struct boost::numeric::bindings::detail::adaptor_access<const boost::numeric::ublas::permutation_matrix<long unsigned int>, void>'
     typedef typename mpl::at< typename adaptor_access<T>::property_map, Key >::type type;

The type "ublas::permutation_matrix" from "numeric/ublas/lu.hpp" is totally unrelated to lapack and the bindings. You just need a vector of integers here (for example ublas::vector<fortran_int_t> or std::vector<fortran_int_t> would work, if you include numeric/bindings/std/vector.hpp), lapack will know how to interpret this as a permutation matrix.

Regards,
 
Thomas Klimpel
_______________________________________________
ublas mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: LAPACK bindings error

dmitrypek
Thanks - this seemed to work, at least for compiling the program. Now I am facing incorrect results, which I will investigate.
Thank you for your help.

Dmitry


On Mon, Mar 24, 2014 at 10:29 AM, Thomas Klimpel-2 [via Boost] <[hidden email]> wrote:
Hi,


> Is this the latest version of boost/numeric/bindings?
> https://svn.boost.org/svn/boost/sandbox/numeric_bindings/boost/numeric/bindings/

Yes, at least that's the version I use. (Maybe I should try to get up to speed with "git", so I could answer such questions with more confidence.)


I think the errors that you showed now should be fixable. The first error I see is
 
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
191:9: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
 
One issue here is that the lapack routine xGESV expects two matrices: A of size (n,n), and B of size(n,nrhs). The bindings are generated automatically, and we didn't generate a version to also accept a vector for B. (Not sure whether this would be desirable.)  
In case you already tried to use a matrix for B, you might have forgotten to add "blas::column_major", i.e. "ublas::matrix<double, ublas::column_major>" instead of just "ublas::matrix<double>", because lapack always expects column_major matrices.


Another error I see is
 
/home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/detail/property_map.hpp
:30:85: error: no type named 'property_map' in 'struct boost::numeric::bindings::detail::adaptor_access<const boost::numeric::ublas::permutation_matrix<long unsigned int>, void>'
     typedef typename mpl::at< typename adaptor_access<T>::property_map, Key >::type type;

The type "ublas::permutation_matrix" from "numeric/ublas/lu.hpp" is totally unrelated to lapack and the bindings. You just need a vector of integers here (for example ublas::vector<fortran_int_t> or std::vector<fortran_int_t> would work, if you include numeric/bindings/std/vector.hpp), lapack will know how to interpret this as a permutation matrix.

Regards,
 
Thomas Klimpel
_______________________________________________
ublas mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]


If you reply to this email, your message will be added to the discussion below:
http://boost.2283326.n4.nabble.com/LAPACK-bindings-error-tp4660582p4660672.html
To unsubscribe from LAPACK bindings error, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: LAPACK bindings error

Rutger ter Borg-2
In reply to this post by Thomas Klimpel-2

On 2014-03-24 18:28, Thomas Klimpel wrote:
> Hi,
>
>
>> Is this the latest version of boost/numeric/bindings?
>> https://svn.boost.org/svn/boost/sandbox/numeric_bindings/boost/numeric/bindings/
>
> Yes, at least that's the version I use. (Maybe I should try to get up to speed with "git", so I could answer such questions with more confidence.)

Svn is closed for commits. Since then, I've added a few bugfixes, and,
I've put my copy here

https://github.com/terborg/numeric_bindings

>
> I think the errors that you showed now should be fixable. The first error I see is
>
> /home/dmitry/zfilter/boost_1_55_0/boost/numeric/bindings/lapack/driver/gesv.hpp:
> 191:9: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'
>           BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
>
> The bindings are generated automatically, and we didn't generate a version to also accept a vector for B. (Not sure whether this would be desirable.)

It would be a minor adjustment in a few traits classes: we would have to
agree that vectors have a column major data order by default. That's
all, traits for sizes. strides, etc., are already capable of dealing
with this.

Cheers,

Rutger



_______________________________________________
ublas mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]