Closed aidanheerdegen closed 4 years ago
Slack discussion, for reference: https://arccss.slack.com/archives/C6PP0GU9Y/p1580816901006300
I was going to suggest appending the path, rather than prepending it, as a possible solution, but I'm glad it's been sorted out.
It feels like there may be a conda-agnostic solution to this, such as a more aggressive validation of the dynamic libraries, so I will keep this in mind.
NCI users on
gadi
experienced a sudden unexplained error with models that had previously been workingThe issue occurred with
payu
in theconda/analysis3-20.01
environment but was not present whenconda/analysis3-19.10
was used.This is because another package (
netcdf-fortran
) was upgraded in the20.01
environment. The dependency changed fromlibnetcdff.so.6
tolibnetcdff.so.7
, which is the same library theyam
exe used.This occurs because
LD_LIBRARY_PATH
is populated with the python library directory: https://github.com/payu-org/payu/blame/73ba06b47ed25b2801ebcd2eb9d00c3ebc79b72b/payu/cli.py#L87-L88so libraries in that directory are picked up preferentially.
When using python in a
conda
environment, thepython
executable hasRPATH
set, so it is not necessary to add toLD_LIBRARY_PATH
, and within aconda
environment can lead to bugs like this.Proposed solution is to detect if the
python
interpreter is in aconda
environment and branch past this code if so.