This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Temporarily disable failing runtime tests for OpenMP 5.0
ClosedPublic

Authored by saiislam on Jul 1 2020, 7:32 AM.

Details

Summary

Following tests are failing after upgrading to version 5.0 but are passing
for version 4.5:

  1. openmp/runtime/test/env/kmp_set_dispatch_buf.c
  2. openmp/runtime/test/worksharing/for/kmp_set_dispatch_buf.c

To be enabled as soon as these tests are fixed.

Diff Detail

Event Timeline

saiislam created this revision.Jul 1 2020, 7:32 AM
ABataev added inline comments.Jul 1 2020, 7:38 AM
openmp/runtime/test/env/kmp_set_dispatch_buf.c
0–1

This flag is not supported neither by gcc, nor by ice. Maybe, better to mark these tests as expected failed with clang-11?

ABataev added inline comments.Jul 1 2020, 7:43 AM
openmp/runtime/test/env/kmp_set_dispatch_buf.c
0–1

Or even better to mark these tests as unsupported by clang-11, because in some configs these tests pass.

saiislam marked an inline comment as done.Jul 1 2020, 11:50 AM
saiislam added inline comments.
openmp/runtime/test/env/kmp_set_dispatch_buf.c
0–1

Ok. How do I mark it unsupported for clang-11 only? The test gets called with "clang" which is a symlink to clang-11, but lit doesn't recognize the symlink.

saiislam updated this revision to Diff 275063.Jul 2 2020, 4:39 AM
  1. Added clang version identification in openmp/runtime/test
  2. Marked these three tests as unsupported for clang-11
  3. Refactored test lines to pass clang-format
ABataev added inline comments.Jul 2 2020, 5:41 AM
openmp/runtime/test/lit.cfg
110–119

I thought we already have such processing for clang, no? Many tests are marked as UNSUPPORTED for some particular clang version already.

Hahnfeld added inline comments.
openmp/runtime/test/lit.cfg
110–119

openmp/cmake/OpenMPTesting.cmake extracts the compiler version and the features are added via config.test_compiler_features above.

I think D82267 should fix the issue for dependence.c

saiislam updated this revision to Diff 275148.Jul 2 2020, 9:27 AM

Thanks @Hahnfeld. I realized that LLVM_MAJOR_VERSION was neither getting set in OpenMPTesting.cmake nor was it
inheriting it from anywhere else. So, OPENMP_TEST_COMPILER_VERSION_MAJOR was also getting set as empty, which
was getting propagated to lit by config.test_compiler_features. That is why "clang-11" was not getting recognized
as a valid target by lit-unsupported (though clang-11.0.0 would have worked). This change should fix this issue.

Thanks @protze.joachim. I have removed dependences.c from this patch and will wait for D82267 to land.

Does clang-11 now default to 50 behavior?
In this case, we can remove -fopenmp-version=50 from the tests, right?

Thanks @Hahnfeld. I realized that LLVM_MAJOR_VERSION was neither getting set in OpenMPTesting.cmake nor was it
inheriting it from anywhere else. So, OPENMP_TEST_COMPILER_VERSION_MAJOR was also getting set as empty, which
was getting propagated to lit by config.test_compiler_features. That is why "clang-11" was not getting recognized
as a valid target by lit-unsupported (though clang-11.0.0 would have worked). This change should fix this issue.

That's because the variable is called LLVM_VERSION_MAJOR (and it's been wrong since I added that code in 2017). I went ahead and fixed that mistake in https://github.com/llvm/llvm-project/commit/0e0483bf5c383d5815b9f945fea7e347d4badc0e. You shouldn't have to deal with broken infrastructure in this patch :)

Does clang-11 now default to 50 behavior?
In this case, we can remove -fopenmp-version=50 from the tests, right?

Yes, it now defaults to 50 behavior and -fopenmp-version=50 can be removed.
I am working on a follow up patch (D82575) to add tests without version string.

Thanks @Hahnfeld. I realized that LLVM_MAJOR_VERSION was neither getting set in OpenMPTesting.cmake nor was it
inheriting it from anywhere else. So, OPENMP_TEST_COMPILER_VERSION_MAJOR was also getting set as empty, which
was getting propagated to lit by config.test_compiler_features. That is why "clang-11" was not getting recognized
as a valid target by lit-unsupported (though clang-11.0.0 would have worked). This change should fix this issue.

That's because the variable is called LLVM_VERSION_MAJOR (and it's been wrong since I added that code in 2017). I went ahead and fixed that mistake in https://github.com/llvm/llvm-project/commit/0e0483bf5c383d5815b9f945fea7e347d4badc0e. You shouldn't have to deal with broken infrastructure in this patch :)

Oh wow. So ultimately something good came out of it :-)
Thank you! I will update my patch in a few minutes.

saiislam updated this revision to Diff 275169.Jul 2 2020, 10:55 AM

Removed fix for OpenMPTesting.cmake bug.

saiislam retitled this revision from [OpenMP] Temporarily disable failing runtime and ompt tests for OpenMP 5.0 to [OpenMP] Temporarily disable failing runtime tests for OpenMP 5.0.Jul 2 2020, 10:58 AM
saiislam edited the summary of this revision. (Show Details)
jdenny added a subscriber: jdenny.Jul 2 2020, 3:30 PM
This revision is now accepted and ready to land.Jul 6 2020, 5:31 AM
This revision was automatically updated to reflect the committed changes.