[Openmp-commits] [PATCH] D31419: Reset cancellation status for 'parallel', 'sections' and 'for' constracts.
Olga Malysheva via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Mar 28 05:56:47 PDT 2017
omalyshe created this revision.
Without this fix cancellation status for `parallel`, `sections` and `for` persists across construct boundaries.
Repository:
rL LLVM
https://reviews.llvm.org/D31419
Files:
runtime/src/kmp_barrier.cpp
runtime/src/kmp_runtime.cpp
Index: runtime/src/kmp_barrier.cpp
===================================================================
--- runtime/src/kmp_barrier.cpp
+++ runtime/src/kmp_barrier.cpp
@@ -1318,6 +1318,13 @@
USE_ITT_BUILD_ARG(itt_sync_obj));
__kmp_task_team_setup(this_thr, team, 0);
+#if OMP_40_ENABLED
+ // Reset cancellation flag for worksharing constructs
+ if(team->t.t_cancel_request == cancel_loop ||
+ team->t.t_cancel_request == cancel_sections ) {
+ team->t.t_cancel_request = cancel_noreq;
+ }
+#endif
#if USE_ITT_BUILD
if (__itt_sync_create_ptr || KMP_ITT_DEBUG)
__kmp_itt_barrier_finished(gtid, itt_sync_obj);
Index: runtime/src/kmp_runtime.cpp
===================================================================
--- runtime/src/kmp_runtime.cpp
+++ runtime/src/kmp_runtime.cpp
@@ -1372,6 +1372,9 @@
KMP_MB();
}
+#if OMP_40_ENABLED
+ KMP_CHECK_UPDATE(serial_team->t.t_cancel_request, cancel_noreq);
+#endif
if ( __kmp_env_consistency_check )
__kmp_push_parallel( global_tid, NULL );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31419.93229.patch
Type: text/x-patch
Size: 1148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170328/f53df2a2/attachment.bin>
More information about the Openmp-commits
mailing list