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

[gompi/2022.05] in-place update to netCDF v4.9.0 #15677

Merged
merged 4 commits into from
Jun 23, 2022
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = 'netCDF'
version = '4.8.1'
version = '4.9.0'

homepage = 'https://www.unidata.ucar.edu/software/netcdf/'
description = """NetCDF (network Common Data Form) is a set of software libraries
Expand All @@ -11,7 +11,15 @@ toolchainopts = {'pic': True, 'usempi': True}

source_urls = ['https://github.com/Unidata/netcdf-c/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['bc018cc30d5da402622bf76462480664c6668b55eb16ba205a0dfb8647161dd0']
patches = [
'netCDF-%(version)s_fix-lib-name.patch',
'netCDF-%(version)s_fix-linking-errors.patch',
]
checksums = [
'9f4cb864f3ab54adb75409984c6202323d2fc66c003e5308f3cdf224ed41c0a6', # v4.9.0.tar.gz
'ed45ae6c49cf8dcddaadef4c5cf403049bf3f761187413d7b03754d319345d6a', # netCDF-4.9.0_fix-lib-name.patch
'2b9579c149579d137eb16ae5d790787774033dcec49c0d4993d9859f224e7b15', # netCDF-4.9.0_fix-linking-errors.patch
]

builddependencies = [
('Autotools', '20220317'),
Expand All @@ -23,15 +31,18 @@ dependencies = [
('HDF5', '1.13.1'),
('cURL', '7.83.0'),
('Szip', '2.1.1'),
('zstd', '1.5.2'),
]

# HDF5 version detection is missed in netCDF 4.8.1 when HDF5_C_LIBRARY, HDF5_INCLUDE_DIR, and HDF5_HL_LIBRARY are set
local_hdf5_version_fix = '-DHDF5_VERSION=$EBVERSIONHDF5'

# make sure both static and shared libs are built
configopts = [
"-DBUILD_SHARED_LIBS=OFF %s " % local_hdf5_version_fix,
"-DBUILD_SHARED_LIBS=ON %s " % local_hdf5_version_fix,
"-DBUILD_SHARED_LIBS=OFF",
"-DBUILD_SHARED_LIBS=ON",
]

# some tests try to start 16 MPI ranks, so we need to allow oversubscription to avoid failing tests
pretestopts = "OMPI_MCA_rmaps_base_oversubscribe=1 "

runtest = 'test'

moduleclass = 'data'
23 changes: 23 additions & 0 deletions easybuild/easyconfigs/n/netCDF/netCDF-4.9.0_fix-lib-name.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 80a6611cfca98a5979c5ac69cba56a49af8c1e48 Mon Sep 17 00:00:00 2001
From: Yuriy Chernyshov <[email protected]>
Date: Sun, 19 Jun 2022 19:29:20 +0300
Subject: [PATCH] Fix typo in CMakeLists.txt

At the time generated dynamic library is named `libnetcdf.so.19}` which looks like a typo.
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7bf8641bec..18366d24ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,7 @@ SET(NC_VERSION ${netCDF_VERSION})
SET(PACKAGE_VERSION ${VERSION})

# These values should match those in configure.ac
-SET(netCDF_LIB_VERSION 19})
+SET(netCDF_LIB_VERSION 19)
SET(netCDF_SO_VERSION 19)

# Version of the dispatch table. This must match the value in
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
fix "multiple definition" linking errors,
see also https://github.com/Unidata/netcdf-c/issues/2419
author: Kenneth Hoste (HPC-UGent) + Lars Viklund (Umeå University)
--- netcdf-c-4.9.0/include/netcdf_json.h.orig 2022-06-23 08:35:33.345891769 +0200
+++ netcdf-c-4.9.0/include/netcdf_json.h 2022-06-23 08:37:38.626339409 +0200
@@ -57,25 +57,25 @@
#endif

/* Parse a JSON string */
-DLLEXPORT int NCJparse(const char* text, unsigned flags, NCjson** jsonp);
+DLLEXPORT static int NCJparse(const char* text, unsigned flags, NCjson** jsonp);

/* Reclaim a JSON tree */
-DLLEXPORT extern void NCJreclaim(NCjson* json);
+DLLEXPORT static void NCJreclaim(NCjson* json);

/* Create a new JSON node of a given sort */
-DLLEXPORT extern int NCJnew(int sort, NCjson** objectp);
+DLLEXPORT static int NCJnew(int sort, NCjson** objectp);

/* Create new json object with given string content */
-DLLEXPORT extern int NCJnewstring(int sort, const char* value, NCjson** jsonp);
+DLLEXPORT static int NCJnewstring(int sort, const char* value, NCjson** jsonp);

/* Create new json object with given counted string content */
-DLLEXPORT extern int NCJnewstringn(int sort, size_t len, const char* value, NCjson** jsonp);
+DLLEXPORT static int NCJnewstringn(int sort, size_t len, const char* value, NCjson** jsonp);

/* Get dict key value by name */
-DLLEXPORT extern int NCJdictget(const NCjson* dict, const char* key, NCjson** valuep);
+DLLEXPORT static int NCJdictget(const NCjson* dict, const char* key, NCjson** valuep);

/* Convert one json sort to value of another type; don't use union so we can know when to reclaim sval */
-DLLEXPORT extern int NCJcvt(const NCjson* value, int outsort, struct NCJconst* output);
+DLLEXPORT static int NCJcvt(const NCjson* value, int outsort, struct NCJconst* output);

#ifndef NETCDF_JSON_H

@@ -230,7 +230,7 @@

/**************************************************/

-int
+static int
NCJparse(const char* text, unsigned flags, NCjson** jsonp)
{
int stat = NCJ_OK;
@@ -579,7 +579,7 @@

/**************************************************/

-void
+static void
NCJreclaim(NCjson* json)
{
if(json == NULL) return;
@@ -621,7 +621,7 @@
/**************************************************/
/* Build Functions */

-int
+static int
NCJnew(int sort, NCjson** objectp)
{
int stat = NCJ_OK;
@@ -651,13 +651,13 @@
return NCJTHROW(stat);
}

-int
+static int
NCJnewstring(int sort, const char* value, NCjson** jsonp)
{
return NCJTHROW(NCJnewstringn(sort,strlen(value),value,jsonp));
}

-int
+static int
NCJnewstringn(int sort, size_t len, const char* value, NCjson** jsonp)
{
int stat = NCJ_OK;
@@ -679,7 +679,7 @@
return NCJTHROW(stat);
}

-int
+static int
NCJdictget(const NCjson* dict, const char* key, NCjson** valuep)
{
int i,stat = NCJ_OK;
@@ -755,7 +755,7 @@
#endif

/* Convert a JSON value to an equivalent value of a specified sort */
-int
+static int
NCJcvt(const NCjson* jvalue, int outsort, struct NCJconst* output)
{
int stat = NCJ_OK;