From 271dd571aee4e1fb975f49682f1fdb648e1c443c Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Tue, 28 Feb 2023 10:15:23 -0300 Subject: [PATCH 1/2] FORCING: Reset forcing statistics if there is no driving. Signed-off-by: Grzegorz Kowal --- sources/forcing.F90 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sources/forcing.F90 b/sources/forcing.F90 index af248b5..2a9f53e 100644 --- a/sources/forcing.F90 +++ b/sources/forcing.F90 @@ -995,7 +995,12 @@ module forcing !------------------------------------------------------------------------------- ! - if (t < tinj_start .or. t > tinj_stop) return + if (t < tinj_start .or. t > tinj_stop) then + arms = 0.0d+00 + dinj = 0.0d+00 + rinj = 0.0d+00 + return + end if ! calculate the number of eddies to be injected during this interval ! @@ -1079,7 +1084,12 @@ module forcing !------------------------------------------------------------------------------- ! - if (t < tinj_start .or. t > tinj_stop) return + if (t < tinj_start .or. t > tinj_stop) then + arms = 0.0d+00 + dinj = 0.0d+00 + rinj = 0.0d+00 + return + end if ! calculate drift and diffusion coefficients ! @@ -1166,7 +1176,12 @@ module forcing !------------------------------------------------------------------------------- ! - if (t < tinj_start .or. t > tinj_stop) return + if (t < tinj_start .or. t > tinj_stop) then + arms = 0.0d+00 + dinj = 0.0d+00 + rinj = 0.0d+00 + return + end if ! determine velocify coefficients in Fourier space ! From ebfca7e92c54fb75f842af715560a78895c2b931 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Sat, 1 Apr 2023 23:25:03 -0300 Subject: [PATCH 2/2] CMAKE: Remove host cpu tuning options. It help with cross compilation and these flags can be added from the command line, e.g., using cmake -DCMAKE_Fortran_FLAGS="-march=native". Signed-off-by: Grzegorz Kowal --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de7f1c7..2880d74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,13 +19,13 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif() if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") - add_compile_options("$<$:-march=native;-pipe;-fno-tree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always>") + add_compile_options("$<$:-pipe;-fno-tree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always>") add_compile_options("$<$:-Og;-pedantic;-fcheck=all;-W;-Wall;-Wno-unused-dummy-argument>") endif() if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") - add_compile_options("$<$:-xHost;-fp-model=source;-heap-arrays;-ip;-unroll-aggressive;-simd;-qopt-prefetch;-use-intel-optimized-headers;-finline-limit=1000;-fno-omit-frame-pointer>") + add_compile_options("$<$:-fp-model=source;-heap-arrays;-ip;-unroll-aggressive;-simd;-qopt-prefetch;-use-intel-optimized-headers;-finline-limit=1000;-fno-omit-frame-pointer>") add_compile_options("$<$:-O>") - add_compile_options(-assume byterecl) + add_compile_options("-assume byterecl") endif() if(CMAKE_Fortran_COMPILER_ID MATCHES "PGI") add_compile_options("$<$:-fastsse;-O4;-Mvect=simd;-Minline=maxsize:1000>")