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

Fix finding the NetCDF library in the Jigsaw build #769

Closed
wants to merge 2 commits into from

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Feb 1, 2024

This merge explicitly points to the libnetcdf that should be used in the Jigsaw build. It also breaks the jigsaw build into its own function.

Checklist

  • Document (in a comment titled Testing in this PR) any testing that was used to verify the changes

This merge explicitly points to the libnetcdf that should be used
in the Jigsaw build.  It also breaks the jigsaw build into its
own function.
@xylar xylar added bug Something isn't working dependencies and deployment Changes relate to creating conda and Spack environments, and creating a load script labels Feb 1, 2024
@xylar xylar self-assigned this Feb 1, 2024
@xylar
Copy link
Collaborator Author

xylar commented Feb 1, 2024

The Jigsaw build in Polaris was finding libnetcdf.so in /usr/lib64 on Compy, and that was subsequently causing a bunch of build failures. Instead, we want to be using the conda-forge version of libnetcdf, which this branch does. In the process, we have to call cmake for Jigsaw ourselves to pass the extra argument, rather than relying on Jigsaw-Python to do it for us.

@dengwirda
Copy link
Contributor

@xylar if you're being forced to include netcdf for jigsaw I expect there must be an issue / bug on my end --- it's intended to be an optional (and experimental) dependency that the cmake should handle...

@xylar
Copy link
Collaborator Author

xylar commented Feb 1, 2024

@dengwirda. I'm keen to look into this in the long term but for now I just need to get this working so it isn't preventing me from updating Polaris for reasons unrelated to Jigsaw.

I don't think it's necessarily that you're doing anything wrong in Jigsaw. It's just that we would need some way for someone calling python setup.py build_external to pass hints about where to find NetCDF. The issue for me is that I need to be building Jigsaw in one conda environment where it's safe to have compilers installed but installing it into another, where I have NetCDF. But also find_library() seemed to choose the libnetcdf.so from /usr/lib64 over the one in a conda environment even when that was available. So, yeah, I basically need a way to tell cmake where to find NetCDF rather than having it guess.

@dengwirda
Copy link
Contributor

Okay, makes sense --- I've added an issue for me to look at going forward.

@xylar xylar closed this Feb 16, 2024
@xylar xylar deleted the fix-jigsaw-netcdf branch February 16, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies and deployment Changes relate to creating conda and Spack environments, and creating a load script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants