This change adds implementation to ompt_finalize_tool() and ompt_get_task_memory().
Details
- Reviewers
AndreyChurbanov tlwilmar jlpeyton protze.joachim jdoerfert - Commits
- rZORG09ae4dafbc35: [OpenMP] Add implementation to two OMPT API routines
rG09ae4dafbc35: [OpenMP] Add implementation to two OMPT API routines
rG3057c3a0929f: [OpenMP] Add implementation to two OMPT API routines
rL361309: [OpenMP] Add implementation to two OMPT API routines
rOMP361309: [OpenMP] Add implementation to two OMPT API routines
Diff Detail
- Repository
- rOMP OpenMP
Event Timeline
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
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
| runtime/test/ompt/tasks/task_memory.c | ||
|---|---|---|
| 102 | This test seems to be flaky. Could you have a look on that why? | |
| runtime/test/ompt/tasks/task_memory.c | ||
|---|---|---|
| 99 | There is a chance, that the first task gets executed before the second task is created. | |
There is a chance, that the first task gets executed before the second task is created.
This line should also have CHECK-DAG.