jhuber6 added a comment.

In D132074#3739593 <https://reviews.llvm.org/D132074#3739593>, @carlo.bertolli 
wrote:

> This looks good, but what happens when the user accidentally adds a nested 
> parallel when this option is turned on? Do we get serial (correct) execution?

With the code as it is, it will simply ignore the level and continue executing. 
This will probably be broken as we don't adjust some of the other state 
variables for this. The flag more-so asserts that nested parallelism will not 
work in any capacity than we reduce them to a single thread. We could 
potentially make it work, but it would be more complicated. There's an 
assertion if nested parallelism is attempted while being disabled, but this 
requires the user checking the assertions via `-fopenmp-debug`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132074/new/

https://reviews.llvm.org/D132074

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to