Skip to content
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

Windows: Disable OpenMP #29

Merged
merged 3 commits into from
Oct 12, 2021
Merged

Windows: Disable OpenMP #29

merged 3 commits into from
Oct 12, 2021

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Oct 12, 2021

The OpenMP implementation of most of the Conda-Forge software stack is using MSVC's OpenMP runtime (limited to OpenMP 2.0). This is also what is used in blosc in our dependencies.

When we compile WarpX, we need a newer OpenMP (4.0+), which is why we compiled with LLVM. Unfortunately, the LLVM OpenMP runtime and MSVC runtime cannot be loaded at the same time and thus crash if we perform I/O operations (ref.: ECP-WarpX/WarpX#1776).

For now, we just disable OpenMP for WarpX builds. In the future, Microsoft might upgrade their OpenMP runtime:
https://devblogs.microsoft.com/cppblog/improved-openmp-support-for-cpp-in-visual-studio/

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

The OpenMP implementation of most of the Conda-Forge software stack
is using MSVC's OpenMP runtime (limited to OpenMP 2.0). This is
also what is used in blosc in our dependencies.

When we compile WarpX, we need a newer OpenMP (4.0+), which is
why we compiled with LLVM. Unfortunately, the LLVM OpenMP runtime
and MSVC runtime cannot be loaded at the same time and thus crash
if we perform I/O operations.

For now, we just disable OpenMP for WarpX builds. In the future,
Microsoft might upgrade their OpenMP runtime:
https://devblogs.microsoft.com/cppblog/improved-openmp-support-for-cpp-in-visual-studio/
@ax3l ax3l added the bug Something isn't working label Oct 12, 2021
@ax3l ax3l requested a review from RemiLehe as a code owner October 12, 2021 16:37
@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@ax3l
Copy link
Member Author

ax3l commented Oct 12, 2021

@conda-forge-admin, please rerender

@ax3l
Copy link
Member Author

ax3l commented Oct 12, 2021

MSVC build:

CMake Error at build/_deps/fetchedamrex-src/Tools/CMake/AMReXUtils.cmake:142 (message):
  

  MSVC compiler version is 19.16.27045.0.  Minimum required is 19.23.

So we keep using LLVM (but w/o OpenMP).

@ax3l
Copy link
Member Author

ax3l commented Oct 12, 2021

@conda-forge-admin, please rerender

@github-actions
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

@ax3l ax3l merged commit 20bea8e into conda-forge:master Oct 12, 2021
@ax3l ax3l deleted the fix-noOpenMPWin branch October 12, 2021 22:03
@ax3l ax3l mentioned this pull request Oct 20, 2021
5 tasks
ax3l added a commit to ax3l/warpx-feedstock that referenced this pull request Oct 29, 2021
Forgot to redeclare the dependency in conda-forge#31 (see conda-forge#29).
@ax3l ax3l mentioned this pull request Oct 29, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants