diff options
Diffstat (limited to 'openmp/runtime/src/kmp_sched.cpp')
| -rw-r--r-- | openmp/runtime/src/kmp_sched.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/openmp/runtime/src/kmp_sched.cpp b/openmp/runtime/src/kmp_sched.cpp index 9960859eda4..003f66112bf 100644 --- a/openmp/runtime/src/kmp_sched.cpp +++ b/openmp/runtime/src/kmp_sched.cpp @@ -66,9 +66,11 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, #if OMPT_SUPPORT && OMPT_OPTIONAL ompt_team_info_t *team_info = NULL; ompt_task_info_t *task_info = NULL; - ompt_work_type_t ompt_work_type; + ompt_work_type_t ompt_work_type = ompt_work_loop; - if (ompt_enabled.enabled) { + static kmp_int8 warn = 0; + + if (ompt_enabled.ompt_callback_work) { // Only fully initialize variables needed by OMPT if OMPT is enabled. team_info = __ompt_get_teaminfo(0, NULL); task_info = __ompt_get_task_info_object(0); @@ -81,8 +83,10 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, } else if ((loc->flags & KMP_IDENT_WORK_DISTRIBUTE) != 0) { ompt_work_type = ompt_work_distribute; } else { - KMP_ASSERT2(0, - "__kmpc_for_static_init: can't determine workshare type"); + kmp_int8 bool_res = + KMP_COMPARE_AND_STORE_ACQ8(&warn, (kmp_int8)0, (kmp_int8)1); + if (bool_res) + KMP_WARNING(OmptOutdatedWorkshare); } KMP_DEBUG_ASSERT(ompt_work_type); } |

