Lapack dgesv compiles but dgesvxx does not

I need to solve a large system of equations (573 or more), which has the form (A0-A1*t)*x=b

, where A0,A1

- matrices t

- real number, and x,b

- vectors. I've used both Lapack dgesv

and MUMPS to solve this for a range of values t

, and both solvers fail for some values t

, but not the same. If the step t

is made small enough ( 1.0e-6

), then both solvers show well-defined areas where they can decide or not, but they disagree with them.

The error in both error reports is that the matrix is ​​singular when they cannot resolve. It seems to me that this is a bad conditional matrix problem, so I tried using Lackack dgesvx and dgesvxx routines on a much smaller matrix that I prepared as an example. I understand that these routines are looking for preconditions for a solution, but I'm not entirely sure.

Demonstration I did

The matrix in the example is constructed in such a way that the change in the parameter lam

makes the matrix determinant 0

when lam=0

and the solution of the system [2,3,5,7] is independent of the value lam

. I could dgesvx

compile and solve without any problem, but I couldn't appreciate almost any improvement from errors dgesv

.

So, I tried to use dgesvxx

it but gfortran

won't compile it. I ran the command

$ gfortran ill_conditioned.f90 -o ill_conditioned -llapack

and get the error message

/tmp/ccaC8jCk.o: In function `MAIN__': ill_conditioned.f90:(.text+0x38e): undefined reference to `dgesvxx_' collect2: error: ld returned 1 exit status

which doesn't happen with dgesv

or dgesvx

. I have installed lapack version 3.5.0-2ubuntu1 in my Ubuntu machine using the command sudo apt-get install liblapack-dev

.

+3


source to share


1 answer


It seems to me that the problem is with distribution.

In my distribution (OpenSUSE) I also lack dgesvxx.f

, although it lapacke.h

defines the C interface on dgesvxx

.

Finding a Symbol dgesvx

in a Shared Library



nm -D /usr/lib64/liblapack.so | grep dgesvx

      

also finds only dgesvx

, not dgesvxx

.

I would recommend you download the LAPACK source from netlib and build it yourself with high performance BLAS. You can also try OpenBLAS , which also includes LAPACK.

+2


source







All Articles