PnetCDF is a library providing high-performance parallel I/O while still maintaining file-format compatibility with Unidata's NetCDF, specifically the formats of CDF-1 and CDF-2. Although NetCDF supports parallel I/O starting from version 4, the files must be in HDF5 format. PnetCDF is currently the only choice for carrying out parallel I/O on files that are in classic formats (CDF-1 and 2). In addition, PnetCDF supports the CDF-5 file format, an extension of CDF-2, that supports more data types and allows users to define large dimensions, attributes, and variables (>2B elements).
Availability and Restrictions
Versions
The following versions of PnetCDF are available at OSC:
Version | Owens | Pitzer |
---|---|---|
1.7.0 | X* | |
1.8.1 | X | |
1.10.0 | X | |
1.12.1 | X* |
You can use module spider pnetcdf
to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.
Access
PnetCDF is available to all OSC users. If you have any questions, please contact OSC Help.
Publisher/Vendor/Repository and License Type
Northwestern University and Argonne National Lab., Open source
Usage
Usage on Owens
Set-up
To initalize the system prior to using PnetCDF, run the following comand:
module load pnetcdf
Building With PnetDCF
With the PnetCDF module loaded, the following environment variables will be available for use:
VARIABLE | USE |
---|---|
$PNETCDF_CFLAGS | Use during your compilation step for C or C++ programs. |
$PNETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$PNETCDF_LIBS |
Use when linking your program to PnetCDF. |
$PNETCDF | Path to the PnetCDF installation directory |
For example, to build the code myprog.c with the pnetcdf library you would use:
mpicc -c $PNETCDF_CFLAGS myprog.c mpicc -o myprog myprog.o $PNETCDF_LIBS
Batch Usage
#!/bin/bash #SBATCH --job-name=AppNameJob #SBATCH --nodes=1 --ntasks-per-node=28 #SBATCH --account <project-account> srun ./myprog