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

Explicitly set OpenMP runtime library rpath like other normal libraries #5192

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Oct 2, 2024

Proposed changes

This should resolve OpenMP runtime library mismatch issue at runtime.

What type(s) of changes does this code introduce?

  • Bugfix
  • Build related changes

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

epyc-server

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted

@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 2, 2024

Test this please

Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain how this helps someone running build/bin/qmcpack ? It does look like it will help for ctest runs.

We'll also have to carefully test on e.g. a good sampling of the different platforms we have build recipes for.

@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 2, 2024

Test this please

@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 2, 2024

BUILD_RPATH embeds rpath/runpath when linking executables in the build directory. When we run ctest, this info will be used for look up libraries although the priority is lower than environment variable LD_LIBRARY_PATH.
INSTALL_RPATH makes sure rpath/runpath are kept after make install

Once QMCPACK is built and/or installed. There is no longer a need to handle LD_LIBRARY_PATH for looking up OpenMP runtime libraries of any compiler at runtime.

@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 4, 2024

Test this please

Copy link
Contributor

@PDoakORNL PDoakORNL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 7, 2024

Test this please

@ye-luo ye-luo enabled auto-merge October 7, 2024 20:27
@ye-luo ye-luo merged commit 075b984 into QMCPACK:develop Oct 7, 2024
38 of 39 checks passed
@ye-luo ye-luo deleted the set-openmp-runtime-rpath branch October 7, 2024 21:35
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.

3 participants