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

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

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

1 envío / 0 nuevos
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.