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

CI (MSVC): Install reference BLAS and LAPACK libraries. #824

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

mmuetzel
Copy link
Contributor

@mmuetzel mmuetzel commented Jun 4, 2024

Be more careful not to mix binaries that have been built with different OpenMP implementations. Intel MKL is linked against libiomp5md. But these runners build with MSVC cl or LLVM clang-cl, respectively. I.e., they are linking against the MS implementation or the LLVM implementation of OpenMP, respectively. That is dangerous, since it can degrade performance or cause incorrect results.

Avoid that issue by linking against the reference implementations of the BLAS and LAPACK libraries that don't use OpenMP at all.

This should help to avoid issues like the one in #823 where the tests failed with this runtime error:

OMP: Error #15: Initializing libomp140.x86_64.dll, but found libiomp5md.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/

Be more careful not to mix binaries that have been built with different
OpenMP implementations. Intel MKL is linked against libiomp5md. But
these runners build with MSVC `cl` or LLVM `clang-cl`, respectively.
I.e., they are linking against the MS implementation or the LLVM
implementation of OpenMP, respectively. That is dangerous, since it can
degrade performance or cause incorrect results.

Avoid that issue by linking against the reference implementations of the
BLAS and LAPACK libraries that don't use OpenMP at all.
@DrTimothyAldenDavis DrTimothyAldenDavis merged commit 3df9cb3 into DrTimothyAldenDavis:dev2 Jun 5, 2024
26 checks passed
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

Successfully merging this pull request may close these issues.

2 participants