This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix for https://bugs.llvm.org/show_bug.cgi?id=45904.
ClosedPublic

Authored by AndreyChurbanov on May 14 2020, 8:10 AM.

Details

Summary

Fixed task bookkeeping for serialized detached tasks.

Not sure how to properly request the OpenMP 5.0 option for the test; hardcoded the -fopenmp-version=50 option for now. If somebody knows a better way, please advise.

Diff Detail

Event Timeline

AndreyChurbanov retitled this revision from Fix for https://bugs.llvm.org/show_bug.cgi?id=45904. to [OpenMP] Fix for https://bugs.llvm.org/show_bug.cgi?id=45904..May 14 2020, 8:15 AM

-fopenmp-version=50 is the right way to provide a version of OpenMP.

jdoerfert accepted this revision.May 14 2020, 9:01 PM

LGTM, one comment.

openmp/runtime/src/kmp_tasking.cpp
918–919

Update the comment please.

This revision is now accepted and ready to land.May 14 2020, 9:01 PM

Does -fopenmp-version work with the Intel Compiler? How will this work if the GCC eventually gets support for OpenMP 5.0?

Comments addressed.

AndreyChurbanov marked an inline comment as done.May 18 2020, 5:21 AM

Does -fopenmp-version work with the Intel Compiler? How will this work if the GCC eventually gets support for OpenMP 5.0?

Thanks for comment. I added Intel legacy compiler icc to the list of unsupported compilers as it supports neither detach clause nor -fopenmp-version option; and listed particular gcc versions, so that next version could be tested if they will implement the support of detach clause.

This revision was automatically updated to reflect the committed changes.

Can FileCheck deal with tests, which potentially deadlock/stall?

This was the initial behavior of the test provided in the issue.

Can FileCheck deal with tests, which potentially deadlock/stall?

This was the initial behavior of the test provided in the issue.

It will deadlock/stall with the program, thus the problem will show up.

I guess my question was: can lit and the build bots deal with such deadlock? Do they employ timeouts?
Or is there some commonly used mechanism of timeout, which we need to include in the runtime?

I guess my question was: can lit and the build bots deal with such deadlock? Do they employ timeouts?
Or is there some commonly used mechanism of timeout, which we need to include in the runtime?

The bots deal with this as we accidentally run into endless loops in the compiler more often than one would think ;)

I guess lit itself will just hang, maybe there is a timeout option builtin or you can manually wrap it in a timeout script if you need to.