Skip to main content

pinc

Continuous Integration

pinc is a parallel NetCDF I/O library that speaks Unidata's NetCDF classic formats (CDF-1/2/5) over a UCX transport instead of MPI. It is a fork of PnetCDF whose communication layer has been abstracted so that ranks coordinate through commux — a UCX tag-matching c10d backend for torch.distributed — rather than MPI-IO. This lets NetCDF parallel I/O run inside the PyTorch / torch.distributed (snapy) ecosystem without an MPI runtime.

pinc is packaged as a CPU-only, Linux-only Python wheel (UCX builds only on Linux) and installs alongside commux and torch.

Relationship to commux

pinc does not vendor a transport of its own. Its comm backend is built on commux:

NetCDF classic I/O  (PnetCDF core)
        |  generic PINC_Comm / PINC_Info / PINC_Datatype / PINC_Offset
        v
src/include/pnetcdf_comm.h(.in)      the backend seam (mpi | commux)
src/include/pnetcdf_commux.h         small C ABI (pinc_commux_* / PINC_COMMUX_*)
        v
src/comm/pinc_commux_runtime.cpp     owns a c10d TCPStore + commux ProcessGroupUCX
        v
libcommux (+ bundled UCX) and libtorch   from the installed commux / torch

At build time pinc's CMake locates the installed commux and torch Python packages (plus system UCX headers and NetCDF). The wheel is thin: it links libcommux/libtorch at runtime via $ORIGIN-relative rpaths into the sibling commux/ and torch/ site-packages and vendors only libnetcdf. import pinc imports torch first so libtorch is mapped before libcommux loads.

torch is a hard dependency: pinc_commux_runtime.cpp uses torch/c10d (c10d::TCPStore, c10d::ReduceOp, commux::ProcessGroupUCX) directly. pinc is CPU-only, so the CPU build of torch is sufficient.

Install

pip install pinc

This pulls in commux and torch (CPU). Linux x86_64, Python 3.10–3.13.

Python usage

import pinc

pinc.init_env("commux")          # initialise the commux runtime from the env
print(pinc.rank(), pinc.size())
pinc.barrier()
total = pinc.allreduce_int64(pinc.rank(), pinc.ReduceOp.SUM)
pinc.finalize()

# packaged C headers / libs for building C consumers
print(pinc.include_dir, pinc.library_dir)

The Python module is a thin binding over the pinc_commux_* C ABI declared in src/include/pnetcdf_commux.h.

Build from source

Building the wheel needs the commux and torch packages importable (CMake reads them), plus system UCX headers (ucp/api/ucp.h) and NetCDF:

# Debian/Ubuntu
sudo apt-get install -y libucx-dev libnetcdf-dev pkg-config
pip install 'torch==2.10.0' --index-url https://download.pytorch.org/whl/cpu
pip install 'commux==0.2.1'

git clone https://github.com/zoeyzyhu/pinc.git
cd pinc
# --no-build-isolation so CMake can import commux/torch
pip install --no-build-isolation --no-deps .

The build is driven by scikit-build-core; select the backend with the CMake option PNETCDF_COMM_BACKEND (commux, mpi, or auto).

CI / CD / releases

  • ci.yml — pre-commit lint checks and a Linux build + import smoke test on every push / PR to main.
  • cd.yml — on PR merge, computes the next version from the latest tag (plus optional release:major|minor|patch labels), pushes the tag, and cuts a GitHub Release. No version-bump commit — the version comes from the git tag via setuptools-scm.
  • release.yml — a manual Publish to PyPI run for a given tag that builds Linux wheels (cibuildwheel) and uploads them.

Acknowledgements

pinc is derived from PnetCDF, a collaborative work of Northwestern University and Argonne National Laboratory (project page, repository). The upstream PnetCDF license and copyright apply to the inherited sources; see COPYRIGHT and COPYING. PnetCDF has been supported by the U.S. Department of Energy's Office of Science (SciDAC) and the Exascale Computing Project.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pinc-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pinc-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pinc-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pinc-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file pinc-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pinc-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 707c0827dfb11cbdc07fa3134d360fd6da49d64f717fdb2871a6df34ef4ea59a
MD5 48e9d8ad3fde55d9054eb4ced60855ec
BLAKE2b-256 b9e8b6bb790c3029f2775a0103b949fbb07e564f2978f1e82f0322eeff3301b8

See more details on using hashes here.

File details

Details for the file pinc-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pinc-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f3e4d7fc06119571416e501b0afac0b9903cf832f1ed98e65bbf945b3fe1dcd1
MD5 d59467bef4cb1f20d44dab8a24bce0a6
BLAKE2b-256 a1d2fb5369fbe4c53bad73bc4a6f140afe2ad145c0e9ccb678a2cdc64e808d23

See more details on using hashes here.

File details

Details for the file pinc-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pinc-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fa6cd41978c3ca613d619afbb0a8f1dfcc09fa8fc453f90f669303d8d3546c51
MD5 a1782057bc64b36a2dff73af2dbf903d
BLAKE2b-256 ac04154b20b0c63e24705fbc6089e6e1db9d6b1d0261761456b1abaeb4db3ac8

See more details on using hashes here.

File details

Details for the file pinc-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pinc-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5857fc608b31cbb5e7c1b16717d44bb4ffac843fded0cee9f23ba379490e2921
MD5 825ca2b25245cc2e9ada580f87df1fa4
BLAKE2b-256 f5e0a7723649bd79686443b7a2a0327f9157e13145039da76300870fde7a81c3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

4 files

0.1.2

4 files

0.1.1

4 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page