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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions recipes/libpnetcdf/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -xe

export MPICC=mpicc
export MPICXX=mpicxx
export MPIF77=mpifort
export MPIF90=mpifort

./configure --prefix=${PREFIX} \
--with-mpi=${PREFIX} \
--enable-shared=yes \
--enable-static=no

make

# MPI tests aren't working in CI (not uncommon)
# make check
# make ptest

make install
3 changes: 3 additions & 0 deletions recipes/libpnetcdf/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mpi:
- openmpi
- mpich
71 changes: 71 additions & 0 deletions recipes/libpnetcdf/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{% set version = "1.12.3" %}
{% set build = 0 %}

# recipe-lint fails if mpi is undefined
{% set mpi = mpi or 'mpich' %}
{% if mpi == "mpich" %}
# prioritize mpich via build number
{% set build = build + 100 %}
{% endif %}

package:
name: libpnetcdf
version: {{ version }}

source:
url: https://parallel-netcdf.github.io/Release/pnetcdf-{{ version }}.tar.gz
sha256: 439e359d09bb93d0e58a6e3f928f39c2eae965b6c97f64e67cd42220d6034f77

build:
number: {{ build }}
skip: True # [win]
{% set mpi_prefix = "mpi_" + mpi %}
# add build string so packages can depend on mpi variants dependencies:
# `PKG_NAME * mpi_mpich_*` for mpich
# `PKG_NAME * mpi_*` for any mpi
string: {{ mpi_prefix }}_h{{ PKG_HASH }}_{{ build }}

run_exports:
- {{ pin_subpackage('libpnetcdf', max_pin='x.x.x') }} {{ mpi_prefix }}_*

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }}
- m4
- make
host:
- {{ mpi }}

test:
commands:
- pnetcdf-config --all
- test -f ${PREFIX}/lib/pkgconfig/pnetcdf.pc
- test -f ${PREFIX}/include/pnetcdf
- test -f ${PREFIX}/include/pnetcdf.h
- test -f ${PREFIX}/include/pnetcdf.mod
- test -f ${PREFIX}/include/pnetcdf.inc
- 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
# disabled for now
# - pnetcdf-config --netcdf4 | grep -q enabled


about:
home: https://parallel-netcdf.github.io/
license: custom
license_file: COPYRIGHT
summary: |
PnetCDF is a high-performance parallel I/O library for accessing Unidata's
NetCDF, files in classic formats, specifically the formats of CDF-1, 2, and
5.
dev_url: https://github.com/Parallel-NetCDF/PnetCDF

extra:
recipe-maintainers:
- xylar
Comment on lines +68 to +69
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.

- 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