嵌套并行区域 OpenMP



OpenMP中是什么意思

默认情况下,嵌套并行区域是序列化的

这是否意味着线程会连续进行?我也不能低估这部分:

A throw executed inside a parallel region must cause execution to resume within
the dynamic extent of the same structured block, and it must be caught by the
same thread that threw the exception.

如此处所述(向下滚动到"17.1 嵌套并行性"(,默认情况下,嵌套并行区域不会并行化,因此按顺序运行。可以使用OMP_NESTED=true(作为环境变量(或omp_set_nested(1)(在代码中(创建嵌套线程。

编辑:另请参阅类似问题的答案。

最新更新