Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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. – Jed Brown Jan 7 '13 at 0:39
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. – Bogdanovist Jan 7 '13 at 1:25
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) – Brian Borchers Jan 7 '13 at 4:54
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? – Bogdanovist Jan 7 '13 at 5:09
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. – Brian Borchers Jan 7 '13 at 15:07
up vote 5 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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