[all-commits] [llvm/llvm-project] 820be3: [OpenMP][OMPT] Introduce VERBOSE_INIT in ompt-mult...

Joachim via All-commits all-commits at lists.llvm.org
Sat Jul 8 08:11:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 820be30ad96591de2d7e651b3ec9cc0253ca6344
      https://github.com/llvm/llvm-project/commit/820be30ad96591de2d7e651b3ec9cc0253ca6344
  Author: Joachim Jenke <jenke at itc.rwth-aachen.de>
  Date:   2023-07-08 (Sat, 08 Jul 2023)

  Changed paths:
    M openmp/tools/multiplex/README.md
    M openmp/tools/multiplex/ompt-multiplex.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list