What is the benefit of '#pragma omp master' as opposed to '#pragma omp
single'?
In OpenMP any code inside a #pragma omp master directive is executed by a
single thread (the master), without an implied barrier at the region. LLNL
OpenMP tutorial
This seems equivalent to #pragma omp single nowait (with the exception
that rather than the 'master', any thread may execute the single region).
Under what circumstances, if any, is it beneficial to use #pragma omp master?
No comments:
Post a Comment