Skip to content

Commit

Permalink
Update tag, add PySolver snippet, adjust lai setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhan12 committed Jul 18, 2024
1 parent 5fe43d6 commit 301ff58
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"GEOS_TPL_TAG": "275-480"
"GEOS_TPL_TAG": "261-329"
}
},
"runArgs": [
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
steps:
- name: does_pr_have_necessary_labels
if: ${{inputs.REQUIRED_LABEL && github.event_name == 'pull_request'}}
run: |
run: |
pr_json=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }})
LABELS=$(echo ${pr_json} | jq -crM '[.labels[].name]')
echo " the labels are ${LABELS}"
Expand Down Expand Up @@ -176,14 +176,26 @@ jobs:
script_args+=(--repository ${GITHUB_WORKSPACE_MOUNT_POINT})
# The linear algebra environment variables (ENABLE_HYPRE, ENABLE_HYPRE_DEVICE & ENABLE_TRILINOS)
# could be passed as scripts parameters as well, but a specific care must be taken to be sure
# are passed as scripts parameters. Specific care must be taken to be sure
# there's no conflict with the host-config files.
# Hypre
ENABLE_HYPRE=${{ inputs.ENABLE_HYPRE }}
ENABLE_HYPRE_DEVICE=${{ inputs.ENABLE_HYPRE_DEVICE }}
if [ ! -z "${{ inputs.ENABLE_HYPRE }}" ]; then
script_args+=(--enable-hypre "${{ inputs.ENABLE_HYPRE }}")
fi
# Trilinos
ENABLE_TRILINOS=${{ inputs.ENABLE_TRILINOS }}
docker_args+=(-e ENABLE_HYPRE=${ENABLE_HYPRE:-OFF})
docker_args+=(-e ENABLE_HYPRE_DEVICE=${ENABLE_HYPRE_DEVICE:-CPU})
docker_args+=(-e ENABLE_TRILINOS=${ENABLE_TRILINOS:-ON})
if [ ! -z "${{ inputs.ENABLE_TRILINOS }}" ]; then
script_args+=(--enable-trilinos "${{ inputs.ENABLE_TRILINOS }}")
fi
# ENABLE_HYPRE_DEVICE
ENABLE_HYPRE_DEVICE=${{ inputs.ENABLE_HYPRE_DEVICE }}
if [ ! -z "${{ inputs.ENABLE_HYPRE_DEVICE }}" ]; then
script_args+=(--enable-hypre-device "${{ inputs.ENABLE_HYPRE_DEVICE }}")
fi
docker_args+=(--cap-add=SYS_PTRACE --rm)
Expand Down
41 changes: 24 additions & 17 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,25 +149,30 @@ jobs:
- name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3)
CMAKE_BUILD_TYPE: Release
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
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
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
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
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
HOST_CONFIG: /spack-generated.cmake
ENABLE_HYPRE: ON
ENABLE_TRILINOS: OFF

Expand All @@ -176,14 +181,15 @@ jobs:
DOCKER_REPOSITORY: geosx/ubuntu22.04-clang15
ENABLE_HYPRE: ON
ENABLE_TRILINOS: OFF
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
GCP_BUCKET: geosx/Sherlock-CPU
HOST_CONFIG: host-configs/Stanford/sherlock-gcc10-ompi4.1.2-openblas0.3.10.cmake
HOST_CONFIG: /spack-generated.cmake

uses: ./.github/workflows/build_and_test.yml
with:
Expand Down Expand Up @@ -237,21 +243,21 @@ jobs:
- name: Check that the baseline logs are modified if rebaselines are detected
run: "scripts/check_baseline_log.sh"

code_coverage:
needs:
- is_not_draft_pull_request
uses: ./.github/workflows/build_and_test.yml
secrets: inherit
with:
BUILD_AND_TEST_CLI_ARGS: "--no-run-unit-tests"
CMAKE_BUILD_TYPE: Debug
CODE_COVERAGE: true
DOCKER_IMAGE_TAG: ${{ needs.is_not_draft_pull_request.outputs.DOCKER_IMAGE_TAG }}
DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11
ENABLE_HYPRE: ON
ENABLE_TRILINOS: OFF
GCP_BUCKET: geosx/ubuntu22.04-gcc11
RUNS_ON: Runner_4core_16GB
# code_coverage:
# needs:
# - is_not_draft_pull_request
# uses: ./.github/workflows/build_and_test.yml
# secrets: inherit
# with:
# BUILD_AND_TEST_CLI_ARGS: "--no-run-unit-tests"
# CMAKE_BUILD_TYPE: Debug
# CODE_COVERAGE: true
# DOCKER_IMAGE_TAG: ${{ needs.is_not_draft_pull_request.outputs.DOCKER_IMAGE_TAG }}
# DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11
# ENABLE_HYPRE: ON
# ENABLE_TRILINOS: OFF
# GCP_BUCKET: geosx/ubuntu22.04-gcc11
# RUNS_ON: Runner_4core_16GB

# mac_builds:
# needs:
Expand Down Expand Up @@ -286,6 +292,7 @@ jobs:
DOCKER_RUN_ARGS: "--cpus=8 --memory=128g --runtime=nvidia -v /etc/pki/ca-trust/source/anchors/:/usr/local/share/ca-certificates/llnl:ro"
DOCKER_CERTS_DIR: "/usr/local/share/ca-certificates"
DOCKER_CERTS_UPDATE_COMMAND: "update-ca-certificates"
HOST_CONFIG: /spack-generated.cmake

- name: Ubuntu CUDA (20.04, clang 10.0.0 + gcc 9.4.0, open-mpi 4.0.3, cuda-11.8.89)
BUILD_AND_TEST_CLI_ARGS: "--no-install-schema"
Expand Down Expand Up @@ -331,7 +338,7 @@ jobs:
ENABLE_HYPRE: ON
ENABLE_TRILINOS: OFF
GCP_BUCKET: geosx/Sherlock-GPU
HOST_CONFIG: host-configs/Stanford/sherlock-gcc10-ompi4.1.2-openblas0.3.10-cuda11.7.1-sm70.cmake
HOST_CONFIG: /spack-generated.cmake
RUNS_ON: streak2
NPROC: 8
DOCKER_RUN_ARGS: "--cpus=8 --memory=128g --runtime=nvidia -v /etc/pki/ca-trust/source/anchors/:/etc/pki/ca-trust/source/anchors/llnl:ro"
Expand Down
17 changes: 16 additions & 1 deletion scripts/ci_build_and_test_in_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Usage: $0
run a code build and test.
--data-basename output.tar.gz
If some data needs to be extracted from the build, the argument will define the tarball. Has to be a `tar.gz`.
--enable-hypre
One of ON or OFF (default is ON). Build geos with hypre.
--enable-hypre-device
One of CPU, CUDA, or HIP (default is CPU). Build geos with hypre GPU support.
--enable-trilinos
One of ON or OFF (default is OFF). Build geos with trilinos.
--exchange-dir /path/to/exchange
Folder to share data with outside of the container.
--host-config host-config/my_config.cmake
Expand Down Expand Up @@ -68,17 +74,20 @@ exit 1
or_die cd $(dirname $0)/..

# Parsing using getopt
args=$(or_die getopt -a -o h --long build-exe-only,cmake-build-type:,code-coverage,data-basename:,exchange-dir:,host-config:,install-dir-basename:,no-install-schema,no-run-unit-tests,nproc:,repository:,run-integrated-tests,sccache-credentials:,test-code-style,test-documentation,help -- "$@")
args=$(or_die getopt -a -o h --long build-exe-only,cmake-build-type:,code-coverage,data-basename:,enable-hypre:,enable-hypre-device:,enable-trilinos:,exchange-dir:,host-config:,install-dir-basename:,no-install-schema,no-run-unit-tests,nproc:,repository:,run-integrated-tests,sccache-credentials:,test-code-style,test-documentation,help -- "$@")

# Variables with default values
BUILD_EXE_ONLY=false
GEOSX_INSTALL_SCHEMA=true
HOST_CONFIG="host-configs/environment.cmake"
ENABLE_HYPRE=ON
ENABLE_HYPRE_DEVICE=CPU
RUN_UNIT_TESTS=true
RUN_INTEGRATED_TESTS=false
UPLOAD_TEST_BASELINES=false
TEST_CODE_STYLE=false
TEST_DOCUMENTATION=false
ENABLE_TRILINOS=OFF
CODE_COVERAGE=false
NPROC="$(nproc)"

Expand All @@ -101,6 +110,9 @@ do
fi
unset DATA_BASENAME DATA_BASENAME_EXT
shift 2;;
--enable-hypre) ENABLE_HYPRE=$2; shift 2;;
--enable-hypre-device) ENABLE_HYPRE_DEVICE=$2; shift 2;;
--enable-trilinos) ENABLE_TRILINOS=$2; shift 2;;
--exchange-dir) DATA_EXCHANGE_DIR=$2; shift 2;;
--host-config) HOST_CONFIG=$2; shift 2;;
--install-dir-basename) GEOSX_DIR=${GEOSX_TPL_DIR}/../$2; shift 2;;
Expand Down Expand Up @@ -224,6 +236,9 @@ or_die python3 scripts/config-build.py \
--ninja \
-DBLT_MPI_COMMAND_APPEND='"--allow-run-as-root;--oversubscribe"' \
-DGEOSX_INSTALL_SCHEMA=${GEOSX_INSTALL_SCHEMA} \
-DENABLE_HYPRE=${ENABLE_HYPRE} \
-DENABLE_HYPRE_DEVICE=${ENABLE_HYPRE_DEVICE} \
-DENABLE_TRILINOS=${ENABLE_TRILINOS} \
-DENABLE_COVERAGE=$([[ "${CODE_COVERAGE}" = true ]] && echo 1 || echo 0) \
${SCCACHE_CMAKE_ARGS} \
${ATS_CMAKE_ARGS}
Expand Down
1 change: 1 addition & 0 deletions src/coreComponents/physicsSolvers/python/PySolver.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef GEOS_PYTHON_PYSOLVER_HPP_
#define GEOS_PYTHON_PYSOLVER_HPP_

#include "mesh/DomainPartition.hpp"
#include "physicsSolvers/SolverBase.hpp"

#endif

0 comments on commit 301ff58

Please sign in to comment.