openMP or boost::thread (pthread) for multithreading

General OpenMP discussion

openMP or boost::thread (pthread) for multithreading

Postby dtustudy68 » Fri Aug 19, 2011 1:23 pm


I am trying to do parallelization for a computing intensive problem.

I am working on a Linux cluster where each node is a multicore processor.
e.g. 2 or 4 quad-core processor per node.

I want to reduce latency and improve performance as much as possible.

I plan to use multiprocessing and multithreading at the same.

Each process run on a distinct node and each process spawn many threads
on each node. This is a 2 level parallelism.

For multiprocessing, I would like to choose MPI.

For multithreading, I have two choices: openMP or boost::thread (pthread).

Which one has lower latency and higher performance ?

It seems that openMP coding is easier (without touching low level thread managing manually).

But, it seems that openMP has higher overhead than boost::thread (pthread).

Any help is really appreciated.


Re: openMP or boost::thread (pthread) for multithreading

Postby gutha.raghu » Thu Apr 05, 2012 5:16 am

if the code requires locks and barrier things then prefer openmp....else choose yields good performance compared to openmp in absence of data dependencies...

Re: openMP or boost::thread (pthread) for multithreading

Postby MarkB » Fri Apr 06, 2012 4:27 am

Performance-wise, I would not expect you to see a big difference between OpenMP and Boost threads.
Posts: 746
Joined: Thu Jan 08, 2009 10:12 am
Location: EPCC, University of Edinburgh

Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 5 guests