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
OMP: Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already intialized #40
Comments
Thanks for using it!
Argos Translate has a PyQt native app, LibreTranslate is a web app/api build on top of Argos Translate which are you using? I've never seen this before but looking around it looks like this is probably some weird interaction between CTranslate and Intel CPUs on Mac. It looks like Related issues: |
Both PyTorch and CTranslate2 are correct to bundle this library into their Python package, so I'm not sure what should be done here. The workaround suggested in the error message should work and I don't think it will cause issues. |
Interesting, that's a tricky one. If this is a reoccurring issue maybe Argos Translate should set the |
I have a potential fix for this pushed up. @nikohunt can you try installing from source to see if this fixes the issue? I didn't want to always set the environment variable so I try to detect if Argos Translate is running on an Intel processor with |
Thanks a lot @PJ-Finlay! I pulled down argos just now and built; still the same issue. However, upon checking the fix, I ran something similar on my machine and noticed the following:
|
I'm happy to try and branch and make a pull request for this one - never contributed to a project that's not my own before! |
That was what I was worried about. It doesn't seem like there is a good way to consistently determine if someone is using an Intel CPU with the Python standard library and I don't want to add a dependency for this.
That would be great! I would look into the Python platform docs and see if there is something that works on Mac/Intel otherwise just remove the if statment. |
Thanks. Yes, I'm on a macbook. I can use the following to get the "intel" piece out reliably in the terminal: |
I think that would work but if it's this involved I think it's better to just remove the if statement and set the environment variable for everyone. I have an Intel CPU and don't have this issue on Linux but this could also happen on Windows so best to be as broad as possible. Thanks for handling this. |
Just pushed a patch to PyPI fixing this |
Hi,
Thanks for the amazing project. This was a fresh install on a new python 3.8.3 virtual environment using pip install and launching straight away. The web app launches, but after a few key strokes, the process crashes with the following error logged to the terminal:
OMP: Error #15: Initializing libiomp5.dylib, but found libiomp5.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://www.intel.com/software/products/support/. Abort trap: 6
Any advice appreciated here, thanks again.
The text was updated successfully, but these errors were encountered: