-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[OpenMP] Create versioned libgomp softlinks #112973
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
Conversation
libgomp.1.dylib for MacOS or libgomp.so.1 for Linux
Then change looks fine, but I'm still not clear about the motivation. |
llvm openmp creates an alias libgomp.so to libomp.so. It is intended to use libomp as a drop-in replacement of libgomp. Big picture, linking both libgomp and libomp may work but it is bad. See https://cpufun.substack.com/p/is-mixing-openmp-runtimes-safe I hit additional issues with affinity control. After fixing the alias, my app only picks up libomp at runtime even if it links a library openblas which was compiled with GCC and linked against libgomp. |
Ping @shiltian |
If I understand your comment correctly, |
Sorry for the confusing. I corrected my type in the above comment. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/7574 Here is the relevant piece of the build log for the reference
|
Add libgomp.1.dylib for MacOS and libgomp.so.1 for Linux Linkers on Mac and Linux pick up versioned libgomp dynamic library files. The existing softlinks (libgomp.dylib for MacOS and libgomp.so for Linux) are insufficient. This helps alleviate the issue of mixing libgomp and libomp at runtime.
/cherry-pick eccdb24 |
/pull-request #115944 |
Add libgomp.1.dylib for MacOS and libgomp.so.1 for Linux
Linkers on Mac and Linux pick up versioned libgomp dynamic library files. The existing softlinks (libgomp.dylib for MacOS and libgomp.so for Linux) are insufficient. This helps alleviate the issue of mixing libgomp and libomp at runtime.