
June 25, 2015
1:31 a.m.
Nathaniel Smith <njs@pobox.com> wrote:
OpenMP is an *extremely* structured and constrained subset of shared memory multithreading, and not at all comparable to pthreads/threading.py/whatever.
If you use "parallel section" it is almost as free as using pthreads directly. But if you stick to "parallel for", which most do, you have a rather constrained and more well-behaved subset. I am quite sure MPI can even be a source of more errors than pthreads used directly. Getting message passing right inside a complex algorithm is not funny. I would rather keep my mind focused on which objects to protect with a lock or when to signal a condition. Sturla