[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] SuperLU
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Mon, 7 Sep 2009 10:52:05 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=JJDBj9ISwPmFeRKd/0f3aIZ2MprgskEowTjGq9TAnWo=; b=UwxX/GiFX6nbNzrD1msn1+fHkM/YclynnYiUqSuVMk9tgiKn4L3Rb/KcLQia5ye3rG 1eTb/zw0Ts3XazAZJPdvN0DClPvrT6nwMFsPV6nWT3n0Cyk3iRYO/zHZtBWMeTjRNl+3 HezkDg+VfU8og1mRoTVREu9Wqkn6BUMPMbJD0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=KDRn2kfDJLHp6RUK+dGTiLjiKnr7T6ISlzQYrQ2oUpki7t/GjrDt5eBVHSZ6jszq6G UsLJyFElS4DshrgaGJfr5+bLFW0t7PZXpF5mN212A71EFmhi/XsUNJVBQp4y4gNXjG9x VCXSHBA52X3aEjB5gTfEoIJhzTFT4m+s1iF3Q=
Hi,
thanks for reporting this. Indeed, the problem was because I changed
the meaning of Matrix::stride() for vectors... Anyway, problem fixed
now.
cheers,
Gael.
On Thu, Sep 3, 2009 at 5:39 PM, Trevor Irons<trevorirons@xxxxxxxxx> wrote:
> Hi.
>
> Some code I had using the Sparse SuperLU solver quit working with the
> latest update (mercurial tip). I get an error
> "Parameter 13 to routine zgssvx was incorrect"
>
> Based on the SuperLU documentation this is the X vector (SuperMatrix) argument.
> Here is an example piece of code:
>
> #include <fstream>
> #include <Eigen/Core>
> #include <Eigen/Sparse>
> #include <Eigen/Array>
>
> using namespace std;
> using namespace Eigen;
>
> typedef double Real;
> typedef complex<Real> Complex;
>
> int main() {
>
> cout << "Testing Eigen2 SuperLU\n";
> int nm = 3*2;
>
> VectorXcd B(nm);
> VectorXcd X(nm);
> SparseMatrix<Complex, RowMajor> A (nm, nm);
>
> cout << "Building A,B \n";
> {
> RandomSetter<SparseMatrix<Complex, RowMajor> > setter(A);
> for (int i=0; i<nm; ++i) {
> B(i) = Complex(1e-7*rand(), 1e-9*rand());
> setter(i,i) = Complex(2, .01);
> if (i<nm-1)
> setter(i,i+1) = Complex(-1, .0);
> if (i>0)
> setter(i,i-1) = Complex(-1, .0);
> }
> }
> cout << A << endl;
> cout << B << endl;
>
> cout << "Solve for X\n";
> SparseLU<SparseMatrix<Complex>,SuperLU> slu2(A);
> slu2.solve(B, &X);
> cout << X << endl;
> }
>
> Compiling with gcc
>
> g++ -I/usr/include/atlas -g -I. -I/usr/include/superlu
> -I/home/tirons/src/eigen2 -DEIGEN_SUPERLU_SUPPORT -L/usr/lib/
> -lsuperlu /usr/lib/libblas.a -o test test.cpp -L/usr/lib/
> -lsuperlu /usr/lib/libblas.a
>
> Am I doing something wrong? I get the same error with ColMajor as well.
>
> Thanks,
>
> Trevor
>
>
>