-
Notifications
You must be signed in to change notification settings - Fork 4
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
CABLE linked against incorrect libraries when run from the hh5 conda environment #279
Comments
Sounds like when we think of a release of CABLE, we may want to release |
The issue is due to environment variables being set which affect the behaviour the build, notably
A quick fix would be to unset these variables before invoking CMake. |
CABLE is linked against incorrect libraries for netcdf and MPI when running benchcab (v4.0.2) from the hh5 conda environment. The issue is due to environment variables being set which affect the behaviour of the build, notably LDFLAGS and CMAKE_PREFIX_PATH, which point CMake to find the netcdf and MPI libraries installed in the current conda environment. This change unsets these variables so that CMake finds the appropriate libraries which get loaded in as modules. Fixes #279
CABLE is linked against incorrect libraries for netcdf and MPI when running benchcab (v4.0.2) from the hh5 conda environment. The issue is due to environment variables being set which affect the behaviour of the build, notably LDFLAGS and CMAKE_PREFIX_PATH, which point CMake to find the netcdf and MPI libraries installed in the current conda environment. This change unsets these variables so that CMake finds the appropriate libraries which get loaded in as modules. Fixes #279
@dsroberts I noticed there are other environment variables being set when loading |
Hi @SeanBryan51 Yep. These come from the environment activation script for |
CABLE is linked against incorrect libraries for netcdf and MPI when running benchcab (v4.0.2) from the hh5 conda environment.
The following behaviour only occurs when running from the hh5 conda environment and not when running from the
benchcab-dev
environment.Steps to reproduce:
Running the above causes the build to fail when compiling the MPI executable:
Output from CMake shows that we are linking against an MPI library found in the conda environment:
when the MPI_Fortran path should instead be pointing to
/apps/openmpi/4.1.0/lib/...
.The serial executable compiles successfully but is linked against the netcdf-fortran library found in the conda environment:
when this should point to
/apps/netcdf/4.7.4/lib/...
.Running the serial executable crashes due to undefined symbols from the netcdf library:
The PBS job script outputs:
Inspecting the standard output from CABLE:
The text was updated successfully, but these errors were encountered: