# IT4Innovations # PH 2025 name = 'netCDF' version = '4.9.2' homepage = 'https://www.unidata.ucar.edu/software/netcdf/' description = """NetCDF (network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.""" toolchain = {'name': 'gompi', 'version': '2024a'} import os if os.environ.get("CLUSTERNAME") in ["KAROLINA"]: toolchainopts = {'pic': True, 'usempi': True, 'opt': True, 'optarch': 'march=core-avx2'} else: toolchainopts = {'pic': True, 'usempi': True, 'opt': True} #toolchainopts = {'pic': True, 'usempi': True} source_urls = ['https://github.com/Unidata/%(namelower)s-c/archive/'] sources = ['v%(version)s.tar.gz'] patches = ['%(name)s-%(version_major_minor)s.0_skip-nasa-test.patch'] checksums = [ {'v4.9.2.tar.gz': 'bc104d101278c68b303359b3dc4192f81592ae8640f1aee486921138f7f88cb7'}, {'%(name)s-%(version_major_minor)s.0_skip-nasa-test.patch': '19d99e03c048b037dc01f03f5b8ddc910ebaceb076d0f050540d348f26dfcd2a'}, ] builddependencies = [ ('Autotools', '20231222'), ('CMake', '3.29.3'), ('Doxygen', '1.11.0'), ] dependencies = [ ('HDF5', '1.14.5'), ('cURL', '8.7.1'), ('Szip', '2.1.1'), ('zstd', '1.5.6'), ('bzip2', '1.0.8'), ('libxml2', '2.12.7'), ] # disable Szip, zlib parallel I/O tests, since these can hang on some systems, e.g. generoso # see: https://github.com/easybuilders/easybuild-easyconfigs/pull/16834 # and https://github.com/easybuilders/easybuild-easyconfigs/pull/17107#issuecomment-1432947172 preconfigopts = ("sed -i -e 's|@MPIEXEC@ -n 4 ./tst_parallel5|echo \"skipped by EasyBuild\"|g'" " -e 's|@MPIEXEC@ -n 4 ./tst_parallel_zlib|echo \"skipped by EasyBuild\"|g'" " -e 's|@MPIEXEC@ -n 4 ./tst_parallel_compress|echo \"skipped by EasyBuild\"|g'" " %(builddir)s/%(namelower)s-c-%(version)s/nc_test4/run_par_test.sh.in &&") # make sure both static and shared libs are built # and disable "remote" tests that access a unreliable external test server over internet configopts = [ "-DENABLE_DAP_REMOTE_TESTS=OFF -DBUILD_SHARED_LIBS=OFF", "-DENABLE_DAP_REMOTE_TESTS=OFF -DBUILD_SHARED_LIBS=ON", ] # some tests try to start 16 MPI ranks, so we need to allow oversubscription to avoid failing tests pretestopts = "PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe " runtest = 'test' moduleclass = 'data'