From 48c9eec890fb9db50aac8bb6046e21c866b89698 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Fri, 6 Dec 2024 11:09:27 -0700 Subject: [PATCH] Init rino when short tests are on The mem tests are no longer guaranteed to have NDEBUG on. We use SCREAM_SHORT_TESTS as a proxy for knowing that mem checking is on. --- components/eamxx/scripts/machines_specs.py | 2 +- .../eamxx/src/physics/shoc/impl/shoc_pblintd_impl.hpp | 6 ++++-- components/eamxx/src/share/scream_types.hpp | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/eamxx/scripts/machines_specs.py b/components/eamxx/scripts/machines_specs.py index 13b4bdca4b8d..dbb9363381ce 100644 --- a/components/eamxx/scripts/machines_specs.py +++ b/components/eamxx/scripts/machines_specs.py @@ -124,7 +124,7 @@ def setup_pm(cls,partition): cls.batch += "--time 00:30:00 --nodes=1 -q debug" else: cls.batch += "--time 02:00:00 --nodes=4 --gpus-per-node=4 --gpu-bind=none --exclusive -q regular" - + cls.baselines_dir = f"/global/cfs/cdirs/e3sm/baselines/{compiler}/scream/{cls.name}" ############################################################################### diff --git a/components/eamxx/src/physics/shoc/impl/shoc_pblintd_impl.hpp b/components/eamxx/src/physics/shoc/impl/shoc_pblintd_impl.hpp index 4f7749463da6..9c4cef44d1c9 100644 --- a/components/eamxx/src/physics/shoc/impl/shoc_pblintd_impl.hpp +++ b/components/eamxx/src/physics/shoc/impl/shoc_pblintd_impl.hpp @@ -78,8 +78,10 @@ void Functions::pblintd( // Initialize bool check = true; - // The loop below fixes valgrind uninitialized mem errs -#ifndef NDEBUG + // The loop below fixes valgrind uninitialized mem errs. As in other + // places in eamxx, we use SCREAM_SHORT_TESTS as a proxy for knowing + // mem checking is on. +#if !defined(NDEBUG) || defined(SCREAM_SHORT_TESTS) for (size_t i=0; i