[Openmp-commits] [PATCH] D52628: Shutdown library on Windows if possible for better OMPT behavior.
Hansang Bae via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Sep 27 13:10:41 PDT 2018
hbae created this revision.
hbae added reviewers: AndreyChurbanov, tlwilmar, jlpeyton.
hbae added a project: OpenMP.
On Windows, child workers are terminated by the parent during the normal
program exit process (`ExitProcess()`) and they are not able to finish generating
their OpenMP events. We can force manual library shut down in `__kmpc_end()` to
fix this at least for the cases where `__kmpc_end()` is properly inserted.
@@ -71,6 +71,14 @@
+#if KMP_OS_WINDOWS && OMPT_SUPPORT
+ // Normal exit process on Windows does not allow worker threads of the final
+ // parallel region to finish reporting their events, so shutting down the
+ // library here fixes the issue at least for the cases where __kmpc_end() is
+ // placed properly.
+ if (ompt_enabled.enabled)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 635 bytes
Desc: not available
More information about the Openmp-commits