|
Ublas : |
Subject: [ublas] boost numeric bindings lapack gesv + RHEL5 issue.
From: Sunil Thomas (sgthomas27_at_[hidden])
Date: 2011-09-20 17:04:18
Hi!
I am using boost numeric bindings for doing a direct solve using the
lapack function gesv. While this
works great on Windows and gives me the right answer, the exact same matrix
(I printed it out to make
sure) fails on Linux RHEL4 or RHEL5 (returns info=3, zero element on
diagonal). I think the Windows
case was able to pivot it automatically. I am working with some legacy code
here and I see some lines
such as:
#define BOOST_NUMERIC_BINDINGS_USE_CLAPACK // To get the right calling
convention for the fortran
#include <boost/numeric/bindings/lapack/lapack_names.h>
#if defined(WIN64) || _MSC_VER >= 1500
#undef LAPACK_DGELSS
#define LAPACK_DGELSS DGELSS
#undef LAPACK_DGESV
#define LAPACK_DGESV DGESV
#endif
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
PUSH_DISABLED_MSVC_WARNING(4244 4189)
#include <boost/numeric/bindings/lapack/gelss.hpp>
#include <boost/numeric/bindings/lapack/gesv.hpp>
POP_DISABLED_MSVC_WARNING()
It looks like the fix might be something really trivial, but I have no
clue where to look for a hint to resolve
the problem.. appreciate if somebody who's an expert at using boost ublas
can kindly help resolve this
problem.
Thanks a lot for your time,
--S.