Skip to content

Commit

Permalink
Merge branch 'develop' into docs/JOSS
Browse files Browse the repository at this point in the history
  • Loading branch information
rrsettgast authored Jan 23, 2024
2 parents ed8f1fd + e322e0a commit 7b6dc25
Show file tree
Hide file tree
Showing 410 changed files with 7,745 additions and 11,330 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": "251-99"
"GEOS_TPL_TAG": "255-118"
}
},
"runArgs": [
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
CMAKE_BUILD_TYPE:
required: true
type: string
CODE_COVERAGE:
required: false
type: boolean
default: false
DOCKER_IMAGE_TAG:
required: true
type: string
Expand Down Expand Up @@ -127,6 +131,10 @@ jobs:
script_args+=(--cmake-build-type ${{ inputs.CMAKE_BUILD_TYPE }})
script_args+=(${{ inputs.BUILD_AND_TEST_CLI_ARGS }})
if ${{ inputs.CODE_COVERAGE }} == 'true'; then
script_args+=(--code-coverage)
fi
# In case of integrated tests run, we still want to send the results to the cloud for inspection.
# While for standard build (if even possible), pushing a failed build would be pointless.
# GHA set `-e` to bash scripts by default to fail asap,
Expand All @@ -148,5 +156,13 @@ jobs:
echo "Download the bundle at https://storage.googleapis.com/${{ inputs.GCP_BUCKET }}/${DATA_BASENAME}"
fi
fi
exit ${EXIT_STATUS}
- name: Upload coverage to Codecov
if: inputs.CODE_COVERAGE
uses: codecov/codecov-action@v3
with:
files: geos_coverage.info.cleaned
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
68 changes: 45 additions & 23 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: GEOS CI
on: pull_request

on:
push:
branches:
- develop
pull_request:

# Cancels in-progress workflows for a PR when updated
concurrency:
Expand All @@ -12,12 +17,11 @@ jobs:

# Jobs will be cancelled if PR is a draft.
# PR status must be "Open" to run CI.
is_pull_request_a_draft:
is_not_draft_pull_request:
# Everywhere in this workflow, we use the most recent ubuntu distribution available in Github Actions
# to ensure maximum support of google cloud's sdk.
runs-on: ubuntu-22.04
outputs:
NUM_ASSIGNEES: ${{ steps.extract_pr_info.outputs.NUM_ASSIGNEES }}
DOCKER_IMAGE_TAG: ${{ steps.extract_docker_image_tag.outputs.DOCKER_IMAGE_TAG }}
LABELS: ${{ steps.extract_pr_info.outputs.LABELS }}
steps:
Expand All @@ -34,7 +38,6 @@ jobs:
if [[ $draft_status == true ]]; then exit 1 ; fi
# If the workflow is meant to continue, we extract additional information for the json of the pr.
echo "NUM_ASSIGNEES=$(echo ${pr_json} | jq '.assignees | length')" >> "$GITHUB_OUTPUT"
echo "LABELS=$(echo ${pr_json} | jq -crM '[.labels[].name]')" >> "$GITHUB_OUTPUT"
# The TPL tag is contained in the codespaces configuration to avoid duplications.
- name: Checkout .devcontainer/devcontainer.json
Expand All @@ -53,19 +56,22 @@ jobs:
# PR must be assigned to be merged.
# This job will fail if this is not the case.
is_pull_request_assigned:
needs: [is_pull_request_a_draft]
if_not_unassigned_pull_request:
needs: [is_not_draft_pull_request]
runs-on: ubuntu-22.04
steps:
- name: Check that the PR is assigned
- name: If this is a PR, Check that it is assigned
run: |
echo "There are ${{ needs.is_pull_request_a_draft.outputs.NUM_ASSIGNEES }} on this PR."
${{ needs.is_pull_request_a_draft.outputs.NUM_ASSIGNEES > 0 }}
if [[ ${{github.event_name}} != 'pull_request' ]]; then exit 0 ; fi
pr_json=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }})
NUM_ASSIGNEES=$(echo ${pr_json} | jq '.assignees | length')
echo "There are ${NUM_ASSIGNEES} assignees on this PR."
if [[ $NUM_ASSIGNEES == 0 ]]; then exit 1 ; fi
# Validates that the PR is still pointing to the HEAD of the main branch of the submodules repositories.
# (There are exceptions, read the script about those).
are_submodules_in_sync:
needs: [is_pull_request_a_draft]
needs: [is_not_draft_pull_request]
runs-on: ubuntu-22.04
steps:
# The integrated test submodule repository contains large data (using git lfs).
Expand All @@ -82,7 +88,7 @@ jobs:

check_code_style_and_documentation:
name: ${{ matrix.name }}
needs: [is_pull_request_a_draft]
needs: [is_not_draft_pull_request]
strategy:
fail-fast : false
matrix:
Expand All @@ -97,7 +103,7 @@ jobs:
with:
BUILD_AND_TEST_CLI_ARGS: ${{ matrix.BUILD_AND_TEST_ARGS }}
CMAKE_BUILD_TYPE: Release
DOCKER_IMAGE_TAG: ${{ needs.is_pull_request_a_draft.outputs.DOCKER_IMAGE_TAG }}
DOCKER_IMAGE_TAG: ${{ needs.is_not_draft_pull_request.outputs.DOCKER_IMAGE_TAG }}
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
RUNS_ON: ubuntu-22.04
USE_SCCACHE: false
Expand All @@ -106,7 +112,7 @@ jobs:
# Those are quite fast and can efficiently benefit from the `sccache' tool to make them even faster.
cpu_builds:
name: ${{ matrix.name }}
needs: [is_pull_request_a_draft]
needs: [is_not_draft_pull_request]
strategy:
# In-progress jobs will not be cancelled if there is a failure
fail-fast : false
Expand Down Expand Up @@ -161,7 +167,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
with:
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }}
DOCKER_IMAGE_TAG: ${{ needs.is_pull_request_a_draft.outputs.DOCKER_IMAGE_TAG }}
DOCKER_IMAGE_TAG: ${{ needs.is_not_draft_pull_request.outputs.DOCKER_IMAGE_TAG }}
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}
ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }}
ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }}
Expand All @@ -174,29 +180,45 @@ jobs:
# Note: The integrated tests are optional and are (for the moment) run for convenience only.
run_integrated_tests:
needs:
- is_pull_request_a_draft
- is_not_draft_pull_request
- cpu_builds
if: "${{ contains( fromJSON( needs.is_pull_request_a_draft.outputs.LABELS ), 'ci: run integrated tests') }}"
if: "${{ contains( fromJSON( needs.is_not_draft_pull_request.outputs.LABELS ), 'ci: run integrated tests') }}"
uses: ./.github/workflows/build_and_test.yml
secrets: inherit
with:
BUILD_AND_TEST_CLI_ARGS: --build-exe-only
BUILD_TYPE: integrated_tests
CMAKE_BUILD_TYPE: Release
DOCKER_IMAGE_TAG: ${{ needs.is_pull_request_a_draft.outputs.DOCKER_IMAGE_TAG }}
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/integratedTests
RUNS_ON: ubuntu-22.04


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: ubuntu-22.04

# If the 'ci: ready to be merged' PR label is found, the cuda jobs run immediately along side linux jobs.
# Note: CUDA jobs should only be run if PR is ready to merge.
cuda_builds:
name: ${{ matrix.name }}
needs:
- is_pull_request_a_draft
if: "${{ contains( fromJSON( needs.is_pull_request_a_draft.outputs.LABELS ), 'ci: ready to be merged') }}"
- is_not_draft_pull_request
if: "${{ contains( fromJSON( needs.is_not_draft_pull_request.outputs.LABELS ), 'ci: ready to be merged') }}"
strategy:
# In-progress jobs will not be cancelled if there is a failure
fail-fast : false
Expand Down Expand Up @@ -237,7 +259,7 @@ jobs:
with:
BUILD_AND_TEST_CLI_ARGS: ${{ matrix.BUILD_AND_TEST_CLI_ARGS }}
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }}
DOCKER_IMAGE_TAG: ${{ needs.is_pull_request_a_draft.outputs.DOCKER_IMAGE_TAG }}
DOCKER_IMAGE_TAG: ${{ needs.is_not_draft_pull_request.outputs.DOCKER_IMAGE_TAG }}
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}
ENABLE_HYPRE_DEVICE: ${{ matrix.ENABLE_HYPRE_DEVICE }}
ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }}
Expand All @@ -250,7 +272,7 @@ jobs:
check_that_all_jobs_succeeded:
runs-on: ubuntu-22.04
needs:
- is_pull_request_assigned
- if_not_unassigned_pull_request
- are_submodules_in_sync
- check_code_style_and_documentation
- cpu_builds
Expand All @@ -259,7 +281,7 @@ jobs:
steps:
- run: |
${{
needs.is_pull_request_assigned.result == 'success' &&
needs.if_not_unassigned_pull_request.result == 'success' &&
needs.are_submodules_in_sync.result == 'success' &&
needs.check_code_style_and_documentation.result == 'success' &&
needs.cpu_builds.result == 'success' &&
Expand Down
4 changes: 4 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ stages:
- git submodule set-url integratedTests [email protected]:GEOS-DEV/integratedTests.git
- git submodule set-url src/coreComponents/fileIO/coupling/hdf5_interface https://github.com/GEOS-DEV/hdf5_interface.git

# Clean up directory and submodules when pre-initialized from previous CI run
- git clean -x -f -d
- git submodule foreach --recursive git clean -x -f -d

# Update submodules
- git submodule update --init --recursive src/cmake/blt
- git submodule update --init --recursive src/coreComponents/LvArray
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[![DOI](https://zenodo.org/badge/131810578.svg)](https://zenodo.org/badge/latestdoi/131810578)
[![codecov](https://codecov.io/github/GEOS-DEV/GEOS/graph/badge.svg?token=0VTEHPQG58)](https://codecov.io/github/GEOS-DEV/GEOS)
![CI](https://github.com/GEOS-DEV/GEOS/actions/workflows/ci_tests.yml/badge.svg)
[![docs](https://readthedocs.com/projects/geosx-geosx/badge/?version=latest)](https://geosx-geosx.readthedocs-hosted.com/en/latest/)

Welcome to the GEOS project!
-----------------------------
Expand Down
1 change: 0 additions & 1 deletion host-configs/LBL/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ set(MPI_Fortran_COMPILER ${MPI_HOME}/bin/mpifort CACHE PATH "")
set(MPIEXEC /usr/bin/srun CACHE PATH "")
set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "")

set(GEOSX_ENABLE_FPE OFF CACHE BOOL "" FORCE)
set(GEOSX_TPL_DIR "/global/project/projectdirs/m1411/GEOSX/tpls/install-cori-gcc\@8.1.0-release-24-07-20" CACHE PATH "" )


Expand Down
1 change: 0 additions & 1 deletion host-configs/LBL/cori-intel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ set(MPI_Fortran_COMPILER "ftn" CACHE PATH "" FORCE)
set(MPIEXEC "/usr/bin/srun" CACHE PATH "")
set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "")

set(GEOSX_ENABLE_FPE OFF CACHE BOOL "" FORCE)
set(GEOSX_TPL_DIR "/global/project/projectdirs/m1411/GEOSX/tpls/install-cori-intel-release-22-07-20" CACHE PATH "" )

set(GEOSX_LINK_PREPEND_FLAG "-Wl,--whole-archive" CACHE STRING "" FORCE)
Expand Down
10 changes: 4 additions & 6 deletions host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# hostconfig for pangea3
#
# export MODULEPATH=/workrd/SCR/NUM/geosx_num/module_files:$MODULEPATH
# module load cmake/3.21.4 gcc/8.4.1 cuda/11.0.3 ompi/4.1.2 openblas/0.3.18 python4geosx/p3/gcc8.4.1-ompi4.1.2
#
set(CONFIG_NAME "pangea3-gcc8.4.1-ompi-4.1.2" CACHE PATH "")

Expand Down Expand Up @@ -56,15 +54,15 @@ if (DEFINED ENV{CUDA_ROOT})
set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc CACHE STRING "")
set(CUDA_ARCH sm_70 CACHE STRING "")
set(CMAKE_CUDA_ARCHITECTURES 70 CACHE STRING "")
set(CMAKE_CUDA_FLAGS "-restrict -arch ${CUDA_ARCH} --expt-extended-lambda -Werror cross-execution-space-call,reorder,deprecated-declarations" CACHE STRING "")
set(CMAKE_CUDA_FLAGS "-restrict -arch ${CUDA_ARCH} --expt-relaxed-constexpr --expt-extended-lambda -Werror cross-execution-space-call,reorder,deprecated-declarations" CACHE STRING "")
set(CMAKE_CUDA_FLAGS_RELEASE "-O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -O3 -Xcompiler -mcpu=powerpc64le -Xcompiler -mtune=powerpc64le" CACHE STRING "")
set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-g -lineinfo ${CMAKE_CUDA_FLAGS_RELEASE}" CACHE STRING "")
set(CMAKE_CUDA_FLAGS_DEBUG "-g -G -O0 -Xcompiler -O0" CACHE STRING "")

# Uncomment this line to make nvcc output register usage for each kernel.
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --resource-usage" CACHE STRING "" FORCE)
else()
message(FATAL_ERROR "You must have CUDA_ROOT environment variable set, we advise loading module cuda/11.0.3")
message(FATAL_ERROR "You must have CUDA_ROOT environment variable set, we advise loading module cuda/11.5.0")
endif()

# GTEST options
Expand Down Expand Up @@ -108,7 +106,7 @@ set(ENABLE_PETSC OFF CACHE BOOL "")
set(ENABLE_HYPRE ON CACHE BOOL "")
set(ENABLE_HYPRE_DEVICE "CUDA" CACHE BOOL "")

# activate workaround for fmt formatter
set(ENABLE_FMT_CONST_FORMATTER_WORKAROUND ON CACHE BOOL "")
# disable benchmarks, they are incompatible with P3's nvcc version (cuda 11.5.0)
set(ENABLE_BENCHMARKS OFF CACHE BOOL "")

include( ${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake )
26 changes: 7 additions & 19 deletions inputFiles/compositionalMultiphaseFlow/4comp_2ph_1d.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
logLevel="1"
discretization="fluidTPFA"
targetRegions="{ Region1 }"
initialDt="1e5"
targetFlowCFL="2"
temperature="297.15">
<NonlinearSolverParameters
newtonTol="1.0e-6"
Expand Down Expand Up @@ -45,26 +47,12 @@
maxTime="2e7">
<PeriodicEvent
name="outputs"
timeFrequency="1e6"
target="/Outputs/siloOutput"/>
timeFrequency="5e6"
target="/Outputs/vtkOutput"/>

<PeriodicEvent
name="solverApplications1"
forceDt="1e3"
endTime="1e4"
target="/Solvers/compflow"/>

<PeriodicEvent
name="solverApplications2"
forceDt="1e4"
beginTime="1e4"
endTime="1e5"
target="/Solvers/compflow"/>

<PeriodicEvent
name="solverApplications3"
forceDt="1e5"
beginTime="1e5"
endTime="2e7"
target="/Solvers/compflow"/>

<PeriodicEvent
Expand Down Expand Up @@ -262,8 +250,8 @@
</FieldSpecifications>

<Outputs>
<Silo
name="siloOutput"/>
<VTK
name="vtkOutput"/>

<Restart
name="restartOutput"/>
Expand Down
1 change: 1 addition & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_flux_3d.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<Constitutive>
<CO2BrinePhillipsFluid
name="fluid"
logLevel="1"
phaseNames="{ gas, water }"
componentNames="{ co2, water }"
componentMolarWeight="{ 44e-3, 18e-3 }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
useMass="0"
targetRegions="{ Domain, Fracture }">
<NonlinearSolverParameters
newtonTol="1.0e-10"
lineSearchAction="None"
newtonTol="1.0e-8"
newtonMaxIter="15"
maxTimeStepCuts="2"
lineSearchMaxCuts="2"/>
Expand All @@ -23,7 +24,7 @@
<EmbeddedSurfaceGenerator
name="SurfaceGenerator"
logLevel="1"
discretization="fluidTPFA"
discretization="FE1"
targetRegions="{ Domain, Fracture }"
targetObjects="{ FracturePlane }"
fractureRegion="Fracture"/>
Expand Down Expand Up @@ -99,6 +100,11 @@
<TwoPointFluxApproximation
name="fluidTPFA"/>
</FiniteVolume>
<FiniteElements>
<FiniteElementSpace
name="FE1"
order="1"/>
</FiniteElements>
</NumericalMethods>

<ElementRegions>
Expand Down
Loading

0 comments on commit 7b6dc25

Please sign in to comment.