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

libopenblas version > 0.3.23 causes OpenMP error on Mac #653

Closed
jobovy opened this issue Jun 24, 2024 · 1 comment
Closed

libopenblas version > 0.3.23 causes OpenMP error on Mac #653

jobovy opened this issue Jun 24, 2024 · 1 comment

Comments

@jobovy
Copy link
Owner

jobovy commented Jun 24, 2024

🐛 Bug

Building wheels with libopenblas version > 0.3.23 causes the following OpenMP error on Macs (both x86_64 and arm64):

OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib 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/
Abort trap: 6

This seems to be due to the wheel delocation; libopenblas 0.3.24 and larger specifically seem to be the issue, as this issue does not occur with earlier libopenblas.

Issue fixed for now by pinning libopenblas to 0.3.23 in #652.

Reproducible example

import galpy; print(galpy.__version__)
from galpy.potential import MWPotential2014
from galpy.orbit import Orbit

Expected behavior

Should just work.

System Details

macOS-14.5-arm64-arm-64bit
Python 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:51:49) [Clang 16.0.6 ]
numpy 2.0.0
scipy 1.13.1
matplotlib 3.8.4
galpy 1.10.0.dev0
astropy 6.1.1
@jobovy
Copy link
Owner Author

jobovy commented Jul 4, 2024

(Somewhat) fixed in #660.

@jobovy jobovy closed this as completed Jul 4, 2024
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