This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen 3 and Arpack

Tags: None
(comma "," separated)
Martyorleo
Registered Member
Posts
2
Karma
0

Eigen 3 and Arpack

Tue Jun 21, 2011 3:57 pm
Hi!

Because there is no support for the lanczos, Iam forced to get Arpack++ to work;

Unfortunately its complicated and also it doesnt seems to work well with the new compilers

I need help to get Arpack to work and in order to be prepared for future, I want to use it as an extension with Eigen++. I had a look at this forum an d there is a code-snipped but with version 3 it doesnt work (because on of the sparseMatrix methods is now missing); So I downloaded version 2 but when I tried out the sample code to fill a sparse matrix, an error occurs (I will tell you tommorrow which excatly), it was something like out of of bounds, but everything seems to be correct.


System:
Suse Linux
Eclipse Galileo for c++


I would be very grateful for some help to get it to work (arpack standalone or combined with Eigen,... any other c++ solution is also welcome).

Arpack++ doenst work on my system, there occurs always a memory error (the matric is "just" 1000,1000)

Thank you very much!


By the way: Eigen++ is really nice, thank you for your work!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Eigen 3 and Arpack

Wed Jun 22, 2011 8:00 am
Arpack/Arpack++ are very old and not the simplest to use. IMO, a better alternative is SLEPC:
http://www.grycap.upv.es/slepc/

Slepc is based on PETSc (http://www.mcs.anl.gov/petsc/petsc-as/) for the matrix representation, so if there is an easy way to view an Eigen sparse matrix as a PETSc one, then you're done. Another option is to copy the data.

Another solution is IETL: http://www.comp-phys.org/software/ietl/. For IETL, in theory it should be enough to provide a small wrapper on top of Eigen with a few function, like a matrix-vector product, and a linear solver. I think I already have it somewhere, I'll let you know.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Eigen 3 and Arpack

Wed Jun 22, 2011 9:01 am
there is here an adaptor from Eigen to ublas:

https://svn.boost.org/svn/boost/sandbox ... ngs/eigen/

since IETL already has an interface to ublas, this might be the easiest way to go.
Martyorleo
Registered Member
Posts
2
Karma
0

Re: Eigen 3 and Arpack

Wed Jun 22, 2011 1:22 pm
Ill try this out!

thank you very much
cpg42
Registered Member
Posts
4
Karma
0
OS

Re: Eigen 3 and Arpack

Fri Jun 24, 2011 12:33 am
I remember having trouble getting Arpack++ to work too (by itself, not with Eigen). Turned out that for some reason it had to be compiled with 32 bit architecture (using the -m32 flag for g++, not sure about Eclipse). Of course, the drawback to this is that everything you link it with has to be compiled in 32 bit architecture... Not sure if this is your problem, but there you go.

-Carl
garrison
Registered Member
Posts
8
Karma
0

Re: Eigen 3 and Arpack

Fri Jun 27, 2014 1:21 am
A while back I wrote an Eigen interface to IETL. I have not tested it extensively, but it may still be useful to others.

https://github.com/garrison/ietl
skn123
Registered Member
Posts
8
Karma
0

Re: Eigen 3 and Arpack

Sat Sep 05, 2015 12:59 pm
https://github.com/yixuan/arpack-eigen

Might be interesting. No support for sparse matrices though
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Eigen 3 and Arpack

Sun Sep 06, 2015 7:12 am
Thank you for the pointer.
skn123
Registered Member
Posts
8
Karma
0

Re: Eigen 3 and Arpack

Sun Sep 06, 2015 9:04 am
Actually
Sparse matrix support has been enabled !


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft