[ Thread Index | 
Date Index
| More lists.tuxfamily.org/eigen Archives
] 
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] SuperLU
- From: Trevor Irons <trevorirons@xxxxxxxxx>
- Date: Mon, 7 Sep 2009 13:14:35 -0600
- 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=J6tR2eBzXAvkGZxjcnbEoJLfooZGVUqnP140dpr698o=;         b=XKGhf0foTHswkuYs6Kl6kP5DF4BJd8pbucH1yZFKR6cqUaynvwL16yGDsoOCvQgrAQ SHtLFh6xbLxfafzthQdUIS1+sxKmG1NBOowPAPMrWYJL08qqHUjgUZ4aT6Hy9TBtagwQ       zYxWeZue5GYDisIxVDjgcBCybavOKgg8UfZz4=
- 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=drFyfAtFyNDpATl58o+RTBa3LU9oqWGFR/QBw4jowq5VkJ/49RG9aZ7Z+WJ8ADEW25 SIp+HHUHWFzn703Vu58T67CZd64Na1qC1WYuQqy+GE6pqkgrmLa4eFts0CffPqB2S7hR       Yrj2rLVQDmpUjfQ1COiUEhBKndRm3KapwJOXY=
Thanks. Working for me now :)
By the way your 'beta' Sparse module is still much better than
anything else out there IMO, very nice work.
Best,
-Trevor
2009/9/7 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
> 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
>>
>>
>>
>
>
>