[Omp] Waiting on a condition variable

Michael Suess mike_ml at suessnetz.de
Fri Jan 19 03:24:32 PST 2007


On Friday 12 January 2007 04:52, hpc wire wrote:
> Hi,
>
> Would like to find out if OMP supports this functionality of waiting on a
> condition variable?

Hi,

sorry for the long time with no response. No, OpenMP does not support that 
functionality. I have presented a proposal for a solution to this problem at 
last years IWOMP (the paper is online here, if you are interested:
http://iwomp.univ-reims.fr/cd/papers/WSL06.pdf), but the idea was not met with 
too much enthusiasm, so don't expect this to end up in OpenMP anytime 
soon :-).

> Pthread has "pthread_cond_wait" and "pthread_cond_signal". Does OMP have
> something similar?
>
> If not, what do most people do to achieve this?

All you can basically do is busy-wait, i.e. spin in a loop until your 
condition becomes true.

Best regards,
Michael

-- 
My blog on parallel programming: http://www.thinkingparallel.com
Michael Suess
Public PGP key: http://www.suessnetz.de/michael/michaelsuess.gpg
PGP key fingerprint: A744 AFBA CA93 620B 8701 AB98 D4CF 4F3C 945A 61FE


More information about the Omp mailing list