The ompt-multiplex.h header allows to use multiple OMPT tools at a time.
Example usage is given in the tests directory.
Details on usage in README.md
Paths
| Differential D76012
[OpenMP][Tool] Header-only multiplexing of OMPT tools ClosedPublic Authored by protze.joachim on Mar 11 2020, 11:02 AM.
Details Summary The ompt-multiplex.h header allows to use multiple OMPT tools at a time. Details on usage in README.md
Diff Detail Event Timelineprotze.joachim added a parent revision: D76008: [OpenMP][Tool] Extend reuse of OMPT testing.Mar 11 2020, 11:05 AM
protze.joachim marked 5 inline comments as done. Comment ActionsAddressed the comments from Johannes. Increased reuse of callback.h for the test file custom_data_storage.c.first.tool.c
This revision is now accepted and ready to land.Jun 8 2020, 4:19 PM This revision now requires changes to proceed.Jun 8 2020, 4:20 PM Comment Actions lit would warn about missing run lines for these C files, implementing the tool libraries. I think, I can rename the test application to suffix .app.c and change the test suffix to this. Comment Actions Ok, this is not how suffix works in lit :( Just for reference, if I remove the RUN line, the output of make check-ompt-multiplex will contain this: UNRESOLVED: OMPT multiplex :: custom_data_storage/custom_data_storage.app.c.second.tool.c (1 of 6) ******************** TEST 'OMPT multiplex :: custom_data_storage/custom_data_storage.app.c.second.tool.c' FAILED ******************** Test has no run line! ******************** I could change the lines to: // RUN: do-not-run // REQUIRES: do-not-run But then we always have 2 successful, 4 unsupported tests listed instead of 6 successful tests. Comment Actions As an alternative, I could make the tools header files, which are conditionally included: #ifdef FIRST #include <first_tool.h> #elif SECOND #include <second_tool.h> #else ... current app content #endif Then we have only one C file, which has the app code and the test expressions. The tool libraries are compiled from the header files. Comment Actions
Assuming I understand this properly, this makes sense. Some places we also have test/Inputs/ folders for "include headers" but if they can live right in the print folder, fine with me. Comment Actions The tool libraries are now implemented in include files as suggested in my last comment. Comment Actions Update the patch to use _TOOL_PREFIX instead of TOOL_PREFIX and undef after the include. This revision is now accepted and ready to land.Jun 16 2020, 10:53 AM Closed by commit rGe9b8ed1fd7c5: [OpenMP][Tool] Header-only multiplexing of OMPT tools (authored by protze.joachim). · Explain WhyJun 17 2020, 12:30 AM This revision was automatically updated to reflect the committed changes. Comment Actions @protze.joachim @jdoerfert ompt-multiplex.h is installed by default in /usr/include/ is that by design here? Comment Actions
I didn't catch that. I doubt it is, @protze.joachim, right? Re change notes: Comment Actions Where are OpenMP release notes supposed to be added? I'm surprised, that I did not find any OpenMP related notes in the repository. Comment Actions
Which options do you use to get the headers to include/openmp/? I think this must be something related to your CMake invocation because for example https://www.archlinux.org/packages/extra/x86_64/openmp/ has it in /usr/include/. Comment Actions
I think we do not have any, yet. Maybe we should. Could you create a file matching other subprojects?
Revision Contents
Diff 269910 openmp/runtime/test/ompt/callback.h
openmp/tools/multiplex/CMakeLists.txt
openmp/tools/multiplex/README.md
openmp/tools/multiplex/ompt-multiplex.h
openmp/tools/multiplex/tests/CMakeLists.txt
openmp/tools/multiplex/tests/custom_data_storage/custom_data_storage.c
openmp/tools/multiplex/tests/custom_data_storage/first-tool.h
openmp/tools/multiplex/tests/custom_data_storage/second-tool.h
openmp/tools/multiplex/tests/lit.cfg
openmp/tools/multiplex/tests/lit.site.cfg.in
openmp/tools/multiplex/tests/ompt-signal.h
openmp/tools/multiplex/tests/print/first-tool.h
openmp/tools/multiplex/tests/print/print.c
|