|
| 1 | +diff --git a/openmp/runtime/src/ompd-specific.cpp b/openmp/runtime/src/ompd-specific.cpp |
| 2 | +index c4018789e..07da27023 100644 |
| 3 | +--- a/openmp/runtime/src/ompd-specific.cpp |
| 4 | ++++ b/openmp/runtime/src/ompd-specific.cpp |
| 5 | +@@ -82,6 +82,7 @@ void ompd_init() { |
| 6 | + char *libname = NULL; |
| 7 | + |
| 8 | + #if KMP_OS_UNIX |
| 9 | ++#if 0 |
| 10 | + // Find the location of libomp.so thru dladdr and replace the libomp with |
| 11 | + // libompd to get the full path of libompd |
| 12 | + Dl_info dl_info; |
| 13 | +@@ -97,6 +98,7 @@ void ompd_init() { |
| 14 | + strncpy(libname, dl_info.dli_fname, lib_path_length); |
| 15 | + memcpy(libname + lib_path_length, "/libompd.so\0", 12); |
| 16 | + } |
| 17 | ++#endif |
| 18 | + #endif |
| 19 | + |
| 20 | + const char *ompd_env_var = getenv("OMP_DEBUG"); |
| 21 | +diff --git a/openmp/runtime/src/ompt-general.cpp b/openmp/runtime/src/ompt-general.cpp |
| 22 | +index 55a936575..a71c1aef3 100644 |
| 23 | +--- a/openmp/runtime/src/ompt-general.cpp |
| 24 | ++++ b/openmp/runtime/src/ompt-general.cpp |
| 25 | +@@ -164,8 +164,7 @@ ompt_start_tool(unsigned int omp_version, const char *runtime_version) { |
| 26 | + // runtime library is linked before the tool. Since glibc 2.2 strong symbols |
| 27 | + // don't override weak symbols that have been found before unless the user |
| 28 | + // sets the environment variable LD_DYNAMIC_WEAK. |
| 29 | +- ompt_start_tool_t next_tool = |
| 30 | +- (ompt_start_tool_t)dlsym(RTLD_NEXT, "ompt_start_tool"); |
| 31 | ++ ompt_start_tool_t next_tool = nullptr; |
| 32 | + if (next_tool) { |
| 33 | + ret = next_tool(omp_version, runtime_version); |
| 34 | + } |
| 35 | +@@ -245,14 +244,14 @@ ompt_tool_windows(unsigned int omp_version, const char *runtime_version) { |
| 36 | + #endif |
| 37 | + |
| 38 | + static ompt_start_tool_result_t * |
| 39 | +-ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) { |
| 40 | ++ ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) { |
| 41 | + ompt_start_tool_result_t *ret = NULL; |
| 42 | +- ompt_start_tool_t start_tool = NULL; |
| 43 | ++ // ompt_start_tool_t start_tool = NULL; |
| 44 | + #if KMP_OS_WINDOWS |
| 45 | + // Cannot use colon to describe a list of absolute paths on Windows |
| 46 | + const char *sep = ";"; |
| 47 | + #else |
| 48 | +- const char *sep = ":"; |
| 49 | ++ // const char *sep = ":"; |
| 50 | + #endif |
| 51 | + |
| 52 | + OMPT_VERBOSE_INIT_PRINT("----- START LOGGING OF TOOL REGISTRATION -----\n"); |
| 53 | +@@ -275,7 +274,7 @@ ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) { |
| 54 | + OMPT_VERBOSE_INIT_PRINT("----- END LOGGING OF TOOL REGISTRATION -----\n"); |
| 55 | + return ret; |
| 56 | + } |
| 57 | +- |
| 58 | ++#if 0 |
| 59 | + // Try tool-libraries-var ICV |
| 60 | + OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed.\n"); |
| 61 | + const char *tool_libs = getenv("OMP_TOOL_LIBRARIES"); |
| 62 | +@@ -348,6 +347,8 @@ ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) { |
| 63 | + } else { |
| 64 | + OMPT_VERBOSE_INIT_PRINT("No OMP_TOOL_LIBRARIES defined.\n"); |
| 65 | + } |
| 66 | ++#endif |
| 67 | ++ return nullptr; |
| 68 | + |
| 69 | + // usable tool found in tool-libraries |
| 70 | + if (ret) { |
| 71 | +@@ -355,6 +356,7 @@ ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) { |
| 72 | + return ret; |
| 73 | + } |
| 74 | + |
| 75 | ++#if 0 |
| 76 | + #if KMP_OS_UNIX |
| 77 | + { // Non-standard: load archer tool if application is built with TSan |
| 78 | + const char *fname = "libarcher.so"; |
| 79 | +@@ -383,6 +385,7 @@ ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) { |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | ++#endif |
| 84 | + #endif |
| 85 | + OMPT_VERBOSE_INIT_PRINT("No OMP tool loaded.\n"); |
| 86 | + OMPT_VERBOSE_INIT_PRINT("----- END LOGGING OF TOOL REGISTRATION -----\n"); |
0 commit comments