This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][OMPT] Introduce VERBOSE_INIT in ompt-multiplex.h
ClosedPublic

Authored by protze.joachim on Oct 29 2021, 5:13 AM.

Details

Summary

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

Diff Detail

Event Timeline

protze.joachim created this revision.Oct 29 2021, 5:13 AM
protze.joachim requested review of this revision.Oct 29 2021, 5:13 AM

Fixing some minor issues and rebased to current main

Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2023, 6:11 AM

Add the new defines to the README file

jdoerfert accepted this revision.Jul 7 2023, 10:23 AM
This revision is now accepted and ready to land.Jul 7 2023, 10:23 AM