[Openmp-commits] [PATCH] D29665: Add an option to bind initial thread at the start of application
Phabricator via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 16 09:20:26 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL295339: Added an option to bind initial thread at the start of application (authored by achurbanov).
Changed prior to commit:
https://reviews.llvm.org/D29665?vs=87415&id=88747#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29665
Files:
openmp/trunk/runtime/src/kmp_csupport.cpp
Index: openmp/trunk/runtime/src/kmp_csupport.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_csupport.cpp
+++ openmp/trunk/runtime/src/kmp_csupport.cpp
@@ -46,10 +46,15 @@
void
__kmpc_begin(ident_t *loc, kmp_int32 flags)
{
- // By default __kmp_ignore_mppbeg() returns TRUE.
- if (__kmp_ignore_mppbeg() == FALSE) {
+ // By default __kmpc_begin() is no-op.
+ char *env;
+ if ((env = getenv( "KMP_INITIAL_THREAD_BIND" )) != NULL &&
+ __kmp_str_match_true( env )) {
+ __kmp_middle_initialize();
+ KC_TRACE(10, ("__kmpc_begin: middle initialization called\n" ));
+ } else if (__kmp_ignore_mppbeg() == FALSE) {
+ // By default __kmp_ignore_mppbeg() returns TRUE.
__kmp_internal_begin();
-
KC_TRACE( 10, ("__kmpc_begin: called\n" ) );
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29665.88747.patch
Type: text/x-patch
Size: 863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170216/9dec6819/attachment.bin>
More information about the Openmp-commits
mailing list