Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5a8599b
Missed std::map
castelletto1 Oct 22, 2025
a122ada
Ensuring bounds-checking
castelletto1 Oct 22, 2025
ca6c548
Uncrustifying
castelletto1 Oct 22, 2025
c567601
Typo
castelletto1 Oct 22, 2025
1f3a0e2
Merge branch 'develop' into stdMap
rrsettgast Oct 23, 2025
aa50b67
Merge branch 'develop' into stdMap
jhuang2601 Oct 23, 2025
9c3b5b2
Update src/coreComponents/fieldSpecification/FieldSpecificationManage…
castelletto1 Oct 23, 2025
85a3b78
Replacing map with stdMap
castelletto1 Oct 23, 2025
80aca51
add manualdockerimage.bash
rrsettgast Oct 23, 2025
74e82fd
Merge branch 'stdMap' of github.com:GEOS-DEV/GEOS into stdMap
rrsettgast Oct 23, 2025
e715450
script changes
rrsettgast Oct 23, 2025
8536c63
WIP
castelletto1 Oct 24, 2025
69d6935
Merge branch 'stdMap' of github.com:GEOS-DEV/GEOS into stdMap
castelletto1 Oct 24, 2025
acba066
WIP
castelletto1 Oct 24, 2025
f57b83c
WIP
castelletto1 Oct 24, 2025
5b8c075
Merge branch 'develop' into stdMap
castelletto1 Oct 24, 2025
85bdcf1
WIP
castelletto1 Oct 24, 2025
aa70168
Merge branch 'stdMap' of github.com:GEOS-DEV/GEOS into stdMap
castelletto1 Oct 24, 2025
e68288b
WIP
castelletto1 Oct 24, 2025
acfb92a
WIP
castelletto1 Oct 24, 2025
6bef9a8
WIP
castelletto1 Oct 24, 2025
37faf19
WIP
castelletto1 Oct 24, 2025
d1713ec
WIP
castelletto1 Oct 24, 2025
db9bb96
Trying again
castelletto1 Oct 24, 2025
aae3164
Again
castelletto1 Oct 24, 2025
da30a4b
Again
castelletto1 Oct 24, 2025
fb74a01
...
castelletto1 Oct 24, 2025
ecc19e2
...
castelletto1 Oct 24, 2025
f24eb17
...
castelletto1 Oct 24, 2025
e643333
...
castelletto1 Oct 24, 2025
2f351eb
...
castelletto1 Oct 24, 2025
166fdb0
...
castelletto1 Oct 24, 2025
664e869
...
castelletto1 Oct 24, 2025
bc3207b
Again
castelletto1 Oct 24, 2025
3fd391f
...
castelletto1 Oct 24, 2025
0ebddd9
Last attempt
castelletto1 Oct 24, 2025
9fe6b6a
Merge branch 'develop' into stdMap
castelletto1 Oct 24, 2025
a76e083
Merge branch 'develop' into stdMap
jhuang2601 Oct 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions scripts/manualdockerimage.bash
Original file line number Diff line number Diff line change
@@ -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:[email protected]: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 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
# "

# # 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}"
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -88,8 +88,8 @@ 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;
setTypesMap[setNames[i]][targetElementType] = 1;
isTargetSetCreated.get_inserted( setNames[i] ) = 0;
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
Expand Down Expand Up @@ -129,7 +129,10 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c
}

if( targetSet.size() > 0 )
setTypesMap[setName][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;
}
} );

// Step 3: MPI synchronization
Expand Down Expand Up @@ -216,7 +219,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 )
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/mesh/MeshObjectPath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 15 additions & 12 deletions src/coreComponents/schema/schemaUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,38 @@ void AppendSimpleType( xmlWrapper::xmlNode & schemaRoot,
{
string const advanced_match_string = ".*[\\[\\]`$].*|";

// 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" );
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" );
GEOS_ERROR_IF( ( !patternNode ), GEOS_FMT( "Failed to create xsd:pattern node for {}", name ) );

// 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
GEOS_WARNING_IF( regex.empty(), GEOS_FMT( "schema regex not defined for {}", name ) );
string const patternString = regex.empty() ? "(?s).*" : advanced_match_string + regex;

// Set attribute
patternNode.append_attribute( "value" ) = patternString.c_str();
}

void BuildSimpleSchemaTypes( xmlWrapper::xmlNode schemaRoot )
{
auto const regexes = rtTypes::createBasicTypesRegexMap();

for( auto const & [typeName, regex] : regexes )
{
AppendSimpleType( schemaRoot, getSchemaTypeName( typeName ), regex.m_regexStr );
}
}


void SchemaConstruction( Group & group,
xmlWrapper::xmlNode schemaRoot,
xmlWrapper::xmlNode schemaParent,
Expand Down
Loading