From e47c7afef5f67e7942a8ffaa92f9eba29710b600 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Tue, 20 Aug 2024 12:39:04 +0000 Subject: [PATCH 1/3] GHA: update macos-12 to macos-13 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fbb41bf93..59e7b76b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -121,11 +121,11 @@ jobs: - name: macos # Xcode compiler requires empty environment variables, so we pass null (~) here - os: macos-12 + os: macos-13 compiler: clang-14 compiler_cc: ~ compiler_cxx: ~ - compiler_fc: gfortran-11 + compiler_fc: gfortran-13 caching: true coverage: false cmake_options: -DMPI_SLOTS=4 From f62b1743a3b400a8105434fe40ba1d3fa65584f4 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Wed, 21 Aug 2024 07:10:56 +0000 Subject: [PATCH 2/3] Fix out-of-bounds error --- .../unstructured/ConservativeSphericalPolygonInterpolation.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/atlas/interpolation/method/unstructured/ConservativeSphericalPolygonInterpolation.h b/src/atlas/interpolation/method/unstructured/ConservativeSphericalPolygonInterpolation.h index 3dd79099b..6d4db4dba 100644 --- a/src/atlas/interpolation/method/unstructured/ConservativeSphericalPolygonInterpolation.h +++ b/src/atlas/interpolation/method/unstructured/ConservativeSphericalPolygonInterpolation.h @@ -110,9 +110,10 @@ class ConservativeSphericalPolygonInterpolation : public Method { SRCTGT_INTERSECTPLG_DIFF, // index, 1/(unit_sphere.area) ( \sum_{scell} scell.area - \sum{tcell} tcell.area ) REMAP_CONS, // index, error in mass conservation REMAP_L2, // index, error accuracy for given analytical function - REMAP_LINF // index, like REMAP_L2 but in L_infinity norm + REMAP_LINF, // index, like REMAP_L2 but in L_infinity norm + ERRORS_ENUM_SIZE }; - std::array errors; + std::array errors; double tgt_area_sum; double src_area_sum; From f7213e954248c2e4e1a44fba69eab2f01a890d31 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Wed, 21 Aug 2024 07:23:56 +0000 Subject: [PATCH 3/3] Remove python2 support in c2f.py --- tools/c2f.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/c2f.py b/tools/c2f.py index cb30c421c..652b65935 100755 --- a/tools/c2f.py +++ b/tools/c2f.py @@ -7,9 +7,8 @@ # granted to it by virtue of its status as an intergovernmental organisation nor # does it submit to any jurisdiction. -#! /usr/bin/env python +#! /usr/bin/env python3 -from __future__ import print_function from argparse import ArgumentParser import re import time @@ -50,7 +49,7 @@ 'logical(c_bool)':'c_bool' } -function_signature = re.compile('''^ +function_signature = re.compile(r'''^ ( #1 Type (const\s+)? #2 Leading const ([^\*\&\s\[]+) #3 @@ -72,7 +71,7 @@ def __init__(self,msg): class Argument: - arg_signature = re.compile('''^ + arg_signature = re.compile(r'''^ ( #1 Type (const\s+)? #2 Leading const ([^\*\&\s\[]+) #3 @@ -180,9 +179,6 @@ def __init__(self,line): except KeyError: raise ParsingFailed("Could not parse return type for statement "+line) - def __nonzero__(self): # python 2 - return self.type != "void" - def __bool__(self): # python 3 return self.type != "void" @@ -304,9 +300,9 @@ def statements(self): with open(input,'r') as file: content = file.read() - externC = re.compile('^extern\s+"C"(\s*{)?') + externC = re.compile(r'^extern\s+"C"(\s*{)?') - regex_externC = [re.compile('^extern\s+"C"(\s*{)?'),re.compile('^{')] + regex_externC = [re.compile(r'^extern\s+"C"(\s*{)?'),re.compile('^{')] in_externC = [False,False] for line in content.splitlines():