Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
1699 Discussions

Can a master region appear in OpenMP work-sharing region?

ClayB
New Contributor I
530 Views
A question came up today about whether or not an OpenMP work-sharing region could contain a master region. There was no apparent language in the OpenMP Fortran spec that disallowed this (even in the latest 2.5 version). However, the compiler was not allowing this particular nesting of directives.
Anyone have any thoughts or advice on using a master region (code will only be executed by the master thread) inside a work-sharing construct (like parallel do)? Can you think of any algorithm that might need this functionality? Should this be allowed? If not, how would you try to "fix" the code that was written this way?
--clay
0 Kudos
0 Replies
Reply