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

Rpath for netcdf libs #164

Merged
merged 5 commits into from
May 26, 2022
Merged

Rpath for netcdf libs #164

merged 5 commits into from
May 26, 2022

Conversation

ngs333
Copy link
Contributor

@ngs333 ngs333 commented May 18, 2022

This PR enables the addition of the netcdf libraries to the rpath of all NCTools compiled executables.
File configure.in and various Makefile.ac are modified, the first one to define and set an autotools variable for rpath, and the latter ones to use it.

This PR has been tested on Analysis by compiling NCTools (the canonical way using the site env.sh) ,
doing a module purge, and then making sure each executable can start.

@ngs333 ngs333 linked an issue May 18, 2022 that may be closed by this pull request
@ngs333 ngs333 requested review from underwoo and ceblanton May 18, 2022 22:07
@ngs333 ngs333 linked an issue May 19, 2022 that may be closed by this pull request
@ngs333 ngs333 linked an issue May 19, 2022 that may be closed by this pull request
@ngs333 ngs333 self-assigned this May 19, 2022
Copy link
Contributor

@ceblanton ceblanton left a comment

Choose a reason for hiding this comment

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

The update works; the executables now can run with no environment modification

@underwoo
Copy link
Member

I discovered why LD_RUN_PATH is not working. The linker will ignore LD_RUN_PATH if any rpath settings are given on the command line. The MPI wrapper -- used to link the executables -- does include rpath options for the MPI and GCC libraries.

I feel there should be a more universal method. However, ATT I can not find it. We should continue to look for a better method.

Copy link
Member

@underwoo underwoo left a comment

Choose a reason for hiding this comment

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

Please do not merge until all tests pass.

@ngs333 ngs333 closed this May 25, 2022
@ngs333
Copy link
Contributor Author

ngs333 commented May 25, 2022

@underwoo
The failure was from new code that came in #159.
That PR was reverted.

@ngs333 ngs333 reopened this May 26, 2022
@ngs333 ngs333 merged commit ca0c4af into NOAA-GFDL:master May 26, 2022
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.

Set the run-time search path to include required libraries
3 participants