This is an archive of the discontinued LLVM Phabricator instance.

[OMPT] Add annotations to testcases that are expected to fail when using certain compilers
ClosedPublic

Authored by sconvent on Nov 23 2017, 2:01 AM.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

sconvent created this revision.Nov 23 2017, 2:01 AM
Hahnfeld added inline comments.Nov 24 2017, 6:12 PM
runtime/test/ompt/misc/control_tool.c
3

This works on LLVM's buildbot, so this can't be entirely correct: http://lab.llvm.org:8011/builders/openmp-ompt-gcc-x86_64-linux-debian/builds/14/steps/test-libomp/logs/stdio

Why did you want to deactivate this?

runtime/test/ompt/worksharing/sections.c
4

I thought versions 17 and 18 of the Intel Compiler pass in the data to differentiate between sections and loops?

protze.joachim added a subscriber: omalyshe.

@omalyshe Which version of icc introduced the ident information for workshare constructs?

omalyshe edited edge metadata.Nov 29 2017, 1:09 AM

@omalyshe Which version of icc introduced the ident information for workshare constructs?

ICC with the ident information has not been released yet

sconvent added inline comments.Nov 29 2017, 4:34 AM
runtime/test/ompt/misc/control_tool.c
3

Which gcc version does the buildbot use? For me the testcase fails for versions up to 7.2 (I haven't tested more recent versions).
The problem is that in those versions, gcc has problems with labels inside of OpenMP regions. So when using the "print_current_address" macro (which defines a label) in a parallel region, the compilation fails.
Other testcases with the same problem also work in the buildbot so I believe this is a matter of the gcc version.

Hahnfeld edited edge metadata.Nov 29 2017, 6:21 AM

@omalyshe Which version of icc introduced the ident information for workshare constructs?

ICC with the ident information has not been released yet

In that case cancel/cancel_worksharing.c should fail for icc-17, icc-18 too?

runtime/test/ompt/misc/control_tool.c
3

GCC 7.2.0, probably the system default in Debian: http://lab.llvm.org:8011/builders/openmp-ompt-gcc-x86_64-linux-debian/builds/16/steps/configure-openmp/logs/stdio

Maybe the distribution carries some downstream patches?!?

@omalyshe Which version of icc introduced the ident information for workshare constructs?

ICC with the ident information has not been released yet

In that case cancel/cancel_worksharing.c should fail for icc-17, icc-18 too?

No, the ident information was only missing for the worksharing constructs. For cancellation constructs, the compiler generates a call to '__kmpc_cancel(...)' with the correct kind parameter. icc-16 however did not generate the correct call.

protze.joachim added inline comments.Nov 29 2017, 7:40 AM
runtime/test/ompt/misc/control_tool.c
3

The context is this (fixed) issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81687

Hahnfeld added inline comments.Nov 29 2017, 8:10 AM
runtime/test/ompt/misc/control_tool.c
3

Yes, so the fix has been backported to GCC 5, 6, 7. This has happened after 7.2.0 has been released, but probably Debian tracks a more recent commit (which most distributions do unfortunately). So although I don't like we might need to turn this into an UNSUPPORTED because a passing XFAIL is treated as error :-(

Hahnfeld added inline comments.Nov 29 2017, 8:42 AM
runtime/test/ompt/misc/control_tool.c
3
protze.joachim added inline comments.Nov 29 2017, 9:54 AM
runtime/test/ompt/misc/control_tool.c
3

So
XFAIL gcc-5 gcc-6 gcc-7.0 gcc-7.1
UNSUPPORTED gcc-7.2

This would affect all tests, that have this line in this patch.

Hahnfeld added inline comments.Nov 29 2017, 11:05 AM
runtime/test/ompt/misc/control_tool.c
3

I think we don't have gcc-7.0 gcc-7.1 at the moment, only gcc-7. And we could possibly get in trouble with the older versions as well because the fix was backported to GCC 5 and 6, too.

@omalyshe Which version of icc introduced the ident information for workshare constructs?

ICC with the ident information has not been released yet

In that case cancel/cancel_worksharing.c should fail for icc-17, icc-18 too?

No, the ident information was only missing for the worksharing constructs. For cancellation constructs, the compiler generates a call to '__kmpc_cancel(...)' with the correct kind parameter. icc-16 however did not generate the correct call.

Right, the ident information is needed only to distinguish worksharing constructs. ICC 17.0 will NOT have ident flags implemented; as for 18.0 - probably Update 2 will have it.

So we need to treat compilers with "fixes" in minor versions as UNSUPPORTED because we don't know when distributions will backport patches and what version they give their "patched" compiler. To avoid any hassles with GCC 5 and 6 which might see a maintenance release or not, I'd propose the following:

  • For https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81687: UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, GCC 8 will certainly have the fix
  • ident information:
    • XFAIL: icc-16, icc-17 (these will not be updated according to @omalyshe), UNSUPPORTED: icc-18 (might get them in update 2), later versions will have the information for sure.
    • XFAIL: clang-3, clang-4, clang-5 can stay because the patch was not backported from trunk which will become Clang 6 (I do really hope no downstream distribution will do that on their own)

Thoughts?

Hahnfeld added inline comments.Dec 5 2017, 2:16 PM
runtime/test/ompt/tasks/dependences.c
3

btw, this one must be failing for a different reason, unrelated to the problem with labels: http://lab.llvm.org:8011/builders/openmp-ompt-gcc-x86_64-linux-debian/builds/20/steps/test-libomp/logs/FAIL%3A%20libomp%3A%3Adependences.c

sconvent updated this revision to Diff 126697.Dec 13 2017, 2:17 AM

The use of UNSUPPORTED seems to be necessary. I updated the Diff.

sconvent added inline comments.Dec 13 2017, 2:19 AM
runtime/test/ompt/tasks/dependences.c
3

You're right, this testcase also (currently) fails with a fixed compiler. I will publish a fix in another revision.

Hahnfeld accepted this revision.Dec 13 2017, 5:47 AM

Two small things to considers, looks good otherwise.

Maybe we can commit all changes because of the GCC bug separately and add a meaningfull description? (no need to split this revision though)

runtime/test/ompt/cancel/cancel_taskgroup.c
3–5

Please add clang-4.0.0 if this test case triggers the hang on cancellation

runtime/test/ompt/tasks/dependences.c
3

Shouldn't this be UNSUPPORTED as well?

This revision is now accepted and ready to land.Dec 13 2017, 5:47 AM
sconvent updated this revision to Diff 126758.Dec 13 2017, 6:58 AM

Implemented suggestions.

This revision was automatically updated to reflect the committed changes.