In OpenMP any code inside a #pragma omp master
directive is executed by a single thread (the master), without an implied barrier at end of the region. (See section on MASTER directive in the 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
?