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

Hi,

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.

thanks
dtustudy68
 
Posts: 2
Joined: Mon Jun 13, 2011 1:39 pm

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 boost...it yields good performance compared to openmp in absence of data dependencies...
gutha.raghu
 
Posts: 8
Joined: Thu Apr 05, 2012 4:55 am

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.
MarkB
 
Posts: 487
Joined: Thu Jan 08, 2009 10:12 am
Location: EPCC, University of Edinburgh


Return to Using OpenMP

Who is online

Users browsing this forum: Google [Bot] and 10 guests