From 873be3bf1538f22e392ae7f930b25d57813d3724 Mon Sep 17 00:00:00 2001 From: Sergi Siso Date: Tue, 17 Dec 2024 15:01:02 +0000 Subject: [PATCH] Some more updates for NEMOv5 --- examples/nemo/scripts/omp_cpu_trans.py | 3 +++ examples/nemo/scripts/omp_gpu_trans.py | 8 ++++++++ examples/nemo/scripts/utils.py | 3 +-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/nemo/scripts/omp_cpu_trans.py b/examples/nemo/scripts/omp_cpu_trans.py index 1102455c61..fa48d0ba72 100755 --- a/examples/nemo/scripts/omp_cpu_trans.py +++ b/examples/nemo/scripts/omp_cpu_trans.py @@ -59,6 +59,9 @@ # List of all files that psyclone will skip processing FILES_TO_SKIP = PASSTHROUGH_ISSUES +if PROFILING_ENABLED: + # Fails with profiling enabled. issue #2723 + FILES_TO_SKIP.append("mppini.f90") def trans(psyir): ''' Add OpenMP Parallel and Do directives to all loops, including the diff --git a/examples/nemo/scripts/omp_gpu_trans.py b/examples/nemo/scripts/omp_gpu_trans.py index bd6c5d1b55..43edcde10a 100755 --- a/examples/nemo/scripts/omp_gpu_trans.py +++ b/examples/nemo/scripts/omp_gpu_trans.py @@ -81,6 +81,7 @@ # Illegal address during kernel execution "dynzdf.f90", # returned error 700 (CUDA_ERROR_ILLEGAL_ADDRESS) "traatf_qco.f90", # Runtime: Failed to find device function + "lbclnk.f90", # Improve performance until #2751 ] PRIVATISATION_ISSUES = [ @@ -115,6 +116,13 @@ def trans(psyir): for subroutine in psyir.walk(Routine): + # Skip things from the initialisation + if (subroutine.name.endswith('_alloc') or + subroutine.name.endswith('_init') or + subroutine.name.startswith('Agrif') or + subroutine.name == 'dom_msk'): + continue + if PROFILING_ENABLED: add_profiling(subroutine.children) diff --git a/examples/nemo/scripts/utils.py b/examples/nemo/scripts/utils.py index 47dc5352e4..4af0ded032 100755 --- a/examples/nemo/scripts/utils.py +++ b/examples/nemo/scripts/utils.py @@ -64,8 +64,7 @@ ] # If routine names contain these substrings then we do not profile them -PROFILING_IGNORE = ["_init", "_rst", "alloc", "agrif", "flo_dom", - "macho", "mpp_", "nemo_gcm", +PROFILING_IGNORE = ["flo_dom", "macho", "mpp_", "nemo_gcm", # These are small functions that the addition of profiling # prevents from being in-lined (and then breaks any attempt # to create OpenACC regions with calls to them)