From 5a8599ba8c7a18ab9aa089232ec134b1814f5558 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto <38361926+castelletto1@users.noreply.github.com> Date: Wed, 22 Oct 2025 13:08:30 -0700 Subject: [PATCH 01/30] Missed std::map --- src/coreComponents/mesh/MeshObjectPath.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/mesh/MeshObjectPath.hpp b/src/coreComponents/mesh/MeshObjectPath.hpp index 0c8d5f2b5f7..704ce03c41f 100644 --- a/src/coreComponents/mesh/MeshObjectPath.hpp +++ b/src/coreComponents/mesh/MeshObjectPath.hpp @@ -60,7 +60,7 @@ class MeshObjectPath /// @brief alias for the map allowing to know the existance of given element types (node, edge, cell...) /// with localIndex = 0 | 1 ( exist / not existing) - using SetNameToTypesMap = std::map< std::string, std::map< MeshObjectPath::ObjectTypes, localIndex > >; + using SetNameToTypesMap = stdMap< string, stdMap< MeshObjectPath::ObjectTypes, localIndex > >; /** * @brief Construct a new Mesh Object Path object From a122adab761f1c0878c32c5eb78a4ee36f4cfaf2 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto <38361926+castelletto1@users.noreply.github.com> Date: Wed, 22 Oct 2025 15:24:57 -0700 Subject: [PATCH 02/30] Ensuring bounds-checking --- .../fieldSpecification/FieldSpecificationManager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp index 8d72026fcea..12eeaca5173 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp @@ -89,7 +89,7 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c for( size_t i = 0; i < setNames.size(); ++i ) { isTargetSetCreated[setNames[i]] = 0; - setTypesMap[setNames[i]][targetElementType] = 1; + setTypesMap.get_inserted(setNames[i]).get_inserted(targetElementType) = 1; } // We have to make sure that the meshLevel is in the target of the boundary conditions @@ -129,7 +129,9 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c } if( targetSet.size() > 0 ) - setTypesMap[setName][targetElementType] = 0; + { + setTypesMap.get_inserted(setNames).get_inserted(targetElementType) = 0; + } } ); // Step 3: MPI synchronization @@ -216,7 +218,7 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c NodeManager >( mesh, setName, [&setTypesMap]( MeshObjectPath::ObjectTypes managerType, string const & capturedSetName ){ - setTypesMap[capturedSetName][managerType] = 0; + setTypesMap.get_inserted(capturedSetName).get_inserted(managerType) = 0; } ); string_array capturedTypes; for( auto const & [element, isExisting] : elementsType ) From ca6c5484a7d27ce7332bbe19f7fcd418a6aa66a5 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Wed, 22 Oct 2025 15:32:05 -0700 Subject: [PATCH 03/30] Uncrustifying --- .../fieldSpecification/FieldSpecificationManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp index 12eeaca5173..6d1c80a72f5 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp @@ -89,7 +89,7 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c for( size_t i = 0; i < setNames.size(); ++i ) { isTargetSetCreated[setNames[i]] = 0; - setTypesMap.get_inserted(setNames[i]).get_inserted(targetElementType) = 1; + setTypesMap.get_inserted( setNames[i] ).get_inserted( targetElementType ) = 1; } // We have to make sure that the meshLevel is in the target of the boundary conditions @@ -130,7 +130,7 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c if( targetSet.size() > 0 ) { - setTypesMap.get_inserted(setNames).get_inserted(targetElementType) = 0; + setTypesMap.get_inserted( setNames ).get_inserted( targetElementType ) = 0; } } ); @@ -218,7 +218,7 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c NodeManager >( mesh, setName, [&setTypesMap]( MeshObjectPath::ObjectTypes managerType, string const & capturedSetName ){ - setTypesMap.get_inserted(capturedSetName).get_inserted(managerType) = 0; + setTypesMap.get_inserted( capturedSetName ).get_inserted( managerType ) = 0; } ); string_array capturedTypes; for( auto const & [element, isExisting] : elementsType ) From c567601cf542634e6b49d11125d0197e4272ec37 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Wed, 22 Oct 2025 15:45:58 -0700 Subject: [PATCH 04/30] Typo --- .../fieldSpecification/FieldSpecificationManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp index 6d1c80a72f5..9649d343d8d 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp @@ -130,7 +130,8 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c if( targetSet.size() > 0 ) { - setTypesMap.get_inserted( setNames ).get_inserted( targetElementType ) = 0; + // Use the single set name provided by the callback (setName), not the outer array (setNames) + setTypesMap.get_inserted( setName ).get_inserted( targetElementType ) = 0; } } ); From 9c3b5b2e29cb1031698582163900164ad15912c9 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto <38361926+castelletto1@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:54:40 -0700 Subject: [PATCH 05/30] Update src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp Co-authored-by: MelReyCG <122801580+MelReyCG@users.noreply.github.com> --- .../fieldSpecification/FieldSpecificationManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp index 9649d343d8d..8ecafa4e0aa 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp @@ -88,7 +88,7 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c string_array const & setNames = fs.getSetNames(); for( size_t i = 0; i < setNames.size(); ++i ) { - isTargetSetCreated[setNames[i]] = 0; + isTargetSetCreated.get_inserted( setNames[i] ) = 0; setTypesMap.get_inserted( setNames[i] ).get_inserted( targetElementType ) = 1; } From 85a3b78954e2677e08804b6a5c95949a22653fc6 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto <38361926+castelletto1@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:57:30 -0700 Subject: [PATCH 06/30] Replacing map with stdMap --- .../fieldSpecification/FieldSpecificationManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp index 8ecafa4e0aa..f725a44fafd 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp @@ -77,7 +77,7 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c { localIndex isFieldNameFound = 0; // map from set name to a flag (1 if targetSet has been created, 0 otherwise) - map< string, localIndex > isTargetSetCreated; + stdMap< string, localIndex > isTargetSetCreated; MeshObjectPath::SetNameToTypesMap setTypesMap; // The fieldSpecification target objectType MeshObjectPath::ObjectTypes const targetElementType = fs.getMeshObjectPaths().getObjectType(); From 80aca51171183dc6da89fd05900684f7503aac22 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 23 Oct 2025 14:09:16 -0700 Subject: [PATCH 07/30] add manualdockerimage.bash --- scripts/manualdockerimage.bash | 66 ++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 scripts/manualdockerimage.bash diff --git a/scripts/manualdockerimage.bash b/scripts/manualdockerimage.bash new file mode 100644 index 00000000000..c78159a279c --- /dev/null +++ b/scripts/manualdockerimage.bash @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +set -euo pipefail + +# --------- CONFIG (edit or pass as env vars) ----------------- +: "${APP_IMAGE_REPO:=geosx/geosx_ubuntu22.04-clang15}" # Docker Hub repo to push to +: "${GIT_URL:=git@github.com:GEOS-DEV/GEOS.git}" # SSH repo URL +: "${GIT_REF:=stdMap}" # branch/tag/sha (optional; will try to checkout) +: "${BASE_IMAGE:=geosx/ubuntu22.04-clang15:320-766}" # TPL image to build in +: "${CMAKE_BUILD_TYPE:=Release}" +: "${HOSTCFG:=/spack-generated.cmake}" +: "${ENABLE_HYPRE:=ON}" +: "${ENABLE_TRILINOS:=OFF}" +: "${GEOS_ENABLE_BOUNDS_CHECK:=OFF}" +: "${PLATFORM:=}" # e.g. set to linux/amd64 on Apple Silicon +# ------------------------------------------------------------- + +# sanity: need an ssh-agent socket to forward +if [[ -z "${SSH_AUTH_SOCK:-}" || ! -S "$SSH_AUTH_SOCK" ]]; then + echo "ERROR: SSH_AUTH_SOCK not set or not a socket. Run: eval \"\$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519" >&2 + exit 1 +fi + +NAME="geosx_build_$(date +%s)" + +echo "Base image: ${BASE_IMAGE}" +echo "Repo URL: ${GIT_URL}" +echo "Git ref: ${GIT_REF}" +echo "Output registry: ${APP_IMAGE_REPO}" + +docker rm -f "$NAME" >/dev/null 2>&1 || true +docker run -it ${PLATFORM:+--platform="${PLATFORM}"} --name "$NAME" --cap-add=SYS_PTRACE \ + -v "$SSH_AUTH_SOCK:/ssh-agent" -e SSH_AUTH_SOCK=/ssh-agent \ + -e ENABLE_HYPRE="${ENABLE_HYPRE}" \ + -e ENABLE_TRILINOS="${ENABLE_TRILINOS}" \ + -e GEOS_BUILD_SHARED_LIBS=ON \ + --volume /Users/settgast1/Codes/geos/GEOS_Develop:/src/geosx \ + "$BASE_IMAGE" + + + + # # Build & install using your existing CI script + /src/geosx/scripts/ci_build_and_test_in_container.sh --repository /src/geosx --cmake-build-type Release --host-config /spack-generated.cmake --enable-hypre ${ENABLE_HYPRE} --enable-trilinos ${ENABLE_TRILINOS} --geos-enable-bounds-check ${GEOS_ENABLE_BOUNDS_CHECK} --install-dir-basename geosx-install --no-run-unit-tests --nproc 4 --ninja + + # # Hygiene: drop git metadata so creds aren't baked into the committed image + # rm -rf /src/geosx/.git /src/geosx/.gitmodules || true + # " + +# # Grab the short sha that the container wrote +# docker cp "$NAME":/tmp/shortsha ./shortsha || true +# if [ -s ./shortsha ]; then +# SHORT_SHA="$(cat ./shortsha)" +# else +# # Fallback if file missing: use the ref or container ID tail +# SHORT_SHA="${GIT_REF:-$(docker inspect --format='{{.Id}}' "$NAME" | cut -c1-7)}" +# fi +# rm -f ./shortsha + +# TAG="${APP_IMAGE_REPO}:${SHORT_SHA}" + +# echo "Logging into Docker Hub to push ${TAG} ..." +# docker login +# docker commit --change='ENTRYPOINT []' --change='CMD ["/bin/bash"]' "$NAME" "$TAG" +# docker push "$TAG" +# docker rm "$NAME" || true + +# echo "Pushed ${TAG}" From e71545056ae6a92efa8bfe52748cde68c226ca30 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 23 Oct 2025 14:26:33 -0700 Subject: [PATCH 08/30] script changes --- scripts/manualdockerimage.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manualdockerimage.bash b/scripts/manualdockerimage.bash index c78159a279c..59bb87fe2a3 100644 --- a/scripts/manualdockerimage.bash +++ b/scripts/manualdockerimage.bash @@ -39,7 +39,7 @@ docker run -it ${PLATFORM:+--platform="${PLATFORM}"} --name "$NAME" --cap-add=SY # # Build & install using your existing CI script - /src/geosx/scripts/ci_build_and_test_in_container.sh --repository /src/geosx --cmake-build-type Release --host-config /spack-generated.cmake --enable-hypre ${ENABLE_HYPRE} --enable-trilinos ${ENABLE_TRILINOS} --geos-enable-bounds-check ${GEOS_ENABLE_BOUNDS_CHECK} --install-dir-basename geosx-install --no-run-unit-tests --nproc 4 --ninja + /src/geosx/scripts/ci_build_and_test_in_container.sh --repository /src/geosx --cmake-build-type Release --host-config /spack-generated.cmake --enable-hypre ON --enable-trilinos OFF --geos-enable-bounds-check OFF --install-dir-basename geosx-install --no-run-unit-tests --nproc 4 --ninja # # Hygiene: drop git metadata so creds aren't baked into the committed image # rm -rf /src/geosx/.git /src/geosx/.gitmodules || true From 8536c63396a92c7e6ef12aee7d1835ec0a003d47 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 17:18:36 -0700 Subject: [PATCH 09/30] WIP --- src/coreComponents/schema/schemaUtilities.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index d39b1af77f3..ef9be84e226 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -120,6 +120,12 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) auto const regexes = rtTypes::createBasicTypesRegexMap(); for( auto const & [typeName, regex] : regexes ) { + /////////////// + // Debug output to screen + std::cout << "Type name: " << typeName + << ", Regex: " << regex.m_regexStr + << std::endl; + /////////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From acba066c8e73be6038654f55fad99b1ad580b1a8 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 17:26:29 -0700 Subject: [PATCH 10/30] WIP --- .github/workflows/ci_tests.yml | 122 +++++++++--------- src/coreComponents/schema/schemaUtilities.cpp | 6 - 2 files changed, 61 insertions(+), 67 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index e1e7506540f..f0a762c2587 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -147,62 +147,62 @@ jobs: fail-fast : false matrix: include: - - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 - BUILD_SHARED_LIBS: ON - ENABLE_HYPRE: OFF - ENABLE_TRILINOS: ON - GEOS_ENABLE_BOUNDS_CHECK: ON - HOST_CONFIG: /spack-generated.cmake + # - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 + # BUILD_SHARED_LIBS: ON + # ENABLE_HYPRE: OFF + # ENABLE_TRILINOS: ON + # GEOS_ENABLE_BOUNDS_CHECK: ON + # HOST_CONFIG: /spack-generated.cmake - - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - CMAKE_BUILD_TYPE: Debug - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - BUILD_SHARED_LIBS: ON - ENABLE_HYPRE: OFF - ENABLE_TRILINOS: ON - GEOS_ENABLE_BOUNDS_CHECK: ON - HOST_CONFIG: /spack-generated.cmake + # - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces + # CMAKE_BUILD_TYPE: Debug + # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + # BUILD_SHARED_LIBS: ON + # ENABLE_HYPRE: OFF + # ENABLE_TRILINOS: ON + # GEOS_ENABLE_BOUNDS_CHECK: ON + # HOST_CONFIG: /spack-generated.cmake - - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - BUILD_SHARED_LIBS: ON - ENABLE_HYPRE: OFF - ENABLE_TRILINOS: ON - GEOS_ENABLE_BOUNDS_CHECK: ON - HOST_CONFIG: /spack-generated.cmake + # - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + # BUILD_SHARED_LIBS: ON + # ENABLE_HYPRE: OFF + # ENABLE_TRILINOS: ON + # GEOS_ENABLE_BOUNDS_CHECK: ON + # HOST_CONFIG: /spack-generated.cmake - - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 - ENABLE_HYPRE: ON - ENABLE_TRILINOS: OFF - BUILD_SHARED_LIBS: ON - GEOS_ENABLE_BOUNDS_CHECK: OFF - GCP_BUCKET: geosx/ubuntu22.04-gcc11 - HOST_CONFIG: /spack-generated.cmake + # - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 + # ENABLE_HYPRE: ON + # ENABLE_TRILINOS: OFF + # BUILD_SHARED_LIBS: ON + # GEOS_ENABLE_BOUNDS_CHECK: OFF + # GCP_BUCKET: geosx/ubuntu22.04-gcc11 + # HOST_CONFIG: /spack-generated.cmake - - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 - GCP_BUCKET: geosx/ubuntu22.04-gcc12 - ENABLE_HYPRE: ON - ENABLE_TRILINOS: OFF - BUILD_SHARED_LIBS: ON - GEOS_ENABLE_BOUNDS_CHECK: ON - HOST_CONFIG: /spack-generated.cmake + # - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 + # GCP_BUCKET: geosx/ubuntu22.04-gcc12 + # ENABLE_HYPRE: ON + # ENABLE_TRILINOS: OFF + # BUILD_SHARED_LIBS: ON + # GEOS_ENABLE_BOUNDS_CHECK: ON + # HOST_CONFIG: /spack-generated.cmake - - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - NO BOUNDS CHECK - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 - GCP_BUCKET: geosx/ubuntu22.04-gcc12 - ENABLE_HYPRE: ON - ENABLE_TRILINOS: OFF - BUILD_SHARED_LIBS: ON - GEOS_ENABLE_BOUNDS_CHECK: OFF - HOST_CONFIG: /spack-generated.cmake + # - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - NO BOUNDS CHECK + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 + # GCP_BUCKET: geosx/ubuntu22.04-gcc12 + # ENABLE_HYPRE: ON + # ENABLE_TRILINOS: OFF + # BUILD_SHARED_LIBS: ON + # GEOS_ENABLE_BOUNDS_CHECK: OFF + # HOST_CONFIG: /spack-generated.cmake - name: Ubuntu (22.04, clang 15.0.7, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release @@ -213,16 +213,16 @@ jobs: BUILD_SHARED_LIBS: ON HOST_CONFIG: /spack-generated.cmake - - name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10) - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11 - ENABLE_HYPRE: ON - ENABLE_TRILINOS: OFF - GEOS_ENABLE_BOUNDS_CHECK: OFF - GCP_BUCKET: geosx/Sherlock-CPU - HOST_CONFIG: /spack-generated.cmake -# HOST_CONFIG: host-configs/Stanford/sherlock-gcc10.cmake - BUILD_SHARED_LIBS: ON +# - name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10) +# CMAKE_BUILD_TYPE: Release +# DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11 +# ENABLE_HYPRE: ON +# ENABLE_TRILINOS: OFF +# GEOS_ENABLE_BOUNDS_CHECK: OFF +# GCP_BUCKET: geosx/Sherlock-CPU +# HOST_CONFIG: /spack-generated.cmake +# # HOST_CONFIG: host-configs/Stanford/sherlock-gcc10.cmake +# BUILD_SHARED_LIBS: ON uses: ./.github/workflows/build_and_test.yml with: diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index ef9be84e226..d39b1af77f3 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -120,12 +120,6 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) auto const regexes = rtTypes::createBasicTypesRegexMap(); for( auto const & [typeName, regex] : regexes ) { - /////////////// - // Debug output to screen - std::cout << "Type name: " << typeName - << ", Regex: " << regex.m_regexStr - << std::endl; - /////////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From f57b83c53e46bf1e0c4160f98d86e59a174977e5 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 17:30:03 -0700 Subject: [PATCH 11/30] WIP --- src/coreComponents/schema/schemaUtilities.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index d39b1af77f3..8d4f3617cd8 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -120,6 +120,9 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) auto const regexes = rtTypes::createBasicTypesRegexMap(); for( auto const & [typeName, regex] : regexes ) { + // Debug output to screen + std::cout << "Type name: " << typeName << std::endl; + /////////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From 85bdcf1a762190b69371f060f052af629fc3493c Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 17:53:59 -0700 Subject: [PATCH 12/30] WIP --- src/coreComponents/schema/schemaUtilities.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index 8d4f3617cd8..aaf218591b7 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -116,13 +116,25 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, } void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) +{ + auto const regexes = rtTypes::createBasicTypesRegex Map(); + + #include // for std::cout + +void BuildSimpleSchemaTypes(xmlWrapper::xmlNode schemaRoot) { auto const regexes = rtTypes::createBasicTypesRegexMap(); + + // --- Debug: print all type names before entering the main loop --- + std::cout << "Type names in regexes:" << std::endl; + for (auto const & [typeName, _] : regexes) + { + std::cout << " " << typeName << std::endl; + } + std::cout << std::endl; // extra blank line for readability + for( auto const & [typeName, regex] : regexes ) { - // Debug output to screen - std::cout << "Type name: " << typeName << std::endl; - /////////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From e68288b8c739b65cb3f3034a19aca0099625db08 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 17:58:59 -0700 Subject: [PATCH 13/30] WIP --- src/coreComponents/schema/schemaUtilities.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index aaf218591b7..28360fe8a01 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -115,12 +115,6 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, } } -void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) -{ - auto const regexes = rtTypes::createBasicTypesRegex Map(); - - #include // for std::cout - void BuildSimpleSchemaTypes(xmlWrapper::xmlNode schemaRoot) { auto const regexes = rtTypes::createBasicTypesRegexMap(); From acfb92a50442ce280750e8a37a6f5e0d9440afa3 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 18:07:06 -0700 Subject: [PATCH 14/30] WIP --- src/coreComponents/schema/schema.xsd.other | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index 07172d74346..27c6a58ac7e 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -516,7 +516,7 @@ - + @@ -1502,7 +1502,7 @@ - + From 6bef9a86587b9e2d46ee5a0cf372ddc04d3de1dc Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 22:36:24 -0700 Subject: [PATCH 15/30] WIP --- src/coreComponents/schema/schemaUtilities.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index 28360fe8a01..b1c5b98a009 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -125,10 +125,15 @@ void BuildSimpleSchemaTypes(xmlWrapper::xmlNode schemaRoot) { std::cout << " " << typeName << std::endl; } - std::cout << std::endl; // extra blank line for readability + std::cout << "**********************" << std::endl; + std::cout << "**********************" << std::endl; + // --------------------- for( auto const & [typeName, regex] : regexes ) { + //////////// + std::cout << " " << typeName << std::endl; + //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From 37faf19404be415a8990af4e2405fcbf93ccb44b Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 22:44:06 -0700 Subject: [PATCH 16/30] WIP --- src/coreComponents/schema/schemaUtilities.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index b1c5b98a009..c494f34dee3 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -102,6 +102,10 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, restrictionNode.append_attribute( "base" ) = "xsd:string"; xmlWrapper::xmlNode patternNode = restrictionNode.append_child( "xsd:pattern" ); + /////////// + std::cout << "Appending simple type: " << name << " with regex: " << regex << std::endl; + /////////// + // Handle the default regex if( regex.empty() ) { From d1713ec12e01c90f254a215e21af14e94f0d829e Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Thu, 23 Oct 2025 22:51:46 -0700 Subject: [PATCH 17/30] WIP --- src/coreComponents/schema/schemaUtilities.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index c494f34dee3..d912f53a9a1 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -94,6 +94,10 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, string const & name, string const & regex ) { + + /////////// + std::cout << "In AppendSimpleType" << std::endl; + /////////// string const advanced_match_string = ".*[\\[\\]`$].*|"; xmlWrapper::xmlNode newNode = schemaRoot.append_child( "xsd:simpleType" ); From db9bb969a5505e341f491a22fb97423ab7739a8d Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 00:28:20 -0700 Subject: [PATCH 18/30] Trying again --- src/coreComponents/schema/schemaUtilities.cpp | 105 +++++++++++++----- 1 file changed, 79 insertions(+), 26 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index d912f53a9a1..a974a431883 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -90,37 +90,90 @@ string getSchemaTypeName( string_view rtTypeName ) return xmlSafeName; } -void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, - string const & name, - string const & regex ) +// void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, +// string const & name, +// string const & regex ) +// { + +// /////////// +// std::cout << "In AppendSimpleType" << std::endl; +// /////////// +// string const advanced_match_string = ".*[\\[\\]`$].*|"; + +// xmlWrapper::xmlNode newNode = schemaRoot.append_child( "xsd:simpleType" ); +// newNode.append_attribute( "name" ) = name.c_str(); +// xmlWrapper::xmlNode restrictionNode = newNode.append_child( "xsd:restriction" ); +// restrictionNode.append_attribute( "base" ) = "xsd:string"; +// xmlWrapper::xmlNode patternNode = restrictionNode.append_child( "xsd:pattern" ); + +// /////////// +// std::cout << "Appending simple type: " << name << " with regex: " << regex << std::endl; +// /////////// + +// // Handle the default regex +// if( regex.empty() ) +// { +// GEOS_WARNING( "schema regex not defined for " << name ); +// patternNode.append_attribute( "value" ) = "(?s).*"; +// } +// else +// { +// string const patternString = advanced_match_string + regex; +// patternNode.append_attribute( "value" ) = patternString.c_str(); +// } +// } + +void AppendSimpleType(xmlWrapper::xmlNode & schemaRoot, + const std::string & name, + const std::string & regex) { + const std::string advanced_match_string = ".*[\\[\\]`$].*|"; - /////////// - std::cout << "In AppendSimpleType" << std::endl; - /////////// - string const advanced_match_string = ".*[\\[\\]`$].*|"; + // Create simpleType node + xmlWrapper::xmlNode newNode = schemaRoot.append_child("xsd:simpleType"); + if (!newNode) + { + GEOS_ERROR("Failed to create xsd:simpleType node for " << name); + return; + } + newNode.append_attribute("name") = name.c_str(); - xmlWrapper::xmlNode newNode = schemaRoot.append_child( "xsd:simpleType" ); - newNode.append_attribute( "name" ) = name.c_str(); - xmlWrapper::xmlNode restrictionNode = newNode.append_child( "xsd:restriction" ); - restrictionNode.append_attribute( "base" ) = "xsd:string"; - xmlWrapper::xmlNode patternNode = restrictionNode.append_child( "xsd:pattern" ); + // Create restriction node + xmlWrapper::xmlNode restrictionNode = newNode.append_child("xsd:restriction"); + if (!restrictionNode) + { + GEOS_ERROR("Failed to create xsd:restriction node for " << name); + return; + } + restrictionNode.append_attribute("base") = "xsd:string"; - /////////// - std::cout << "Appending simple type: " << name << " with regex: " << regex << std::endl; - /////////// + // Create pattern node + xmlWrapper::xmlNode patternNode = restrictionNode.append_child("xsd:pattern"); + if (!patternNode) + { + GEOS_ERROR("Failed to create xsd:pattern node for " << name); + return; + } - // Handle the default regex - if( regex.empty() ) - { - GEOS_WARNING( "schema regex not defined for " << name ); - patternNode.append_attribute( "value" ) = "(?s).*"; - } - else - { - string const patternString = advanced_match_string + regex; - patternNode.append_attribute( "value" ) = patternString.c_str(); - } + // Determine pattern string + std::string patternString; + if (regex.empty()) + { + GEOS_WARNING("schema regex not defined for " << name); + patternString = "(?s).*"; + } + else + { + patternString = advanced_match_string + regex; + } + + // Debug print + std::cout << "Appending simple type: " << name + << " with pattern: " << patternString << std::endl; + + // Assign pattern safely + // Make sure to use set_value() or overload that copies string + patternNode.append_attribute("value").set_value(patternString.c_str()); } void BuildSimpleSchemaTypes(xmlWrapper::xmlNode schemaRoot) From aae31641200bf945317d0af8e6846b7e2f29215d Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 01:01:52 -0700 Subject: [PATCH 19/30] Again --- src/coreComponents/schema/schemaUtilities.cpp | 87 ++++++------------- 1 file changed, 28 insertions(+), 59 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index a974a431883..e30717ef80a 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -123,78 +123,47 @@ string getSchemaTypeName( string_view rtTypeName ) // } // } -void AppendSimpleType(xmlWrapper::xmlNode & schemaRoot, - const std::string & name, - const std::string & regex) +void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, + string const & name, + string const & regex ) { - const std::string advanced_match_string = ".*[\\[\\]`$].*|"; + const std::string advanced_match_string = ".*[\\[\\]`$].*|"; - // Create simpleType node - xmlWrapper::xmlNode newNode = schemaRoot.append_child("xsd:simpleType"); - if (!newNode) - { - GEOS_ERROR("Failed to create xsd:simpleType node for " << name); - return; - } - newNode.append_attribute("name") = name.c_str(); + // Create simpleType node + xmlWrapper::xmlNode newNode = schemaRoot.append_child( "xsd:simpleType" ); + GEOS_ERROR_IF( ( !newNode ), GEOS_FMT( "Failed to create xsd:simpleType node for {}", name ) ); + newNode.append_attribute( "name" ) = name.c_str(); - // Create restriction node - xmlWrapper::xmlNode restrictionNode = newNode.append_child("xsd:restriction"); - if (!restrictionNode) - { - GEOS_ERROR("Failed to create xsd:restriction node for " << name); - return; - } - restrictionNode.append_attribute("base") = "xsd:string"; + // Create restriction node + xmlWrapper::xmlNode restrictionNode = newNode.append_child( "xsd:restriction" ); + GEOS_ERROR_IF( ( !restrictionNode ), GEOS_FMT( "Failed to create xsd:restriction node for {}", name ) ); + restrictionNode.append_attribute( "base" ) = "xsd:string"; - // Create pattern node - xmlWrapper::xmlNode patternNode = restrictionNode.append_child("xsd:pattern"); - if (!patternNode) - { - GEOS_ERROR("Failed to create xsd:pattern node for " << name); - return; - } - - // Determine pattern string - std::string patternString; - if (regex.empty()) - { - GEOS_WARNING("schema regex not defined for " << name); - patternString = "(?s).*"; - } - else - { - patternString = advanced_match_string + regex; - } + // Create pattern node + xmlWrapper::xmlNode patternNode = restrictionNode.append_child( "xsd:pattern" ); + GEOS_ERROR_IF( ( !patternNode ), GEOS_FMT( "Failed to create xsd:pattern node for {}", name ) ); - // Debug print - std::cout << "Appending simple type: " << name - << " with pattern: " << patternString << std::endl; + // Determine pattern string + string patternString; + if( regex.empty() ) + { + GEOS_WARNING( GEOS_FMT( "schema regex not defined for {}", name ) ); + patternString = "(?s).*"; + } + else + { + patternString = advanced_match_string + regex; + } - // Assign pattern safely - // Make sure to use set_value() or overload that copies string - patternNode.append_attribute("value").set_value(patternString.c_str()); + patternNode.append_attribute( "value" ).set_value( patternString.c_str()); } -void BuildSimpleSchemaTypes(xmlWrapper::xmlNode schemaRoot) +void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) { auto const regexes = rtTypes::createBasicTypesRegexMap(); - // --- Debug: print all type names before entering the main loop --- - std::cout << "Type names in regexes:" << std::endl; - for (auto const & [typeName, _] : regexes) - { - std::cout << " " << typeName << std::endl; - } - std::cout << "**********************" << std::endl; - std::cout << "**********************" << std::endl; - // --------------------- - for( auto const & [typeName, regex] : regexes ) { - //////////// - std::cout << " " << typeName << std::endl; - //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From da30a4b46f1f4f73b69fc87d4f16ad1ac9ca47ae Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 01:15:30 -0700 Subject: [PATCH 20/30] Again --- src/coreComponents/schema/schemaUtilities.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index e30717ef80a..3d4e809e285 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -127,7 +127,7 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, string const & name, string const & regex ) { - const std::string advanced_match_string = ".*[\\[\\]`$].*|"; + string const advanced_match_string = ".*[\\[\\]`$].*|"; // Create simpleType node xmlWrapper::xmlNode newNode = schemaRoot.append_child( "xsd:simpleType" ); @@ -155,6 +155,8 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, patternString = advanced_match_string + regex; } + std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; + patternNode.append_attribute( "value" ).set_value( patternString.c_str()); } From fb74a0163ae87635e4c8e7182b9c20ae398dceca Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 01:30:34 -0700 Subject: [PATCH 21/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index 3d4e809e285..bad71ba0d81 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -157,15 +157,27 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; - patternNode.append_attribute( "value" ).set_value( patternString.c_str()); + patternNode.append_attribute( "value" ).set_value( patternString );//.c_str()); } void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) { auto const regexes = rtTypes::createBasicTypesRegexMap(); + // // --- Debug: print all type names before entering the main loop --- + // std::cout << "Type names in regexes:" << std::endl; + // for( auto const & [typeName, _] : regexes ) + // { + // std::cout << " " << typeName << std::endl; + // } + // std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; + // // ------------------------------------------------------------------------------------ + for( auto const & [typeName, regex] : regexes ) { + // //////////// + // std::cout << " " << typeName << std::endl; + // //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From ecc19e280a9d2292d831a72a15e19d5ed1a936a3 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 01:34:14 -0700 Subject: [PATCH 22/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index bad71ba0d81..e69d0524c2f 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -157,7 +157,7 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; - patternNode.append_attribute( "value" ).set_value( patternString );//.c_str()); + patternNode.append_attribute( "value" ).set_value( patternString.c_str() ); } void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) From f24eb171757864cd634927454230ee1499afda66 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 01:39:57 -0700 Subject: [PATCH 23/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index e69d0524c2f..fbcff0c0342 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -157,6 +157,7 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; + // Set attribute patternNode.append_attribute( "value" ).set_value( patternString.c_str() ); } @@ -175,9 +176,9 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) for( auto const & [typeName, regex] : regexes ) { - // //////////// - // std::cout << " " << typeName << std::endl; - // //////////// + //////////// + std::cout << " " << typeName << std::endl; + //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From e643333415c60caae0539b4855b3272dc3c230d6 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 01:47:28 -0700 Subject: [PATCH 24/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index fbcff0c0342..cb67f0a368e 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -165,14 +165,14 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) { auto const regexes = rtTypes::createBasicTypesRegexMap(); - // // --- Debug: print all type names before entering the main loop --- - // std::cout << "Type names in regexes:" << std::endl; - // for( auto const & [typeName, _] : regexes ) - // { - // std::cout << " " << typeName << std::endl; - // } - // std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; - // // ------------------------------------------------------------------------------------ + // --- Debug: print all type names before entering the main loop --- + std::cout << "Type names in regexes:" << std::endl; + for( auto const & [typeName, _] : regexes ) + { + std::cout << " " << typeName << std::endl; + } + std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; + // ------------------------------------------------------------------------------------ for( auto const & [typeName, regex] : regexes ) { From 2f351ebc58c5c357dde501cdb5bb55d35c8032f2 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 01:58:47 -0700 Subject: [PATCH 25/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index cb67f0a368e..ac790a04e78 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -165,20 +165,20 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) { auto const regexes = rtTypes::createBasicTypesRegexMap(); - // --- Debug: print all type names before entering the main loop --- - std::cout << "Type names in regexes:" << std::endl; - for( auto const & [typeName, _] : regexes ) - { - std::cout << " " << typeName << std::endl; - } - std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; - // ------------------------------------------------------------------------------------ + // // --- Debug: print all type names before entering the main loop --- + // std::cout << "Type names in regexes:" << std::endl; + // for( auto const & [typeName, _] : regexes ) + // { + // std::cout << " " << typeName << std::endl; + // } + // std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; + // // ------------------------------------------------------------------------------------ for( auto const & [typeName, regex] : regexes ) { - //////////// - std::cout << " " << typeName << std::endl; - //////////// + // //////////// + // std::cout << " " << typeName << std::endl; + // //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From 166fdb075a39c0ba432527ff83453fd26232a82d Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 02:11:02 -0700 Subject: [PATCH 26/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index ac790a04e78..fbcff0c0342 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -176,9 +176,9 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) for( auto const & [typeName, regex] : regexes ) { - // //////////// - // std::cout << " " << typeName << std::endl; - // //////////// + //////////// + std::cout << " " << typeName << std::endl; + //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } From 664e86973fc36670e482c3b5a73711016cde5124 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 02:22:01 -0700 Subject: [PATCH 27/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index fbcff0c0342..1ae05ac9e5a 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -158,21 +158,21 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; // Set attribute - patternNode.append_attribute( "value" ).set_value( patternString.c_str() ); + patternNode.append_attribute( "value" ) = patternString.c_str(); } void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) { auto const regexes = rtTypes::createBasicTypesRegexMap(); - // // --- Debug: print all type names before entering the main loop --- - // std::cout << "Type names in regexes:" << std::endl; - // for( auto const & [typeName, _] : regexes ) - // { - // std::cout << " " << typeName << std::endl; - // } - // std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; - // // ------------------------------------------------------------------------------------ + // --- Debug: print all type names before entering the main loop --- + std::cout << "Type names in regexes:" << std::endl; + for( auto const & [typeName, _] : regexes ) + { + std::cout << " " << typeName << std::endl; + } + std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; + // ------------------------------------------------------------------------------------ for( auto const & [typeName, regex] : regexes ) { From bc3207b82e16f928bfb7b02e7444cc9957b97188 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 02:28:17 -0700 Subject: [PATCH 28/30] Again --- src/coreComponents/schema/schemaUtilities.cpp | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index 1ae05ac9e5a..28eeaef9bb2 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -144,18 +144,10 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, GEOS_ERROR_IF( ( !patternNode ), GEOS_FMT( "Failed to create xsd:pattern node for {}", name ) ); // Determine pattern string - string patternString; - if( regex.empty() ) - { - GEOS_WARNING( GEOS_FMT( "schema regex not defined for {}", name ) ); - patternString = "(?s).*"; - } - else - { - patternString = advanced_match_string + regex; - } + GEOS_WARNING_IF( regex.empty(), GEOS_FMT( "schema regex not defined for {}", name ) ); + string const patternString = regex.empty() ? "(?s).*" : advanced_match_string + regex; - std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; + // std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; // Set attribute patternNode.append_attribute( "value" ) = patternString.c_str(); @@ -165,14 +157,14 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) { auto const regexes = rtTypes::createBasicTypesRegexMap(); - // --- Debug: print all type names before entering the main loop --- - std::cout << "Type names in regexes:" << std::endl; - for( auto const & [typeName, _] : regexes ) - { - std::cout << " " << typeName << std::endl; - } - std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; - // ------------------------------------------------------------------------------------ + // // --- Debug: print all type names before entering the main loop --- + // std::cout << "Type names in regexes:" << std::endl; + // for( auto const & [typeName, _] : regexes ) + // { + // std::cout << " " << typeName << std::endl; + // } + // std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; + // // ------------------------------------------------------------------------------------ for( auto const & [typeName, regex] : regexes ) { From 3fd391f3d3ec4fcf6b68c8623c2ffd2304112378 Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 02:34:57 -0700 Subject: [PATCH 29/30] ... --- src/coreComponents/schema/schemaUtilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index 28eeaef9bb2..755dd75e9df 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -169,7 +169,7 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) for( auto const & [typeName, regex] : regexes ) { //////////// - std::cout << " " << typeName << std::endl; + // std::cout << " " << typeName << std::endl; //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } From 0ebddd9853b2c50af5646e82dc3ab8947b5d92db Mon Sep 17 00:00:00 2001 From: Nicola Castelletto Date: Fri, 24 Oct 2025 03:13:46 -0700 Subject: [PATCH 30/30] Last attempt --- .github/workflows/ci_tests.yml | 122 +++++++++--------- src/coreComponents/schema/schema.xsd.other | 4 +- src/coreComponents/schema/schemaUtilities.cpp | 48 ------- 3 files changed, 63 insertions(+), 111 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index f0a762c2587..e1e7506540f 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -147,62 +147,62 @@ jobs: fail-fast : false matrix: include: - # - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) - # CMAKE_BUILD_TYPE: Release - # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 - # BUILD_SHARED_LIBS: ON - # ENABLE_HYPRE: OFF - # ENABLE_TRILINOS: ON - # GEOS_ENABLE_BOUNDS_CHECK: ON - # HOST_CONFIG: /spack-generated.cmake + - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) + CMAKE_BUILD_TYPE: Release + DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 + BUILD_SHARED_LIBS: ON + ENABLE_HYPRE: OFF + ENABLE_TRILINOS: ON + GEOS_ENABLE_BOUNDS_CHECK: ON + HOST_CONFIG: /spack-generated.cmake - # - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - # CMAKE_BUILD_TYPE: Debug - # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - # BUILD_SHARED_LIBS: ON - # ENABLE_HYPRE: OFF - # ENABLE_TRILINOS: ON - # GEOS_ENABLE_BOUNDS_CHECK: ON - # HOST_CONFIG: /spack-generated.cmake + - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces + CMAKE_BUILD_TYPE: Debug + DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + BUILD_SHARED_LIBS: ON + ENABLE_HYPRE: OFF + ENABLE_TRILINOS: ON + GEOS_ENABLE_BOUNDS_CHECK: ON + HOST_CONFIG: /spack-generated.cmake - # - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - # CMAKE_BUILD_TYPE: Release - # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - # BUILD_SHARED_LIBS: ON - # ENABLE_HYPRE: OFF - # ENABLE_TRILINOS: ON - # GEOS_ENABLE_BOUNDS_CHECK: ON - # HOST_CONFIG: /spack-generated.cmake + - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces + CMAKE_BUILD_TYPE: Release + DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + BUILD_SHARED_LIBS: ON + ENABLE_HYPRE: OFF + ENABLE_TRILINOS: ON + GEOS_ENABLE_BOUNDS_CHECK: ON + HOST_CONFIG: /spack-generated.cmake - # - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) - # CMAKE_BUILD_TYPE: Release - # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 - # ENABLE_HYPRE: ON - # ENABLE_TRILINOS: OFF - # BUILD_SHARED_LIBS: ON - # GEOS_ENABLE_BOUNDS_CHECK: OFF - # GCP_BUCKET: geosx/ubuntu22.04-gcc11 - # HOST_CONFIG: /spack-generated.cmake + - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) + CMAKE_BUILD_TYPE: Release + DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 + ENABLE_HYPRE: ON + ENABLE_TRILINOS: OFF + BUILD_SHARED_LIBS: ON + GEOS_ENABLE_BOUNDS_CHECK: OFF + GCP_BUCKET: geosx/ubuntu22.04-gcc11 + HOST_CONFIG: /spack-generated.cmake - # - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - # CMAKE_BUILD_TYPE: Release - # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 - # GCP_BUCKET: geosx/ubuntu22.04-gcc12 - # ENABLE_HYPRE: ON - # ENABLE_TRILINOS: OFF - # BUILD_SHARED_LIBS: ON - # GEOS_ENABLE_BOUNDS_CHECK: ON - # HOST_CONFIG: /spack-generated.cmake + - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) + CMAKE_BUILD_TYPE: Release + DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 + GCP_BUCKET: geosx/ubuntu22.04-gcc12 + ENABLE_HYPRE: ON + ENABLE_TRILINOS: OFF + BUILD_SHARED_LIBS: ON + GEOS_ENABLE_BOUNDS_CHECK: ON + HOST_CONFIG: /spack-generated.cmake - # - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - NO BOUNDS CHECK - # CMAKE_BUILD_TYPE: Release - # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 - # GCP_BUCKET: geosx/ubuntu22.04-gcc12 - # ENABLE_HYPRE: ON - # ENABLE_TRILINOS: OFF - # BUILD_SHARED_LIBS: ON - # GEOS_ENABLE_BOUNDS_CHECK: OFF - # HOST_CONFIG: /spack-generated.cmake + - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - NO BOUNDS CHECK + CMAKE_BUILD_TYPE: Release + DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 + GCP_BUCKET: geosx/ubuntu22.04-gcc12 + ENABLE_HYPRE: ON + ENABLE_TRILINOS: OFF + BUILD_SHARED_LIBS: ON + GEOS_ENABLE_BOUNDS_CHECK: OFF + HOST_CONFIG: /spack-generated.cmake - name: Ubuntu (22.04, clang 15.0.7, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release @@ -213,16 +213,16 @@ jobs: BUILD_SHARED_LIBS: ON HOST_CONFIG: /spack-generated.cmake -# - name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10) -# CMAKE_BUILD_TYPE: Release -# DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11 -# ENABLE_HYPRE: ON -# ENABLE_TRILINOS: OFF -# GEOS_ENABLE_BOUNDS_CHECK: OFF -# GCP_BUCKET: geosx/Sherlock-CPU -# HOST_CONFIG: /spack-generated.cmake -# # HOST_CONFIG: host-configs/Stanford/sherlock-gcc10.cmake -# BUILD_SHARED_LIBS: ON + - name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10) + CMAKE_BUILD_TYPE: Release + DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11 + ENABLE_HYPRE: ON + ENABLE_TRILINOS: OFF + GEOS_ENABLE_BOUNDS_CHECK: OFF + GCP_BUCKET: geosx/Sherlock-CPU + HOST_CONFIG: /spack-generated.cmake +# HOST_CONFIG: host-configs/Stanford/sherlock-gcc10.cmake + BUILD_SHARED_LIBS: ON uses: ./.github/workflows/build_and_test.yml with: diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index 27c6a58ac7e..07172d74346 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -516,7 +516,7 @@ - + @@ -1502,7 +1502,7 @@ - + diff --git a/src/coreComponents/schema/schemaUtilities.cpp b/src/coreComponents/schema/schemaUtilities.cpp index 755dd75e9df..9d447842c09 100644 --- a/src/coreComponents/schema/schemaUtilities.cpp +++ b/src/coreComponents/schema/schemaUtilities.cpp @@ -90,39 +90,6 @@ string getSchemaTypeName( string_view rtTypeName ) return xmlSafeName; } -// void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, -// string const & name, -// string const & regex ) -// { - -// /////////// -// std::cout << "In AppendSimpleType" << std::endl; -// /////////// -// string const advanced_match_string = ".*[\\[\\]`$].*|"; - -// xmlWrapper::xmlNode newNode = schemaRoot.append_child( "xsd:simpleType" ); -// newNode.append_attribute( "name" ) = name.c_str(); -// xmlWrapper::xmlNode restrictionNode = newNode.append_child( "xsd:restriction" ); -// restrictionNode.append_attribute( "base" ) = "xsd:string"; -// xmlWrapper::xmlNode patternNode = restrictionNode.append_child( "xsd:pattern" ); - -// /////////// -// std::cout << "Appending simple type: " << name << " with regex: " << regex << std::endl; -// /////////// - -// // Handle the default regex -// if( regex.empty() ) -// { -// GEOS_WARNING( "schema regex not defined for " << name ); -// patternNode.append_attribute( "value" ) = "(?s).*"; -// } -// else -// { -// string const patternString = advanced_match_string + regex; -// patternNode.append_attribute( "value" ) = patternString.c_str(); -// } -// } - void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, string const & name, string const & regex ) @@ -147,8 +114,6 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot, GEOS_WARNING_IF( regex.empty(), GEOS_FMT( "schema regex not defined for {}", name ) ); string const patternString = regex.empty() ? "(?s).*" : advanced_match_string + regex; - // std::cout << "Appending simple type: " << name << " with pattern: " << patternString << std::endl; - // Set attribute patternNode.append_attribute( "value" ) = patternString.c_str(); } @@ -157,25 +122,12 @@ void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot ) { auto const regexes = rtTypes::createBasicTypesRegexMap(); - // // --- Debug: print all type names before entering the main loop --- - // std::cout << "Type names in regexes:" << std::endl; - // for( auto const & [typeName, _] : regexes ) - // { - // std::cout << " " << typeName << std::endl; - // } - // std::cout << "**********************" << std::endl; std::cout << "**********************" << std::endl; - // // ------------------------------------------------------------------------------------ - for( auto const & [typeName, regex] : regexes ) { - //////////// - // std::cout << " " << typeName << std::endl; - //////////// AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr ); } } - void SchemaConstruction( Group & group, xmlWrapper::xmlNode schemaRoot, xmlWrapper::xmlNode schemaParent,