[Openmp-commits] [PATCH] D112809: [OpenMP][OMPT] Introduce VERBOSE_INIT in ompt-multiplex.h

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 29 05:13:39 PDT 2021


protze.joachim created this revision.
protze.joachim added a reviewer: hbae.
protze.joachim added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
protze.joachim requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

OpenMP 5.1 added OMP_TOOL_VERBOSE_INIT. This env variable is
extremely helpful to understand the issue when loading a tool fails
unexpectedly (e.g., errors from dlopen, when the libc available at
runtime is older than libc used at compile time of the tool -> missed
to load the right gcc module).

This patch replicates the verbose init code from libomp watching
out for a different env variable. Similar to 
`CLIENT_TOOL_LIBRARIES_VAR`, a tool can define the name of 
the env var by defining `CLIENT_TOOL_VERBOSE_INIT_VAR` 
before including ompt-multiplex.h.
Alternatively, a tool can define `OMPT_MULTIPLEX_TOOL_NAME`
to specify the tool name which will be the prefix for both 
`_TOOL_LIBRARIES` and `_VERBOSE_INIT` var.
Finally, if none of the two macros is defined, the header will 
print a compiler warning and look at `OMP_TOOL_VERBOSE_INIT`.

Patch prepared by Semih Burak


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112809

Files:
  openmp/tools/multiplex/ompt-multiplex.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112809.383313.patch
Type: text/x-patch
Size: 7579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211029/f24edde6/attachment-0001.bin>


More information about the Openmp-commits mailing list