[Openmp-commits] [openmp] r290272 - Fix for the __kmpc_global_num_threads function to return the value of the __kmp_all_nth global var.

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Wed Dec 21 13:20:20 PST 2016


Author: achurbanov
Date: Wed Dec 21 15:20:20 2016
New Revision: 290272

URL: http://llvm.org/viewvc/llvm-project?rev=290272&view=rev
Log:
Fix for the __kmpc_global_num_threads function to return the value of the __kmp_all_nth global var.

Patch by Yonghong Yan.

Differential Revision: https://reviews.llvm.org/D27975

Modified:
    openmp/trunk/runtime/src/kmp_csupport.cpp

Modified: openmp/trunk/runtime/src/kmp_csupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.cpp?rev=290272&r1=290271&r2=290272&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.cpp (original)
+++ openmp/trunk/runtime/src/kmp_csupport.cpp Wed Dec 21 15:20:20 2016
@@ -121,9 +121,9 @@ waiting for work.
 kmp_int32
 __kmpc_global_num_threads(ident_t *loc)
 {
-    KC_TRACE( 10, ("__kmpc_global_num_threads: num_threads = %d\n", __kmp_nth ) );
+    KC_TRACE(10,("__kmpc_global_num_threads: num_threads = %d\n", __kmp_all_nth));
 
-    return TCR_4(__kmp_nth);
+    return TCR_4(__kmp_all_nth);
 }
 
 /*!




More information about the Openmp-commits mailing list