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

Add recipe for libpnetcdf #21797

Merged
merged 11 commits into from
Jul 6, 2023
Merged

Add recipe for libpnetcdf #21797

merged 11 commits into from
Jul 6, 2023

Conversation

xylar
Copy link
Contributor

@xylar xylar commented Jan 19, 2023

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/libpnetcdf) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipes/libpnetcdf:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

Comment on lines +71 to +75
recipe-maintainers:
- xylar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zklaus, would you be willing to be a maintainer of the PNetCDF library? It seems like it would make sense since you're a maintainer (and a very helpful one!) for parallelio.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, can do 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great, thank you! Feel free to review and recommend changes.

@xylar
Copy link
Contributor Author

xylar commented Jan 19, 2023

@conda-forge/help-c-cpp, this is ready for your review.

Comment on lines 30 to 31
ignore_run_exports_from:
- netcdf-fortran
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have had trouble with run_exports from netcdf-fortran in the parallellio feedstock, so I'm assuming that might be an issue here, too.
https://github.com/conda-forge/parallelio-feedstock/blob/main/recipe/meta.yaml#L33-L34

@xylar
Copy link
Contributor Author

xylar commented Feb 15, 2023

@conda-forge/help-c-cpp, I'm sure you have a giant backlog but just wanting to check in about when you might be able to review this.

recipes/libpnetcdf/meta.yaml Outdated Show resolved Hide resolved
Comment on lines 51 to 60
commands:
- pnetcdf-config --all
- test ! -f ${PREFIX}/lib/libpnetcdf.a
- test -f ${PREFIX}/lib/libpnetcdf${SHLIB_EXT}
- pnetcdf-config --has-c++ | grep -q yes
- pnetcdf-config --has-fortran | grep -q yes
- pnetcdf-config --netcdf4 | grep -q enabled
Copy link
Member

Choose a reason for hiding this comment

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

This recipe has a run_export which means there should be some existence tests for header files and package config files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, good call. I've added these. Let's see how the testing goes.

@xylar
Copy link
Contributor Author

xylar commented Feb 22, 2023

@carterbox, thank you for your review and your patience with my inexperience at this. This is ready for you to re-reveiw when you get a chance.

@xylar
Copy link
Contributor Author

xylar commented Feb 22, 2023

@conda-forge/help-c-cpp, ready for review!

host:
- {{ mpi }}
# these need to be listed twice so conda build picks up the pins
- libnetcdf
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the issue holding up this PR? The build link is no longer there, can you re trigger? And if possible give more detail as to the issue - the configure line above clearly specifies shared and not static libraries.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jedwards4b, I reran the CI yesterday. I believe this is the equivalent line in the latest run:
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=722946&view=logs&j=e35d4f76-8ff2-5536-d795-df91e63eb9f7&t=fa7b4b17-b6ff-5c9c-8cfc-15f888c92310&l=4270

WARNING (libpnetcdf): run-exports library package conda-forge::libnetcdf-4.8.1-mpi_openmpi_hb9a5949_6 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@carterbox, I believe the issue is that static libraries were shipped with libnetcdf until v4.9.0: conda-forge/libnetcdf-feedstock#140.

It seems like the easiest option might be to migrate straight to a later libnetcdf. Is the best way to do that just to add a conda_build_config.yaml with the desired pin? Or is there a way to bring in the migrator into the recipe somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jedwards4b, is there any way that my recipe could be misconfigured (for OSX in particular) and not be linking libpnetcdf with libnetcdf at all?

Copy link
Contributor

Choose a reason for hiding this comment

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

Linking pnetcdf to netcdf is a new feature and one that I haven't used. Do you need it? What if we just remove the netcdf dependancy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, I assumed it was required. We can remove it.

Copy link
Contributor Author

@xylar xylar Jun 14, 2023

Choose a reason for hiding this comment

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

What about netcdf-fortran? I guess it can't need that either if it doesn't need netcdf-c?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jedwards4b, I think I'm starting to understand. I have --with-netcdf4=${PREFIX} in the build and I will need to remove that if we're not using libnetcdf. Otherwise, I see (predictably):

      ------------------------------------------------------------
      Missing NetCDF-4 header files 'netcdf.h' or 'netcdf_meta.h'
      required to build PnetCDF with NetCDF-4 support. Use option
          --with-netcdf4=/path/to/implementation
      to specify the location of NetCDF-4 installation. In addition,
      please make sure the MPI C compiler is compatible with the one
      used to build NetCDF-4. Check 'config.log' for more information.
      Stopping ...
      ------------------------------------------------------------

Would that be your suggestion to begin with? Build without the --with-netcdf4 flag?

Assuming that's the case, I'll try removing it.

Will replace this with a migrators once we have a feedstock.
recipe-maintainers:
- xylar
- zklaus
- jedwards4b
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jedwards4b, are you also interested in being a maintainer? If so, your help would be quite valuable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, please add me as a maintainer. Thanks

@xylar xylar requested a review from carterbox June 14, 2023 16:46
@xylar
Copy link
Contributor Author

xylar commented Jun 14, 2023

@conda-forge/help-c-cpp, ready for review!

@xylar
Copy link
Contributor Author

xylar commented Jun 14, 2023

@conda-forge/help-c-cpp and @carterbox, I have removed libnetcdf and netcdf-fortran as dependencies at least for now. We can explore in the feedstock whether we can add libnetcdf back as a dependency without the overdependency warning.

Copy link
Contributor

@mahf708 mahf708 left a comment

Choose a reason for hiding this comment

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

In the interest of getting this merged :)

@carterbox carterbox closed this Jul 6, 2023
@carterbox carterbox reopened this Jul 6, 2023
@carterbox carterbox merged commit 497e346 into conda-forge:main Jul 6, 2023
@xylar xylar deleted the libpnetcdf branch July 6, 2023 08:34
@xylar
Copy link
Contributor Author

xylar commented Jul 6, 2023

Thanks a bunch @carterbox. I know this was a slog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants