2
$\begingroup$

I use matlab/fortran to deal with some large eigenvalue problem (FEM type).

For example, I use spalloc and eigs to declare and solve the problem in Matlab,

could anyone give some advice on how can I do it in Fortran? any routine like spalloc/eigs?

$\endgroup$
3
$\begingroup$

If your matrices are dense, then LAPACK is the way to go. If they are sparse, then ARPACK is often better suited.

There is no standard equivalent of spalloc: LAPACK only supports dense matrices and ARPACK lets you store the data however you like, you just compute the action $A x$ for it.

You may also want to check out this stackoverflow question.

$\endgroup$
  • $\begingroup$ what did you mean by "store the data however you like". the problem is essentially two steps, 1) how to declare A as a sparse matrix, 2) how to solve Ax=lBy? $\endgroup$ – lorniper Jun 11 '13 at 20:21
  • 2
    $\begingroup$ With ARPACK, you don't actually pass a matrix to the library. Instead, it uses a "reverse communication interface" to give you a vector, x, and ask you to compute y = Ax for it. In a sense, your 'matrix' is really a linear operator that you can implement however you like. Ref: caam.rice.edu/software/ARPACK/UG/node9.html $\endgroup$ – Max Hutchinson Jun 11 '13 at 21:43
  • $\begingroup$ however, in order to save memory, I want to use banded storage, do you know any routine that is able to format a sparse matrix A in banded form? $\endgroup$ – lorniper Jun 12 '13 at 11:44
  • $\begingroup$ I don't know of any. You should probably just explicitly populate it. If the matrix is banded and symmetric (or Hermitian), then you can use BLAS (netlib.org/blas/dsbmv.f of zhbmv.f) and LAPACK (netlib.org/lapack/complex16/dsbev.f or zhbev.f). $\endgroup$ – Max Hutchinson Jun 12 '13 at 14:13
2
$\begingroup$

If you don't need (distributed memory) parallelization, LAPACK or ARPACK depending on the sparsity of your problems are good choices, as already answered by Max Hutchinson.

Large parallel eigenvalue solvers are a topic for ongoing research. For sparse problems, check out e.g. SLEPc, for dense problems ELPA could be interesting for you if the old workhorse ScaLAPACK doesn't cut it. The ELPA wiki contains links to a few other parallel eigensolvers as well.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.