[Openmp-commits] [openmp] r270884 - Make LIBOMP_USE_ITT_NOTIFY a setting that can be enabled or disabled

Churbanov, Andrey via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 2 09:16:17 PDT 2016


OK for me.

- Andrey

-----Original Message-----
From: Peyton, Jonathan L 
Sent: Thursday, June 2, 2016 7:14 PM
To: Churbanov, Andrey <Andrey.Churbanov at intel.com>; Tom Stellard <tom at stellard.net>
Cc: openmp-commits (openmp-commits at lists.llvm.org) <openmp-commits at lists.llvm.org>; John Mellor-Crummey <johnmc at rice.edu>
Subject: RE: [Openmp-commits] [openmp] r270884 - Make LIBOMP_USE_ITT_NOTIFY a setting that can be enabled or disabled

Andrey, Tom,

Can this commit be merged into 3.8.1?  It allows users to turn off ittnotify code which allows the statically-linked library to work on Blue Gene/Q.

-- Johnny

-----Original Message-----
From: Openmp-commits [mailto:openmp-commits-bounces at lists.llvm.org] On Behalf Of Jonathan Peyton via Openmp-commits
Sent: Thursday, May 26, 2016 1:19 PM
To: openmp-commits at lists.llvm.org
Subject: [Openmp-commits] [openmp] r270884 - Make LIBOMP_USE_ITT_NOTIFY a setting that can be enabled or disabled

Author: jlpeyton
Date: Thu May 26 13:19:10 2016
New Revision: 270884

URL: http://llvm.org/viewvc/llvm-project?rev=270884&view=rev
Log:
Make LIBOMP_USE_ITT_NOTIFY a setting that can be enabled or disabled

On Blue Gene/Q, having LIBOMP_USE_ITT_NOTIFY support compiled into a statically-linked binary causes a failure at runtime because dlopen fails.
This patch changes LIBOMP_USE_ITT_NOTIFY to a cacheable configuration setting that can be disabled.

Patch by John Mellor-Crummey

Differential Revision: http://reviews.llvm.org/D20517

Modified:
    openmp/trunk/runtime/CMakeLists.txt
    openmp/trunk/runtime/src/kmp_config.h.cmake
    openmp/trunk/runtime/src/kmp_csupport.c
    openmp/trunk/runtime/src/kmp_runtime.c

Modified: openmp/trunk/runtime/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/CMakeLists.txt?rev=270884&r1=270883&r2=270884&view=diff
==============================================================================
--- openmp/trunk/runtime/CMakeLists.txt (original)
+++ openmp/trunk/runtime/CMakeLists.txt Thu May 26 13:19:10 2016
@@ -200,8 +200,9 @@ elseif("${libomp_build_type_lowercase}"
   set(MINSIZEREL_BUILD TRUE)
 endif()
 
-# Include itt notify interface? Right now, always.
-set(LIBOMP_USE_ITT_NOTIFY TRUE)
+# Include itt notify interface?
+set(LIBOMP_USE_ITT_NOTIFY TRUE CACHE BOOL
+  "Enable ITT notify?")
 
 # normal, profile, stubs library.
 set(NORMAL_LIBRARY FALSE)
@@ -354,6 +355,7 @@ if(${LIBOMP_STANDALONE_BUILD})
   libomp_say("Build                -- ${LIBOMP_BUILD}")
   libomp_say("Use Stats-gathering  -- ${LIBOMP_STATS}")
   libomp_say("Use Debugger-support -- ${LIBOMP_USE_DEBUGGER}")
+  libomp_say("Use ITT notify       -- ${LIBOMP_USE_ITT_NOTIFY}")
   libomp_say("Use OMPT-support     -- ${LIBOMP_OMPT_SUPPORT}")
   if(${LIBOMP_OMPT_SUPPORT})
     libomp_say("Use OMPT-blame       -- ${LIBOMP_OMPT_BLAME}")

Modified: openmp/trunk/runtime/src/kmp_config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_config.h.cmake?rev=270884&r1=270883&r2=270884&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_config.h.cmake (original)
+++ openmp/trunk/runtime/src/kmp_config.h.cmake Thu May 26 13:19:10 2016
@@ -85,7 +85,7 @@
 #define KMP_ADJUST_BLOCKTIME 1
 #define BUILD_PARALLEL_ORDERED 1
 #define KMP_ASM_INTRINS 1
-#define USE_ITT_BUILD 1
+#define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY
 #define INTEL_ITTNOTIFY_PREFIX __kmp_itt_  #if ! KMP_MIC  # define USE_LOAD_BALANCE 1

Modified: openmp/trunk/runtime/src/kmp_csupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.c?rev=270884&r1=270883&r2=270884&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.c (original)
+++ openmp/trunk/runtime/src/kmp_csupport.c Thu May 26 13:19:10 2016
@@ -507,7 +507,7 @@ __kmpc_end_serialized_parallel(ident_t *
 
    // we need to wait for the proxy tasks before finishing the thread
    if ( task_team != NULL && task_team->tt.tt_found_proxy_tasks )
-        __kmp_task_team_wait(this_thr, serial_team, NULL ); // is an ITT object needed here?
+        __kmp_task_team_wait(this_thr, serial_team USE_ITT_BUILD_ARG(NULL) ); // is an ITT object needed here?
    #endif
 
     KMP_MB();

Modified: openmp/trunk/runtime/src/kmp_runtime.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.c?rev=270884&r1=270883&r2=270884&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Thu May 26 13:19:10 2016
@@ -3734,7 +3734,9 @@ __kmp_register_root( int initial_thread
     /* prepare the master thread for get_gtid() */
     __kmp_gtid_set_specific( gtid );
 
+#if USE_ITT_BUILD
     __kmp_itt_thread_name( gtid );
+#endif /* USE_ITT_BUILD */
 
     #ifdef KMP_TDATA_GTID
         __kmp_gtid = gtid;
@@ -3908,7 +3910,7 @@ __kmp_unregister_root_current_thread( in
         // the runtime is shutting down so we won't report any events
         thread->th.ompt_thread_info.state = ompt_state_undefined;  #endif
-        __kmp_task_team_wait(thread, team, NULL );
+        __kmp_task_team_wait(thread, team USE_ITT_BUILD_ARG(NULL));
    }
 #endif
 


_______________________________________________
Openmp-commits mailing list
Openmp-commits at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-commits

--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the Openmp-commits mailing list