Fix for the __kmpc_global_num_threads function to return the value of the __kmp_all_n...
authorAndrey Churbanov <Andrey.Churbanov@intel.com>
Wed, 21 Dec 2016 21:20:20 +0000 (21:20 +0000)
committerAndrey Churbanov <Andrey.Churbanov@intel.com>
Wed, 21 Dec 2016 21:20:20 +0000 (21:20 +0000)
Patch by Yonghong Yan.

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

llvm-svn: 290272

openmp/runtime/src/kmp_csupport.cpp

index a52f4ec..7b7bbde 100644 (file)
@@ -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);
 }
 
 /*!