[OpenMP][OMPT] Introduce VERBOSE_INIT in ompt-multiplex.h
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 Differential Revision: https://reviews.llvm.org/D112809
Loading
Please sign in to comment