On 26/04/16 16:54, Francis Poulin wrote:
Thanks Lawrence and Fabio for your feedback.
Fabio: I tried running it on 4 cores using mpirun and there were 4 jobs, two of which used 100% or so and the other two used 1500% or so. It seems that ubuntu optimizes to use as many threads as possible. A nice feature.
Please note that firedrake doesn't use any threaded parallelisation right now. So I don't know what the other cores are doing running at 1500% of CPU, but I suspect they are slowing things down!
Lawrence: Yes, when I tried what you suggested it only used one core, as you predicted. Thanks for pointing that out.
This is your best option
I am not sure of a 2D problem with a 200x200 grid can really be very efficient on 16 cores but I will try running an mpi job on 4 or maybe even 8 and see how that compares with the threading.
Now that I know that firedrake does automatic threading on ubuntu but has the ability to do mpi, I'd like to know which one I should use to be efficient.
Firedrake doesn't actually use any automatic threading! It's just that any library which happens to have linked against openmp on ubuntu spawns loads of threads that sit spinning idly. To achieve parallelisation please set OMP_NUM_THREADS to 1 and use mpirun. Thanks, Lawrence