I need to implement parallel dense matrix inversion for a language I am using that appears to not have an existing library for this (specifically IDL using IDL Bridge for message passing). I am familiar with parallel programming methods through experience using MPI in C++, though mainly for parallel FFT and N-body methods. I have little experience or knowledge of computational methods, serial or parallel, for linear algebra.

What I am looking for is a clear pseudo code description of a robust, stable parallel matrix inversion algorithm that is appropriate for a small number of cores as the machine that runs the (currently serial) IDL task has 8 cores. In practice I will probably use only 4 to keep cores free for other tasks.

I'd favour simplicity over bleeding edge performance if there are a range of well known algorithms for this task.

  • 1
    $\begingroup$ I assume you mean dense matrices. Surely you can make IDL use a threaded implementation of LAPACK (e.g., MKL or even ATLAS), using LD_PRELOAD if necessary. $\endgroup$
    – Jed Brown
    Jan 7, 2013 at 0:39
  • $\begingroup$ Yes thanks, I am after a dense matrix algorithm. I've clarified that now in the question. I'll investigate threaded LAPACK implementations as you suggest. That would be preferable if possible. Thanks for the pointer. $\endgroup$ Jan 7, 2013 at 1:25
  • $\begingroup$ IDL has had multithreaded linear algebra libraries for at least the last 3 or 4 years. I believe that LA_INVERT will run multithreaded on any recent version of IDL. Note that there's a configuration switch that controls how many threads are available (and it's probably set to single threaded by default) $\endgroup$ Jan 7, 2013 at 4:54
  • $\begingroup$ Thanks Brian. I've checked the documentation of both IDL7 and IDL8 and neither suggest LA_INVERT uses the thread pool. I've also tested that when I set IDL to invert large matrices for a while only 1 of the 8 cores gets used (according to my system monitor). I've checked the settings of !CPU and TPOOL_NTHREADS is equal to HW_NCPU which according to the documentation means threaded routines should be able to use as many cores as are physically available. I've also tried reducing TPOOL_MIN_ELTS to enforce multi-threading in LA_INVERT with no luck. Any more ideas? $\endgroup$ Jan 7, 2013 at 5:09
  • $\begingroup$ How large are your matrices? IDL won't use multithreading unless the matrices are large enough. If you've got matrices that are too small (say less than N=1000) then there won't be any performance advantages to going multithreaded and IDL won't use the multithreaded routines. There are configuration settings for this cutoff as well. I haven't used IDL in several years, but I'm really surprised that this isn't working for you- I'd suggest asking in an IDL specific forum. The comp.lang.idl=pvwave usenet gr be a good place to look. $\endgroup$ Jan 7, 2013 at 15:07

1 Answer 1


Instead of rolling your own, I would suggest you have a look at existing robust and efficient parallel implementations such as PLASMA.

If you're only looking for algorithms to implement yourself, most of the routines are documented excessively in the "Documentation" section of that site.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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