-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParU fails with OpenMP from MSVC #462
Comments
Also tagging @Aznaveh. The solution for this is to detect if OpenMP is 4.5 or later, and only use it for ParU for that version of OpenMP. If OpenMP is an older version, like OpenMP 2.0 in Microsoft Visual Studio, then ParU needs to be compiled without OpenMP. So that's a bug in our cmake -- we should be detecting this case in the cmake build system, and not use OpenMP for ParU if the version is too old. The rest of SuiteSparse is fine with OpenMP 2.0 (CHOLMOD uses it in a few places,and GraphBLAS is fundamentally parallel). I did use tasking in one place in GraphBLAS once, but I was able to change my algorithms to use the more basic OpenMP 2.0 methods. The parallel algorithms in ParU can't be redesigned, however. They are much more complex than my parallel algorithms in GraphBLAS and the will only work with OpenMP tasking. |
Thanks for clarifying. I opened #463 that should fix this. It looks like building LAGraph with OpenMP also doesn't work.
Not sure (yet) what that means. "improper form". |
It looks like MSVC requires that source code follows a stricter interpretation of the OpenMP standard. |
Thanks for merging the PRs. |
Thanks for your help! |
Describe the bug
When trying to build ParU with an MSVC toolchain, compilation fails with errors like the following:
Afaict, the
taskloop
construct was introduced with OpenMP 4.5. MSVC supports only OpenMP 2.0.To Reproduce
Try to build ParU with OpenMP using MSVC (see CI) or another toolchain that lacks support for OpenMP 4.5.
Expected behavior
ParU builds without error.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: