After wasting 3 days with scalapack, I gave up and moved to Armadillo, considering it uses lapack underneath its beatiful and easy interface.

I would like to calculate the eigen values and eigen vectors of a non-sparse Hermitian matrix. This is very easily done with Armadillo with like 4 lines of code with the function eig_sym().

My question is: Is this function parallelized? How can I parallelize it?

If not, is there any alternative that is not as crazy as lapackand supports parallelization?

BTW: I'm more than happy to implement an algorithm for splitting the matrix into submatrices with Armadillo to get the eigenvalues. Whatever works and doesn't make me spends 2 weeks to get my first set of eigenvalues.

I'm using debian 7 and Armadillo 3 is available in the repos, just in case I have to modify stuff in it (noticed that could be a necessity from reading other posts).

If you require any additional information, please ask. Thanks for your help in advance.

  • $\begingroup$ I think this is a question best asked on the Armadillo mailing lists or forums. $\endgroup$ – Wolfgang Bangerth Apr 4 '15 at 11:01
  • $\begingroup$ @WolfgangBangerth Thanks for the suggestions. I'll do that too. $\endgroup$ – The Quantum Physicist Apr 4 '15 at 11:04
  • $\begingroup$ To make eig_sym() run in parallel, link with OpenBLAS or Intel MKL instead of standard BLAS. See the Armadillo FAQ page for more information. $\endgroup$ – mtall Aug 4 '15 at 16:17

Based on a quick perusal of the Armadillo library docs and experience using it years ago, the quick and dirty answer is that Armadillo will use a thread-parallel BLAS and LAPACK library, if you link them. I think that's the extent to which shared memory parallelism is implemented in Armadillo. For distributed memory parallelism, you're probably better off using Elemental or ScaLAPACK. An acquaintance in the quantum chemistry community raves about how Elemental is easier to use than ScaLAPACK; your mileage may vary.

  • $\begingroup$ Here is documentation for calculating eigenvalues of a dense Hermitian matrix. Elemental is a distributed memory library, so assuming I understand it correctly, (a) it already assumes your matrix is distributed in one of its native data structures, and (b) it will use distributed memory parallelism to calculate the eigenvalues by default, so unless you only want a subset of the eigenvalues for your entire problem, I don't follow why you'd need to calculate subsets of the eigenvalues for parallelism. $\endgroup$ – Geoff Oxberry Apr 4 '15 at 22:16
  • $\begingroup$ Thank you very much. But what do you mean with distributed? Does it mean that I split my matrix into parts? Actually this term has been confusing me for a while and I'd love to chat with an expert. So when you say that matrix A is distributed, this means that A is the full matrix that is split into parts. Each part will go to a thread, right? $\endgroup$ – The Quantum Physicist Apr 4 '15 at 23:42
  • $\begingroup$ Each part will go to an MPI process (also referred to as a rank). Message passing and threads are different models of parallelism. If you're going to be doing large-scale quantum calculations, you probably want to focus on message passing; see this tutorial for a comparison to threads. $\endgroup$ – Geoff Oxberry Apr 4 '15 at 23:58
  • $\begingroup$ Thanks... that's a huge tutorial. Can I ask you questions in the future? $\endgroup$ – The Quantum Physicist Apr 5 '15 at 0:39
  • $\begingroup$ Post questions to the site. $\endgroup$ – Geoff Oxberry Apr 5 '15 at 1:01

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