netcdf-c in spack-stack with or without pnetcdf?

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
stef
Posts: 207
Joined: Tue Mar 13, 2007 6:38 pm
Location: Independent researcher
Contact:

netcdf-c in spack-stack with or without pnetcdf?

#1 Post by stef »

I'm a beginner in parallel netcdf and was reading the spack-stack instructions at

https://github.com/myroms/roms-jedi/wik ... 80%90Stack

and also the base package configuration for spack-stack 1.9.1. The package.yaml

https://github.com/JCSDA/spack-stack/bl ... kages.yaml

contains

Code: Select all

  netcdf-c:
    # If using 4.9.1, turn off byterange variant to fix compile error: ~byterange
    require: '@4.9.2 +dap +mpi ~parallel-netcdf ~szip build_system=autotools'
If I understand this correctly, netcdf is built without pnetcdf (a.k.a parallel-netcdf), so without parallel support for netcdf 1,2,5. On the other hand, in the "base-env" package (which is used by jedi-base-env and in turn jedi-ufs-env), both netcdf-c and parallel-netcdf are required:

https://github.com/JCSDA/spack-stack/bl ... package.py

I don't understand this, why is pnetcdf required as a dependency in the stack if netcdf-c is not built with pnetcdf support :?: Is there another package that needs pnetcdf :?:

Sorry if this is more of a general programmig question rather than ROMS specific. Thanks in advance for your help.

User avatar
arango
Site Admin
Posts: 1396
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: netcdf-c in spack-stack with or without pnetcdf?

#2 Post by arango »

The pnetcdf library is only needed for PIO (Parallel IO). Here is my list of libraries for Stack/Spack 1.9.1:

Code: Select all

Currently Loaded Modules:
  1) MATLAB/R2025b              30) py-pip/23.1.2                59) bufr-query/0.0.4             88) py-netcdf4/1.7.1.post2
  2) totalview/2024.2.11        31) libyaml/0.2.5                60) ecbuild/3.7.2                89) py-six/1.16.0
  3) intel/2021.8.0             32) py-pyyaml/6.0.2              61) openjpeg/2.3.1               90) py-python-dateutil/2.8.2
  4) glibc/2.34                 33) esmf/8.6.1                   62) eccodes/2.33.0               91) py-pytz/2023.3
  5) numactl/2.0.18             34) fms/2024.02                  63) fckit/0.13.2                 92) py-tzdata/2023.3
  6) zlib-ng/2.2.1              35) libjpeg/2.1.0                64) fiat/1.4.1                   93) py-pandas/2.2.3
  7) pmix/5.0.3                 36) jasper/2.0.32                65) ectrans/1.5.0                94) py-pybind11/2.13.5
  8) openmpi/4.1.7              37) libpng/1.6.37                66) qhull/2020.2                 95) py-pycodestyle/2.11.0
  9) stack-openmpi/4.1.7        38) w3emc/2.10.0                 67) atlas/0.40.0                 96) py-pyhdf/0.11.4
 10) bacio/2.4.1                39) g2/3.5.1                     68) git-lfs/3.4.1                97) py-scipy/1.13.1
 11) snappy/1.2.1               40) g2tmpl/1.13.0                69) sp/2.5.0                     98) py-xarray/2024.7.0
 12) zstd/1.5.6                 41) ip/5.1.0                     70) gsibec/1.2.1                 99) udunits/2.2.28
 13) c-blosc/1.21.5             42) cmake/3.27.9                 71) krb5/1.21.3                 100) jedi-base-env/1.0.0
 14) nghttp2/1.63.0             43) git/2.43.5                   72) libtirpc/1.3.3              101) gftl/1.14.0
 15) curl/8.10.1                44) nccmp/1.9.0.1                73) hdf/4.2.15                  102) gftl-shared/1.9.0
 16) hdf5/1.14.3                45) py-setuptools/69.2.0         74) jedi-cmake/1.4.0            103) fargparse/1.8.0
 17) netcdf-c/4.9.2             46) py-packaging/24.1            75) ncview/2.1.8                104) yafyaml/1.4.0
 18) netcdf-fortran/4.6.1       47) py-tomli/2.0.1               76) json/3.11.3                 105) pflogger/1.15.0
 19) parallel-netcdf/1.12.3     48) py-typing-extensions/4.12.2  77) json-schema-validator/2.3.0 106) mapl/2.53.0-esmf-8.6.1
 20) parallelio/2.6.2           49) py-setuptools-scm/8.0.4      78) odc/1.5.2                   107) antlr/2.7.7
 21) gettext/0.21               50) py-wheel/0.41.2              79) py-attrs/23.1.0             108) gsl/2.8
 22) sqlite/3.34.1              51) wget/1.21.1                  80) py-pycparser/2.21           109) nco/5.2.4
 23) util-linux-uuid/2.40.2     52) base-env/1.0.0               81) py-cffi/1.17.1              110) nemsio/2.5.4
 24) python/3.11.7              53) boost/1.84.0                 82) py-findlibs/0.0.2           111) sfcio/1.4.2
 25) python-venv/1.0            54) bufr/12.1.0                  83) py-eccodes/1.5.0            112) sigio/2.3.3
 26) py-mpi4py/4.0.1            55) eigen/3.4.0                  84) py-f90nml/1.4.3             113) w3nco/2.4.1
 27) intel-tbb/2021.12.0        56) eckit/1.28.3                 85) py-h5py/3.12.1              114) jedi-ufs-env/1.0.0
 28) intel-oneapi-mkl/2024.2.2  57) gsl-lite/0.37.0              86) py-certifi/2023.7.22        115) stack-intel/2021.8.0
 29) py-numpy/1.26.4            58) netcdf-cxx4/4.3.1            87) py-cftime/1.0.3.4
I also loaded Matlab and TotalView which are not part of Stack/Spack.

stef
Posts: 207
Joined: Tue Mar 13, 2007 6:38 pm
Location: Independent researcher
Contact:

Re: netcdf-c in spack-stack with or without pnetcdf?

#3 Post by stef »

Thanks for the quick reply! Yes, the packages.yaml contains

Code: Select all

  parallelio:
    require: '@2.6.2 +pnetcdf'
and the parallelio/package.yaml contains

Code: Select all

depends_on("parallel-netcdf", type="link", when="+pnetcdf")
I guess in summery this mean that for pio with pnetcdf, netcdf itself does not need to be built with pnetcdf? The diagram at the pio website

https://ncar.github.io/ParallelIO/install.html

seems to support that, there is no direct line connecting the boxes "netCDF C Library" and "pnetcdf C Library".

Post Reply