This is an archive of the discontinued LLVM Phabricator instance.

[OMPT] Create infrastructure and add first tests for OMPT
ClosedPublic

Authored by Hahnfeld on Jan 29 2016, 1:05 AM.

Details

Summary

Some basic checks next to the implementation should futher lower the possibility to introduce regressions. (Note that this would have catched the ordering issue fixed in r258866 and pointed to D16714.)

The tests are implementation depenedent in one point because they assume that thread ids are assigned in ascending order. This is not defined by the standard but currently ensured in libomp. We have to think about another way of ordering the threads should this ever be subject to change...

Note that this isn't aiming at replacing the implementation independent test-suite at https://github.com/OpenMPToolsInterface/ompt-test-suite!

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld updated this revision to Diff 46363.Jan 29 2016, 1:05 AM
Hahnfeld retitled this revision from to [OMPT] Create infrastructure and add first tests for OMPT.
Hahnfeld updated this object.
Hahnfeld added reviewers: jmellorcrummey, jlpeyton.
Hahnfeld added subscribers: openmp-commits, tcramer.
Hahnfeld updated this revision to Diff 46618.Feb 1 2016, 11:26 PM

Update to OPENMP_LLVM_TOOLS_DIR

jlpeyton edited edge metadata.Mar 21 2016, 10:20 AM

When I applied the patch, clang-3.8 tested fine, but gcc 4.8 gave this failure:

FAIL: libomp :: ompt/omp_parallel_serialized.c (3 of 74)
******************** TEST 'libomp :: ompt/omp_parallel_serialized.c' FAILED ********************
Script:
--
/usr/bin/cc -fopenmp -I /nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/test -I /nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/src -L /nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/src  /nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/test/ompt/omp_parallel_serialized.c -o /nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/test/ompt/Output/omp_parallel_serialized.c.tmp -lm && /nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/test/ompt/Output/omp_parallel_serialized.c.tmp | /nfs/fx/proj/openmp/users/jlpeyton/llvm/build/linux/bin/FileCheck /nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/test/ompt/omp_parallel_serialized.c
--
Exit Code: 1

Command Output (stdout):
--
Command 0: "/usr/bin/cc" "-fopenmp" "-I" "/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/test" "-I" "/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/src" "-L" "/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/src" "/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/test/ompt/omp_parallel_serialized.c" "-o" "/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/test/ompt/Output/omp_parallel_serialized.c.tmp" "-lm"
Command 0 Result: 0
Command 0 Output:


Command 0 Stderr:


Command 1: "/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/build/test/ompt/Output/omp_parallel_serialized.c.tmp"
Command 1 Result: 0
Command 1 Output:


Command 1 Stderr:


Command 2: "/nfs/fx/proj/openmp/users/jlpeyton/llvm/build/linux/bin/FileCheck" "/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/test/ompt/omp_parallel_serialized.c"
Command 2 Result: 1
Command 2 Output:


Command 2 Stderr:
/nfs/fx/proj/openmp/users/jlpeyton/openmp_llvm_commit/itt/libomp_llvm/runtime/test/ompt/omp_parallel_serialized.c:16:12: error: expected string not found in input
 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_end: parallel_id=[[PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], invoker=[[PARALLEL_INVOKER]]
           ^
<stdin>:4:1: note: scanning from here
1: ompt_event_parallel_end: parallel_id=2, task_id=4, invoker=0
^
<stdin>:4:1: note: with variable "MASTER_ID" equal to "1"
1: ompt_event_parallel_end: parallel_id=2, task_id=4, invoker=0
^
<stdin>:4:1: note: with variable "PARALLEL_ID" equal to "2"
1: ompt_event_parallel_end: parallel_id=2, task_id=4, invoker=0
^
<stdin>:4:1: note: with variable "PARENT_TASK_ID" equal to "3"
1: ompt_event_parallel_end: parallel_id=2, task_id=4, invoker=0
^
<stdin>:4:1: note: with variable "PARALLEL_INVOKER" equal to "0"
1: ompt_event_parallel_end: parallel_id=2, task_id=4, invoker=0
^



--

********************

Does this have to do with the previous patch: http://reviews.llvm.org/D16714 ?

Does this have to do with the previous patch: http://reviews.llvm.org/D16714 ?

Yes, it needs to applied first (committed it just today). If found this during during development but wanted to separate it from the tests itself

jlpeyton accepted this revision.Mar 21 2016, 12:42 PM
jlpeyton edited edge metadata.

Yes, it needs to applied first (committed it just today). If found this during during development but wanted to separate it from the tests itself

Ah! Sorry about that. updated repo and now everything checkouts out. LGTM.

This revision is now accepted and ready to land.Mar 21 2016, 12:42 PM
This revision was automatically updated to reflect the committed changes.

@jlpeyton is it ok to push more tests with post-commit review if they don't need to modify any runtime code?

@jlpeyton is it ok to push more tests with post-commit review if they don't need to modify any runtime code?

Its ok with me.