Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4f24e30
initial commit
rrsettgast Dec 20, 2024
6ad3006
intermediate commit
rrsettgast Dec 21, 2024
8a3beb3
workig on unit tests
rrsettgast Dec 23, 2024
35ca25a
incomplete attempt at having a single array type for each dimension o…
rrsettgast Dec 27, 2024
f54fa42
add missing files
rrsettgast Dec 27, 2024
ee28a42
add equilibrium reactions classes
rrsettgast Dec 28, 2024
dcbf887
add KineticReactions
rrsettgast Dec 28, 2024
651b422
add uncrustify
rrsettgast Dec 29, 2024
6e8f368
undefine macros so they don't leak
rrsettgast Dec 29, 2024
7d32702
move ParamsData out of Reactions classes
rrsettgast Dec 30, 2024
916438d
move stuff around to allow for separate geochem and battery chemistry…
rrsettgast Jan 9, 2025
510cd43
remove NDIMS from CArrayWrapper. Begin reorg of ParamData for varianc…
rrsettgast Jan 9, 2025
06d4506
add pmpl files
rrsettgast Jan 10, 2025
1037d19
restructure. separate geo and battery chemistry
rrsettgast Jan 13, 2025
39e1d67
restructure. separate geo and battery chemistry
rrsettgast Jan 13, 2025
b905b98
add namespace scoping for geochemistry
rrsettgast Jan 14, 2025
eaae504
some more intermediate additions for liquid battery chemistry
rrsettgast Jan 15, 2025
5274fda
some fixes
rrsettgast Jan 22, 2025
d4bc33b
changed names
rrsettgast Jan 22, 2025
33e1c6d
add parameter set for bicarbonate reactions...and add sample test
rrsettgast Jan 23, 2025
5b12f16
add system from Tiras
rrsettgast Feb 3, 2025
aa7b273
kind of working. issue with parameter type flexibility
rrsettgast Feb 20, 2025
255d749
add dense linear solve
rrsettgast Feb 21, 2025
a217b59
simple test works in backward euler
rrsettgast Feb 22, 2025
7bc1f24
added timestep integrator in kinetic reactions
rrsettgast Feb 22, 2025
e06483a
setup doxygen
rrsettgast Feb 23, 2025
49013a9
added log(C) option
rrsettgast Feb 24, 2025
bb61818
finished kinetic reactions wrt ln([C])
rrsettgast Feb 24, 2025
1fcc8a8
more testing of kinetic reactions. using ln(c) results in a very poor…
rrsettgast Feb 24, 2025
99d6580
added equilibrium reactions and tests
rrsettgast Feb 26, 2025
c586f4b
remove files we don't want in main
rrsettgast Feb 26, 2025
a3b42a2
update nb
rrsettgast Feb 26, 2025
ade6728
uncrustify
rrsettgast Feb 26, 2025
0c98b3d
swipe ci from shiva
rrsettgast Feb 26, 2025
e818ffe
update CI testing
rrsettgast Feb 26, 2025
be6a4b1
update CI testing
rrsettgast Feb 26, 2025
8d051ea
add blas/lapack in container
rrsettgast Feb 26, 2025
6e36132
add blas/lapack in container. turn off ubi
rrsettgast Feb 26, 2025
5bf71f8
add blas/lapack in container
rrsettgast Feb 26, 2025
fdf711f
fix error
rrsettgast Feb 26, 2025
12301db
fix error in a better way
rrsettgast Feb 26, 2025
1093703
replace abs with fabs
rrsettgast Feb 27, 2025
9cd6c5d
c-array bounds violation
rrsettgast Feb 27, 2025
26da895
code coverage
rrsettgast Feb 27, 2025
453cb28
code coverage
rrsettgast Feb 27, 2025
3ae15e6
enable doxygen tests
rrsettgast Feb 27, 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
287 changes: 287 additions & 0 deletions .github/workflows/continuousIntegration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
name: hpcReactCI

on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

get_docker_image_tag_hash:
runs-on: ubuntu-22.04
outputs:
DOCKER_IMAGE_TAG_HASH: ${{ steps.extract_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
steps:
- name: Extract docker image tag hash
id: extract_docker_image_tag_hash
run: |
echo "DOCKER_IMAGE_TAG_HASH=310f70ba6065b94858af2cafeba828ea76c02a1d" >> "$GITHUB_OUTPUT"

# code_style:
# needs: [check_pull_request_is_not_a_draft]
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4.1.6
# with:
# submodules: true
# lfs: false
# - name: Check style
# env:
# DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
# CMAKE_BUILD_TYPE: Release
# BUILD_AND_TEST_ARGS: --test-code-style
# run: ./scripts/ci_build_and_test.sh

doxygen_check:
runs-on: ubuntu-22.04
needs:
- get_docker_image_tag_hash
steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.6
with:
submodules: true
lfs: false
- name: Check doxygen
env:
DOCKER_REPOSITORY: geosx/ubuntu:22.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
HOST_CONFIG: hostconfigs/environment.cmake
CMAKE_CXX_COMPILER: /usr/bin/clang++
CMAKE_C_COMPILER: /usr/bin/clang
CMAKE_BUILD_TYPE: Release
BUILD_AND_TEST_ARGS: --test-doxygen
run: ./scripts/ci_build_and_test.sh


code_checks:
runs-on: ubuntu-22.04
needs:
- get_docker_image_tag_hash
steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.6
with:
submodules: true
lfs: false
- name: code_checks
env:
DOCKER_REPOSITORY: geosx/ubuntu:22.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
HOST_CONFIG: hostconfigs/environment.cmake
CMAKE_CXX_COMPILER: /usr/bin/clang++
CMAKE_C_COMPILER: /usr/bin/clang
CMAKE_BUILD_TYPE: Release
BUILD_AND_TEST_ARGS: --code-checks
run: ./scripts/ci_build_and_test.sh

linux_builds:
name: ${{matrix.name}}
runs-on: ${{matrix.RUNS_ON}}
needs:
- get_docker_image_tag_hash
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
include:
# - name: RHEL8.10-clang17-dbg (ubi8.10, clang-17.0.6, Debug)
# DOCKER_REPOSITORY: geosx/ubi:8.10
# RUNS_ON: ubuntu-22.04
# CMAKE_CXX_COMPILER: clang++
# CMAKE_C_COMPILER: clang
# CMAKE_BUILD_TYPE: Debug

# - name: RHEL8.10-clang17-rel (ubi8.10, clang-17.0.6, Release)
# DOCKER_REPOSITORY: geosx/ubi:8.10
# RUNS_ON: ubuntu-22.04
# CMAKE_CXX_COMPILER: clang++
# CMAKE_C_COMPILER: clang
# CMAKE_BUILD_TYPE: Release

# - name: RHEL8.10-gcc13-dbg (ubi8.10, gcc 13.2.1, Debug)
# DOCKER_REPOSITORY: geosx/ubi:8.10
# RUNS_ON: ubuntu-22.04
# CMAKE_CXX_COMPILER: /opt/rh/gcc-toolset-13/root/bin/g++
# CMAKE_C_COMPILER: /opt/rh/gcc-toolset-13/root/bin/gcc
# CMAKE_BUILD_TYPE: Debug

# - name: RHEL8.10-gcc13-rel (ubi8.10, gcc 13.2.1, Release)
# DOCKER_REPOSITORY: geosx/ubi:8.10
# RUNS_ON: ubuntu-22.04
# CMAKE_CXX_COMPILER: /opt/rh/gcc-toolset-13/root/bin/g++
# CMAKE_C_COMPILER: /opt/rh/gcc-toolset-13/root/bin/gcc
# CMAKE_BUILD_TYPE: Release

- name: ubuntu22-gcc11-dbg (ubuntu-22, gcc 11.4.0, Release)
DOCKER_REPOSITORY: geosx/ubuntu:22.04
RUNS_ON: ubuntu-22.04
CMAKE_CXX_COMPILER: /usr/bin/g++
CMAKE_C_COMPILER: /usr/bin/gcc
CMAKE_BUILD_TYPE: Debug

- name: ubuntu22-gcc11-rel (ubuntu-22, gcc 11.4.0, Release)
DOCKER_REPOSITORY: geosx/ubuntu:22.04
RUNS_ON: ubuntu-22.04
CMAKE_CXX_COMPILER: /usr/bin/g++
CMAKE_C_COMPILER: /usr/bin/gcc
CMAKE_BUILD_TYPE: Release

- name: ubuntu22-clang14-dbg (ubuntu-22, clang-14.0.0, Debug)
DOCKER_REPOSITORY: geosx/ubuntu:22.04
RUNS_ON: ubuntu-22.04
CMAKE_CXX_COMPILER: /usr/bin/clang++
CMAKE_C_COMPILER: /usr/bin/clang
CMAKE_BUILD_TYPE: Debug

- name: ubuntu22-clang14-rel (ubuntu-22, clang-14.0.0, Release)
DOCKER_REPOSITORY: geosx/ubuntu:22.04
RUNS_ON: ubuntu-22.04
CMAKE_CXX_COMPILER: /usr/bin/clang++
CMAKE_C_COMPILER: /usr/bin/clang
CMAKE_BUILD_TYPE: Release

# - name: ubuntu22-gcc11-cuda11-rel (ubuntu-22, gcc 11.4.0, cuda-11.8.0, Release)
# DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
# RUNS_ON: streak2
# CMAKE_CXX_COMPILER: /usr/bin/g++
# CMAKE_C_COMPILER: /usr/bin/gcc
# CMAKE_BUILD_TYPE: Release
# ENABLE_CUDA: ON
# CMAKE_CUDA_ARCHITECTURES: "86"
# NPROC: 4
# DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"

# - name: ubuntu22-gcc11-cuda11-dbg (ubuntu-22, gcc 11.4.0, cuda-11.8.0, Debug)
# DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
# RUNS_ON: streak2
# CMAKE_CXX_COMPILER: /usr/bin/g++
# CMAKE_C_COMPILER: /usr/bin/gcc
# CMAKE_BUILD_TYPE: Debug
# ENABLE_CUDA: ON
# CMAKE_CUDA_ARCHITECTURES: "86"
# NPROC: 4
# DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"

# - name: ubuntu22-clang14-cuda11-rel (ubuntu-22, clang-14.0.0, cuda-11.8.0, Release)
# DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
# RUNS_ON: streak2
# CMAKE_CXX_COMPILER: /usr/bin/clang++
# CMAKE_C_COMPILER: /usr/bin/clang
# CMAKE_BUILD_TYPE: Release
# ENABLE_CUDA: ON
# CMAKE_CUDA_ARCHITECTURES: "86"
# NPROC: 4
# DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"

# - name: ubuntu22-clang14-cuda11-dbg (ubuntu-22, clang-14.0.0, cuda-11.8.0, Debug)
# DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
# RUNS_ON: streak2
# CMAKE_CXX_COMPILER: /usr/bin/clang++
# CMAKE_C_COMPILER: /usr/bin/clang
# CMAKE_BUILD_TYPE: Debug
# ENABLE_CUDA: ON
# CMAKE_CUDA_ARCHITECTURES: "86"
# NPROC: 4
# DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"

# - name: RHEL8.10-clang17-cuda12-rel (ubi8.10, clang-17.0.6, cuda-12.4.1, Release)
# DOCKER_REPOSITORY: geosx/ubi:8.10-cuda12.8
# RUNS_ON: streak2
# CMAKE_CXX_COMPILER: clang++
# CMAKE_C_COMPILER: clang
# CMAKE_BUILD_TYPE: Release
# ENABLE_CUDA: ON
# CMAKE_CUDA_ARCHITECTURES: "86"
# NPROC: 4
# DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"

# - name: RHEL8.10-gcc13-cuda12-rel (ubi8.10, gcc 13.2.1, cuda-12.4.1, Release)
# DOCKER_REPOSITORY: geosx/ubi:8.10-cuda12.8
# RUNS_ON: streak2
# CMAKE_CXX_COMPILER: /opt/rh/gcc-toolset-13/root/bin/g++
# CMAKE_C_COMPILER: /opt/rh/gcc-toolset-13/root/bin/gcc
# CMAKE_BUILD_TYPE: Release
# ENABLE_CUDA: ON
# CMAKE_CUDA_ARCHITECTURES: "86"
# NPROC: 4
# DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"

steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.6
with:
submodules: true
lfs: false

- name: Print environment
run: printenv

- name: Build and test
env:
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
CMAKE_CXX_COMPILER: ${{ matrix.CMAKE_CXX_COMPILER }}
CMAKE_C_COMPILER: ${{ matrix.CMAKE_C_COMPILER }}
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }}
ENABLE_CUDA: ${{ matrix.ENABLE_CUDA }}
CMAKE_CUDA_ARCHITECTURES: ${{ matrix.CMAKE_CUDA_ARCHITECTURES }}
NPROC: ${{ matrix.NPROC }}
BUILD_AND_TEST_ARGS: ${{ matrix.BUILD_AND_TEST_ARGS }} --build-exe
DOCKER_RUN_ARGS: ${{ matrix.DOCKER_RUN_ARGS }}
HOST_CONFIG: hostconfigs/environment.cmake
run: ./scripts/ci_build_and_test.sh

code_coverage:
runs-on: ubuntu-22.04
needs:
- get_docker_image_tag_hash
steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.6
with:
submodules: true
lfs: false
- name: run code coverage
env:
DOCKER_REPOSITORY: geosx/ubuntu:22.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
HOST_CONFIG: hostconfigs/environment.cmake
CMAKE_CXX_COMPILER: /usr/bin/g++
CMAKE_C_COMPILER: /usr/bin/gcc
CMAKE_BUILD_TYPE: Debug
BUILD_AND_TEST_ARGS: "--build-exe --code-coverage"
run: ./scripts/ci_build_and_test.sh
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: hpcReact_coverage.info.cleaned
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


check_that_all_jobs_succeeded:
runs-on: ubuntu-22.04
needs:
- get_docker_image_tag_hash
- linux_builds
- doxygen_check
- code_checks
if: ${{ always() }}
env:
RETURN_VAL: |
${{
needs.linux_builds.result == 'success' &&
needs.doxygen_check.result == 'success' &&
needs.code_checks.result == 'success'
}}
steps:
- name: PR Success
if: ${{ contains(env.RETURN_VAL, 'true') }}
run: "true"
- name: PR Failure
if: ${{ contains(env.RETURN_VAL, 'false') }}
run: "false"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build*
cmake/blt*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cmake/blt"]
path = cmake/blt
url = git@github.com:LLNL/blt.git
44 changes: 44 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
cmake_minimum_required( VERSION 3.23.1 )

# Set version number
set( HPCREACT_VERSION_MAJOR 0 )
set( HPCREACT_VERSION_MINOR 1 )
set( HPCREACT_VERSION_PATCHLEVEL 0 )

# check if this is build as a submodule or a separate project
get_directory_property( parent_dir PARENT_DIRECTORY )
if(parent_dir)
set( is_submodule ON )
else()
set( is_submodule OFF )
endif()

if( NOT is_submodule )
message( "not a submodule")
project( hpcReact LANGUAGES CXX C )

set( BLT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/cmake/blt CACHE PATH "" )
set( BLT_CXX_STD "c++17" CACHE STRING "Version of C++ standard" FORCE )
set( ENABLE_WARNINGS_AS_ERRORS "ON" CACHE PATH "" )

option( HPCREACT_ENABLE_UNIT_TESTS "Builds tests" ON )

option( ENABLE_CUDA "Build with CUDA" OFF )
option( ENABLE_HIP "Build with HIP" OFF )

endif()

include( ${BLT_SOURCE_DIR}/SetupBLT.cmake )

include( cmake/CMakeBasics.cmake )
include( cmake/Macros.cmake )
#include( cmake/Config.cmake )


add_subdirectory( src )

# if( HPCREACT_ENABLE_DOCS )
# add_subdirectory( docs )
# endif()


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# HPCReact
# hpcReact
Package for modeling of chemical reactions on High Performance Computing Systems
29 changes: 29 additions & 0 deletions cmake/CMakeBasics.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
set(CMAKE_ENABLE_EXPORTS ON)

if( CMAKE_BUILD_TYPE MATCHES "Debug" )

else()

endif()

option( ENABLE_COVERAGE "Enable coverage" OFF )
#set( SHIVA_BUILD_OBJ_LIBS OFF CACHE BOOL "" )


# if( CMAKE_CXX_STANDARD IN_LIST "98; 11; 14" )
# MESSAGE(FATAL_ERROR "Shiva requires at least c++17")
# endif()


blt_append_custom_compiler_flag( FLAGS_VAR CMAKE_CXX_FLAGS DEFAULT "${OpenMP_CXX_FLAGS}")
blt_append_custom_compiler_flag( FLAGS_VAR CMAKE_CXX_FLAGS
GNU "-Wpedantic -pedantic-errors -Wshadow -Wfloat-equal -Wcast-align -Wcast-qual"
CLANG "-Wpedantic -pedantic-errors -Wshadow -Wfloat-equal -Wcast-align -Wcast-qual -Wabsolute-value"
)

blt_append_custom_compiler_flag( FLAGS_VAR CMAKE_CXX_FLAGS_DEBUG
GNU ""
CLANG "-fstandalone-debug"
)

set( CAMP_ENABLE_TESTS OFF CACHE BOOL "")
Loading
Loading