Boost logo

Ublas :

Subject: [ublas] [bindings] Problem with lapack::tgsen (and possible patch)
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2010-08-26 11:29:25


Hello,

If I compile the code you find in the attachment (lapack_tgsen.cpp)
with GCC v 4.4.4:
  g++ -Wall -Wextra -ansi -pedantic ...

I get two errors:

--- [errors] ---
...
boost-numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp:218:
error: no matching function for call to
‘boost::numeric::bindings::lapack::tgsen_impl<double,
void>::min_size_iwork(const fortran_int_t&, ptrdiff_t, int&)’
...
boost-numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp:220:
error: no matching function for call to
‘boost::numeric::bindings::lapack::tgsen_impl<double,
void>::min_size_work(const fortran_int_t&, ptrdiff_t, int&)’
--- [/errors] ---

After fixing the type of parameters of the above functions, this time
I get a runtime error due to the failure of the assertion at line 218.

As a matter of fact, I checked the code of tsgen.hpp against the
LAPACK source code
  CTGSEN: http://www.netlib.org/lapack/explore-html/a00524_source.html
  DTGSEN: http://www.netlib.org/lapack/explore-html/a00961_source.html
  STGSEN: http://www.netlib.org/lapack/explore-html/a01391_source.html
  ZTGSEN: http://www.netlib.org/lapack/explore-html/a01753_source.html

and it seems that both "min_size_iwork" and "min_size_work" do not
consider the case "ijob == 0".

I've tried to create a both for both the real (i.e., the one
considered above) and complex case (see the other attachment).
[Yes, I know ... tgsen is autogenerated but the patch is just to give
you an idea of what to fix ;) ]

What do you think?

Thank you very much!!

Cheers,

-- Marco