From 7370be87501a4841000302c95281ae1a93e64def Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Mon, 31 Mar 2025 09:34:31 -0600 Subject: [PATCH 1/3] EXODUS,IOSS,CI: Remove the BUILT_IN_SIERRA ifdef to help unify cmake/bjam build --- packages/seacas/Jamfile | 10 ++++------ packages/seacas/libraries/exodus/src/ex_conv.c | 6 ++---- packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h | 11 ++++++----- packages/seacas/libraries/ioss/src/Ioss_Map.h | 4 ++-- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/packages/seacas/Jamfile b/packages/seacas/Jamfile index 21e108eef6..9c26f8c4e4 100644 --- a/packages/seacas/Jamfile +++ b/packages/seacas/Jamfile @@ -1,5 +1,5 @@ #--------------------------------------------------------------- -# Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions +# Copyright(C) 1999-2020, 2024, 2025 National Technology & Engineering Solutions # of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with # NTESS, the U.S. Government retains certain rights in this software. # @@ -520,14 +520,12 @@ lib Ioss /tpl/parmetis//parmetis /tpl/fmt//fmt /mpi//mpi - : BUILT_IN_SIERRA + : [ ifuserbuild # Any parameters within this 'ifuserbuild' block apply to user # builds only and will not be present for developer builds. $(seacas-root)/lib/libIoss.a ] - : - : BUILT_IN_SIERRA ; lib Iotr @@ -615,7 +613,7 @@ lib exodus [ glob $(seacas-root)/libraries/exodus/src/deprecated/*.c ] ] /tpl/netcdf-c//netcdf - : BUILT_IN_SIERRA + : EXODUS_RELAXED_MULTIPLE_OPEN_CHECK [ ifdevbuild # Any parameters within this 'ifdevbuild' block apply to development # builds only and will not be present for user builds. @@ -628,7 +626,7 @@ lib exodus $(sierra-root)/seacas/lib/libexodus.a ] : - : BUILT_IN_SIERRA + : EXODUS_RELAXED_MULTIPLE_OPEN_CHECK [ ifdevbuild # Any parameters within this 'ifdevbuild' block apply to development # builds only and will not be present for user builds. diff --git a/packages/seacas/libraries/exodus/src/ex_conv.c b/packages/seacas/libraries/exodus/src/ex_conv.c index d2e21b4ae6..3419c06d3b 100644 --- a/packages/seacas/libraries/exodus/src/ex_conv.c +++ b/packages/seacas/libraries/exodus/src/ex_conv.c @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * Copyright(C) 1999-2021, 2024, 2025 National Technology & Engineering Solutions * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with * NTESS, the U.S. Government retains certain rights in this software. * @@ -60,7 +60,7 @@ int exi_check_multiple_open(const char *path, int mode, const char *func) " File corruption or incorrect behavior can occur.\n", path); ex_err(func, errmsg, EX_BADFILEID); -#if defined BUILT_IN_SIERRA +#if defined(EXODUS_RELAXED_MULTIPLE_OPEN_CHECK) EX_FUNC_LEAVE(EX_NOERR); #else EX_FUNC_LEAVE(EX_FATAL); @@ -78,7 +78,6 @@ int exi_check_valid_file_id(int exoid, const char *func) if (exoid <= 0) { error = true; } -#if !defined BUILT_IN_SIERRA else { int rootid = exoid & EX_FILE_ID_MASK; struct exi_file_item *file = exi_find_file_item(rootid); @@ -87,7 +86,6 @@ int exi_check_valid_file_id(int exoid, const char *func) error = true; } } -#endif if (error) { int old_opt = ex_opts(EX_VERBOSE); diff --git a/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h b/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h index a88d7816b5..62aff92f82 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h +++ b/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2024 National Technology & Engineering Solutions +// Copyright(C) 1999-2025 National Technology & Engineering Solutions // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with // NTESS, the U.S. Government retains certain rights in this software. // @@ -29,8 +29,11 @@ inline std::string IOSS_VECTOR_2D() { return {"vector_2d"}; } inline std::string IOSS_VECTOR_3D() { return {"vector_3d"}; } inline std::string IOSS_SYM_TENSOR() { return {"sym_tensor_33"}; } -#if defined(BUILT_IN_SIERRA) -#define MAP_USE_SORTED_VECTOR +#if __has_include("SEACASIoss_config.h") ++// This is a CMake build +#include "SEACASIoss_config.h" +#else ++// This is not a CMake build #define SEACAS_HAVE_MPI /* #undef IOSS_THREADSAFE */ /* #undef SEACAS_HAVE_KOKKOS */ @@ -39,8 +42,6 @@ inline std::string IOSS_SYM_TENSOR() { return {"sym_tensor_33"}; } #define SEACAS_HAVE_CGNS /* #undef SEACAS_HAVE_FAODEL */ #define SEACAS_HAVE_PAMGEN -#else -#include "SEACASIoss_config.h" #endif #if defined(IOSS_THREADSAFE) diff --git a/packages/seacas/libraries/ioss/src/Ioss_Map.h b/packages/seacas/libraries/ioss/src/Ioss_Map.h index 65d2e781fa..2a16895487 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Map.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Map.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024, 2025 National Technology & Engineering Solutions // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with // NTESS, the U.S. Government retains certain rights in this software. // @@ -15,7 +15,7 @@ #include "ioss_export.h" -#define MAP_USE_STD +#define MAP_USE_SORTED_VECTOR #if defined MAP_USE_STD #include #elif defined MAP_USE_HOPSCOTCH From d838c104db4669c359f9211886a812ddf77131fc Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Mon, 31 Mar 2025 09:41:18 -0600 Subject: [PATCH 2/3] Fix typos --- packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h b/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h index 62aff92f82..13e19b485f 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h +++ b/packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h @@ -30,10 +30,10 @@ inline std::string IOSS_VECTOR_3D() { return {"vector_3d"}; } inline std::string IOSS_SYM_TENSOR() { return {"sym_tensor_33"}; } #if __has_include("SEACASIoss_config.h") -+// This is a CMake build +// This is a CMake build #include "SEACASIoss_config.h" #else -+// This is not a CMake build +// This is not a CMake build #define SEACAS_HAVE_MPI /* #undef IOSS_THREADSAFE */ /* #undef SEACAS_HAVE_KOKKOS */ From c5d4575cbec2ff9d56ce928dbf7ab245d6426596 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:42:29 +0000 Subject: [PATCH 3/3] Committing clang-format changes --- packages/seacas/libraries/aprepro_lib/strings.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/seacas/libraries/aprepro_lib/strings.cc b/packages/seacas/libraries/aprepro_lib/strings.cc index c9bafdfec4..737e032f5c 100644 --- a/packages/seacas/libraries/aprepro_lib/strings.cc +++ b/packages/seacas/libraries/aprepro_lib/strings.cc @@ -62,10 +62,8 @@ std::vector build_strings() strings.emplace_back(R"({cd = tand(180/4)} {180-4*atand(cd)} $ tan(180/4))"); strings.emplace_back(R"()"); strings.emplace_back(R"(Test max, min, sign, dim, abs)"); - strings.emplace_back( - R"({pmin = min(0.5, 1.0)} {nmin = min(-0.5, -1.0)} $ Should be 0.5, -1)"); - strings.emplace_back( - R"({pmax = max(0.5, 1.0)} {nmax = max(-0.5, -1.0)} $ Should be 1.0, -0.5)"); + strings.emplace_back(R"({pmin = min(0.5, 1.0)} {nmin = min(-0.5, -1.0)} $ Should be 0.5, -1)"); + strings.emplace_back(R"({pmax = max(0.5, 1.0)} {nmax = max(-0.5, -1.0)} $ Should be 1.0, -0.5)"); strings.emplace_back(R"({zero = 0} {sign(0.5, zero) + sign(0.5, -zero)} $ Should be 0 1)"); strings.emplace_back( R"({nonzero = 1} {sign(0.5, nonzero) + sign(0.5, -nonzero)} $ Should be 1 0)");