diff options
Diffstat (limited to 'openmp/runtime/src/ompt-general.cpp')
-rw-r--r-- | openmp/runtime/src/ompt-general.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openmp/runtime/src/ompt-general.cpp b/openmp/runtime/src/ompt-general.cpp index 41b2827007b..22eac2ebf7b 100644 --- a/openmp/runtime/src/ompt-general.cpp +++ b/openmp/runtime/src/ompt-general.cpp @@ -268,6 +268,22 @@ ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) { } __kmp_str_free(&libs); } + if (ret) + return ret; + +#if KMP_OS_UNIX + { // Non-standard: load archer tool if application is built with TSan + const char *fname = "libarcher.so"; + void *h = dlopen(fname, RTLD_LAZY); + if (h) { + start_tool = (ompt_start_tool_t)dlsym(h, "ompt_start_tool"); + if (start_tool) + ret = (*start_tool)(omp_version, runtime_version); + if (ret) + return ret; + } + } +#endif return ret; } |