diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -8645,13 +8645,9 @@ // Globals and functions for hidden helper task kmp_info_t **__kmp_hidden_helper_threads; kmp_info_t *__kmp_hidden_helper_main_thread; -kmp_int32 __kmp_hidden_helper_threads_num = 8; +kmp_int32 __kmp_hidden_helper_threads_num = 0; std::atomic __kmp_unexecuted_hidden_helper_tasks; -#if KMP_OS_LINUX -kmp_int32 __kmp_enable_hidden_helper = TRUE; -#else kmp_int32 __kmp_enable_hidden_helper = FALSE; -#endif namespace { std::atomic __kmp_hit_hidden_helper_threads_num; diff --git a/openmp/runtime/src/kmp_settings.cpp b/openmp/runtime/src/kmp_settings.cpp --- a/openmp/runtime/src/kmp_settings.cpp +++ b/openmp/runtime/src/kmp_settings.cpp @@ -1220,6 +1220,12 @@ ("__kmp_stg_parse_use_hidden_helper: Disable hidden helper task on " "non-Linux platform although it is enabled by user explicitly.\n")); #endif + // Set the number to 0 if hidden helper task is disabled + if (__kmp_enable_hidden_helper == FALSE) { + __kmp_hidden_helper_threads_num = 0; + } else { + __kmp_hidden_helper_threads_num = 8; + } } // __kmp_stg_parse_use_hidden_helper static void __kmp_stg_print_use_hidden_helper(kmp_str_buf_t *buffer, diff --git a/openmp/runtime/test/tasking/hidden_helper_task/capacity_mix_threads.cpp b/openmp/runtime/test/tasking/hidden_helper_task/capacity_mix_threads.cpp --- a/openmp/runtime/test/tasking/hidden_helper_task/capacity_mix_threads.cpp +++ b/openmp/runtime/test/tasking/hidden_helper_task/capacity_mix_threads.cpp @@ -1,4 +1,5 @@ // RUN: %libomp-cxx-compile-and-run +// XFAIL: * #include diff --git a/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp b/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp --- a/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp +++ b/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp @@ -1,4 +1,5 @@ // RUN: %libomp-cxx-compile-and-run +// XFAIL: * #include diff --git a/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp b/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp --- a/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp +++ b/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp @@ -1,4 +1,5 @@ // RUN: %libomp-cxx-compile-and-run +// XFAIL: * /* * This test aims to check whether hidden helper task can work with regular task diff --git a/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp b/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp --- a/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp +++ b/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp @@ -1,4 +1,5 @@ // RUN: %libomp-cxx-compile-and-run +// XFAIL: * /* * This test aims to check whether hidden helper thread has right gtid. We also diff --git a/openmp/runtime/test/tasking/hidden_helper_task/taskgroup.cpp b/openmp/runtime/test/tasking/hidden_helper_task/taskgroup.cpp --- a/openmp/runtime/test/tasking/hidden_helper_task/taskgroup.cpp +++ b/openmp/runtime/test/tasking/hidden_helper_task/taskgroup.cpp @@ -1,4 +1,5 @@ // RUN: %libomp-cxx-compile-and-run +// XFAIL: * /* * This test aims to check whether hidden helper task can work with regular task diff --git a/openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c b/openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c --- a/openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c +++ b/openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c @@ -48,9 +48,6 @@ // End of definitions copied from OpenMP RTL. // --------------------------------------------------------------------------- static id loc = {0, 2, 0, 0, ";file;func;0;0;;"}; -// This variable is defined in OpenMP RTL but we can't have it exposed so we -// need to redefine it here. -static int __kmp_hidden_helper_threads_num = 8; // --------------------------------------------------------------------------- int run_loop_64(i64 loop_lb, i64 loop_ub, i64 loop_st, int loop_chunk) { @@ -62,9 +59,6 @@ int rc; int tid = omp_get_thread_num(); int gtid = tid; - if (gtid) { - gtid += __kmp_hidden_helper_threads_num; - } int last; #if DEBUG printf("run_loop_<%d>(lb=%d, ub=%d, st=%d, ch=%d)\n", @@ -217,9 +211,6 @@ int rc; int tid = omp_get_thread_num(); int gtid = tid; - if (gtid) { - gtid += __kmp_hidden_helper_threads_num; - } int last; #if DEBUG printf("run_loop_<%d>(lb=%d, ub=%d, st=%d, ch=%d)\n", @@ -407,13 +398,6 @@ // --------------------------------------------------------------------------- int main() { - { - const char *env = getenv("LIBOMP_NUM_HIDDEN_HELPER_THREADS"); - if (env) { - __kmp_hidden_helper_threads_num = atoi(env); - } - } - int n, err = 0; for (n = 1; n <= 4; ++ n) { err += run_32(n);