Boost logo

Ublas :

From: Arun Tom Abraham (aruntom55_at_[hidden])
Date: 2008-02-02 09:37:10


Hi all ,

   I am a new user to ublas and bindings .. I am trying to solve a
equations of the form but have an error at the output ::

  equation is of the form Ax = b ,, where A is 3 x 3 , x is 3 x 1 and
b is 3 x 1 ...

 a snapshot of the program is :::

 #include<boost/numeric/ublas/io.hpp>
#include<boost/numeric/bindings/traits/ublas_matrix.hpp>
#include<boost/numeric/bindings/lapack/gesv.hpp>

namespace ublas = boost::numeric::ublas;

int main()
{
    ublas::matrix<float> A(3,3);
    ublas::matrix<float> b(3,1);

 /*
   Code for entering A matrix & b matrix */

  namespace lapack= boost::numeric::bindings::lapack;

  lapack::gesv(A,b);

  std::cout << b << std::endl;

  return 0;
}

 the linking with llapack was done properly ..

 -----> the error came as

 [[[[[ ** On entry to SGESV parameter number 7 had an illegal value ]]]]

 on further search i found that this corresponds to leading dimension
of the matrix B .
  http://elib.zib.de/netlib/lapack/explore-html/sgesv.f.html

the message is from lapack

need help on this ... :)

Arun

compiler ---> g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4) ...
boost version ----> latest from CVS ..