Boost logo

Ublas :

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2005-02-07 10:07:21

Thomas Lemaire wrote:

> Dear list,
> I already succesfully used lapack::gesv() binding.
> When calling lapack::syev(), my program hangs. I get no error from
> boost bindings, neither from LAPACK. I both tryed with minimal and
> optimal workspace, and 'L' and 'U' part of the matrix.
> any help ??
> Here is a test code:
> #include "boost/numeric/bindings/lapack/syev.hpp"
> #include "boost/numeric/bindings/traits/ublas_matrix.hpp"
> #include "boost/numeric/bindings/traits/ublas_vector.hpp"
> namespace lapack = boost::numeric::bindings::lapack;
> void test_syev(const ublas::symmetric_matrix<double>& cov_,
> ublas::vector<double>& lambda)
> {
> ublas::matrix<double, ublas::column_major> A(cov_);
> lapack::syev( 'V', 'L', A, lambda, lapack::minimal_workspace() );
> }
> PS: I know lapack proposes some better suited routines for symmetric
> real matrix, but the bindings do not exist yet in boost, so I first
> want to try this more general routine...

Dear Thomas,

The matrix you pass on to syev cannot be a symmetric_matrix, since this
is in packed format. It should be a matrix<double,column_major>.
This is not mentioned in the documentation. It should be added.
I am a bit surprised it compiles, since the binding tests on wether the
structure_type is general_t.