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

openmp issue on Windows #2440

Open
jorisv opened this issue Sep 30, 2024 · 0 comments
Open

openmp issue on Windows #2440

jorisv opened this issue Sep 30, 2024 · 0 comments
Assignees

Comments

@jorisv
Copy link
Contributor

jorisv commented Sep 30, 2024

When building on Windows, with clang-cl and conda-forge dependencies some tests fails:

  • pinocchio-example-py-static-contact-dynamics
  • pinocchio-test-py-bindings_dynamics

Error message is the following:

OMP: Error #15: Initializing libomp140.x86_64.dll, but found libomp.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/

It's because the default numpy backend is mkl that use intel-openmp on Windows.

When using clang-cl, CMake will take openmp from the clang-cl installation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64/libomp.lib

This is a bad behavior since it hide openmp implementation by taking a non conda library as dependency.
In this case, this create a conflict with intel-openmp initialized by the mkl and make the tests fails.

There is two way to solve this issue:

  1. Using intel-openmp
  1. Using blis instead of mkl and use llvm-openmp

Since the ipopt issue should be removed in few weeks we will take option 2 to solve the issue.

In the meantime, we will deactivate parallel build from the Windows CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant