From 0583c30c6e1e80019f6891789593637011279296 Mon Sep 17 00:00:00 2001 From: Magdalena Date: Wed, 15 Nov 2023 10:02:55 +0100 Subject: [PATCH 1/2] add class name to cache key (#312) --- model/common/src/icon4py/model/common/grid/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/common/src/icon4py/model/common/grid/utils.py b/model/common/src/icon4py/model/common/grid/utils.py index 664b9ade44..93d024f2ec 100644 --- a/model/common/src/icon4py/model/common/grid/utils.py +++ b/model/common/src/icon4py/model/common/grid/utils.py @@ -30,7 +30,7 @@ class ClassLevelCache: @staticmethod def cache_method(method): def wrapper(self, *args, **kwargs): - key = f"{method.__name__}_{args}_{kwargs}" + key = f"{self.__class__.__name__}_{method.__name__}_{args}_{kwargs}" if key not in ClassLevelCache._cache: ClassLevelCache._cache[key] = method(self, *args, **kwargs) return ClassLevelCache._cache[key] From 9d0614bb9fcd4ef18aeee1d820d2088c52393d66 Mon Sep 17 00:00:00 2001 From: Samuel Date: Fri, 17 Nov 2023 13:30:26 +0100 Subject: [PATCH 2/2] Move to Clariden cluster and fix codegen regex (#316) Move cscs ci to clariden --- ci/cscs.yml | 2 +- tools/tests/icon4pygen/test_codegen.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/cscs.yml b/ci/cscs.yml index f96cdfd770..c5e8666feb 100644 --- a/ci/cscs.yml +++ b/ci/cscs.yml @@ -17,7 +17,7 @@ variables: DOCKERFILE: ci/docker/Dockerfile.build .test_template: - extends: .container-runner-hohgant-a100 + extends: .container-runner-clariden-a100 timeout: 2h image: $PERSIST_IMAGE_NAME before_script: diff --git a/tools/tests/icon4pygen/test_codegen.py b/tools/tests/icon4pygen/test_codegen.py index 8f1fac2275..3d85dfa2e5 100644 --- a/tools/tests/icon4pygen/test_codegen.py +++ b/tools/tests/icon4pygen/test_codegen.py @@ -109,7 +109,7 @@ def check_header_codegen(fname: str) -> None: def check_gridtools_codegen(fname: str) -> None: stencil_name = fname.replace(".hpp", "") - patterns = ["#include <.*>", "using .*;", f"inline auto {stencil_name}"] + patterns = ["#include <.*>", "using .*;", f"inline\\s+auto\\s+{stencil_name}"] check_for_matches(fname, patterns)