From 82259f8fe4e3e61ccf8acf6244ec806d810eb98a Mon Sep 17 00:00:00 2001
From: Thierry <thierry.gautier@inrialpes.fr>
Date: Fri, 2 Mar 2018 19:48:11 +0100
Subject: [PATCH] Fix problem with undefined OMP_PLACES

---
 runtime/src/z_Linux_util.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/runtime/src/z_Linux_util.cpp b/runtime/src/z_Linux_util.cpp
index cf4db02..0e85fd4 100644
--- a/runtime/src/z_Linux_util.cpp
+++ b/runtime/src/z_Linux_util.cpp
@@ -828,6 +828,7 @@ void __kmp_create_worker(int gtid, kmp_info_t *th, size_t stack_size) {
 
   KMP_MB(); /* Flush all pending memory write invalidates.  */
 
+#if 0 /*TG: comment part of this code. kmp_affinit_set_place could be called if OMP_PLACES not set. (assert)*/
     /* move this code from thread code __kmp_launch_worker to here in order to set the righ
        affinity mask at thread creation.
     */
@@ -837,6 +838,7 @@ void __kmp_create_worker(int gtid, kmp_info_t *th, size_t stack_size) {
     __kmp_affinity_set_place( gtid );
 # endif
 #endif
+#endif
 
 #ifdef KMP_THREAD_ATTR
   status = pthread_attr_init(&thread_attr);
-- 
GitLab