Page MenuHomePhabricator

Add implementation to two OMPT API routines
ClosedPublic

Authored by hbae on May 7 2019, 2:34 PM.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

hbae created this revision.May 7 2019, 2:34 PM

The code looks good to me, thanks for fixing the implementation.

Would you consider to also add the test?
https://github.com/OpenMPToolsInterface/LLVM-openmp/commit/9fc7407aeb2568ddcd33b69772c48f47ca595f41

The test actually builds on this change:
https://github.com/OpenMPToolsInterface/LLVM-openmp/commit/ba99a76793babdbfdad34e04776e9eb35a7b14cd

If possible we should also have a test for ompt_finalize_tool.

I think, a test for ompt_finalize_tool could be something along:

#include <callback.h>
int main() {
#pragma omp parallel num_threads(2)
  {
  }
  printf("Before ompt_finalize_tool\n")
  ompt_finalize_tool();
  printf("After ompt_finalize_tool\n")
  return 0;
}

And then test, that all completion events (implicit task-end, thread-end ) are written between Before and After

hbae updated this revision to Diff 198707.May 8 2019, 12:04 PM

Added tests for the routines.

protze.joachim accepted this revision.May 9 2019, 9:27 AM

Great, thanks!
I like the approach with USE_PRIVATE_TOOL.

This revision is now accepted and ready to land.May 9 2019, 9:27 AM
This revision was automatically updated to reflect the committed changes.