Skip to content

Commit

Permalink
merging in main to hollmann_dt
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeidler3 committed Nov 4, 2024
2 parents 6cca1e0 + a530576 commit 73d385e
Show file tree
Hide file tree
Showing 93 changed files with 3,375 additions and 2,745 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/spack.yml → .github/workflows/agate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: spack
name: agate
on: [ push, workflow_dispatch ]

jobs:
Expand Down Expand Up @@ -46,6 +46,9 @@ jobs:
needs: job_one
runs-on: ubuntu-latest
steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: grab main project
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -83,7 +86,7 @@ jobs:
cd ./KORC
./build.sh
cd ./build && ctest --output-on-failure
cd ./build && ctest -j ${{ steps.cpu-cores.outputs.count }} --output-on-failure
- name: Show Cache
if: failure()
Expand All @@ -92,6 +95,6 @@ jobs:
tree -L 2
pwd
ls -la
cat ./KORC/CMakeCache.txt
cat ./KORC/build/CMakeCache.txt
29 changes: 29 additions & 0 deletions .github/workflows/cachepoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Workflow runs weekly to prevent GH dependency cache eviction
#
# GitHub Actions run in UTC time
#

name: cachepoke
on:
schedule:
- cron: '47 18 * * SAT' # Trigger workflow every Sat at 18:47 UTC

jobs:
job_one:
runs-on: ubuntu-latest
steps:
- name: spack cache
id: spack-cache
uses: actions/cache@v3
with:
key: spack-cache-sandlot-6
path: |
./spack
~/.spack
#
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
#
86 changes: 0 additions & 86 deletions .github/workflows/olivine.yml

This file was deleted.

184 changes: 184 additions & 0 deletions .github/workflows/onyx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
---

name: onyx
on:
issue_comment:
types: [ created ]

jobs:

job_verify_actor:
runs-on: ubuntu-latest
steps:
- name: Verify Actor
id: verify_actor
env:
ACTOR_TOKEN: ${{ secrets.TOKENIZER }}${{ github.actor }}${{ secrets.TOKENIZER }}
ACTOR_ALLOW: ${{ secrets.ACTORLIST }}
if: contains( env.ACTOR_ALLOW, env.ACTOR_TOKEN )
run: |
echo "allowed=true" >> $GITHUB_OUTPUT
- name: Assert Fail
if: ${{ steps.verify_actor.outputs.allowed != 'true' }}
run: |
echo "Actor '${{ github.actor }}' not allowed"
exit 1
outputs:
allowed: ${{ steps.verify_actor.outputs.allowed }}


job_setup_workdir:
runs-on: [ self-hosted ]
needs: [ job_verify_actor ]
steps:
- name: GitHub API Request
id: api_request
uses: octokit/[email protected]
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout PR branch
uses: actions/checkout@v4
with:
token: "${{ secrets.GITHUB_TOKEN }}"
repository: "${{ fromJson(steps.api_request.outputs.data).head.repo.full_name }}"
ref: "${{ fromJson(steps.api_request.outputs.data).head.ref }}"
path: './KORC'


job_build_cpu:
if: true
runs-on: [ self-hosted ]
needs: [ job_verify_actor, job_setup_workdir ]
defaults:
run:
shell: bash -leo pipefail {0}
#
# by default github actions will run commands in a non-interactive shell
# setting 'bash -leo pipefail {0}' will cause it to run interactively
#

steps:
- name: run ci_stub/onyx_job_build_cpu.sh
run: |
./KORC/ci_stub/onyx_job_build_cpu.sh
job_setup_spack:
if: true
runs-on: [ self-hosted ]
needs: [ job_verify_actor, job_setup_workdir ]
defaults:
run:
shell: bash -leo pipefail {0}
#
# by default github actions will run commands in a non-interactive shell
# setting 'bash -leo pipefail {0}' will cause it to run interactively
#

steps:
- name: show actor status
run: |
echo "${{ needs.job_verify_actor.outputs.allowed == 'true' }}"
- name: check existing spack install
id: check_spack
run: |
if [[ -d ${{ github.workspace }}/spack ]]; then
echo "exist=true" >> $GITHUB_OUTPUT
fi
- if: ${{ steps.check_spack.outputs.exist != 'true' }}
name: grab spack
uses: actions/checkout@v4
with:
repository: 'spack/spack'
ref: 'v0.22.2'
path: './spack'
#
# git clone --depth=1 --single-branch --branch v0.22.2 https://github.com/spack/spack.git
#

- if: ${{ steps.check_spack.outputs.exist != 'true' }}
name: spack env activate
run: |
. ./spack/share/spack/setup-env.sh
spack env activate ./KORC/spackenv/excl-milan_linux-ubuntu22.04-zen3
spack concretize -f
spack install
# spack install --overwrite
# spack gc -y


job_build_gpu:
if: true
runs-on: [ self-hosted ]
needs: [ job_verify_actor, job_setup_spack, job_setup_workdir ]
defaults:
run:
shell: bash -leo pipefail {0}
#
# by default github actions will run commands in a non-interactive shell
# setting 'bash -leo pipefail {0}' will cause it to run interactively
#

steps:
- name: run ci_stub/onyx_job_build_gpu.sh
run: |
. ./spack/share/spack/setup-env.sh
spack env activate ./KORC/spackenv/excl-milan_linux-ubuntu22.04-zen3
spack install
spack build-env hdf5%[email protected]+fortran~mpi -- ./KORC/ci_stub/onyx_job_build_gpu.sh
job_test_cpu:
if: true
runs-on: [ self-hosted ]
needs: [ job_verify_actor, job_build_cpu, job_setup_workdir ]
defaults:
run:
shell: bash -leo pipefail {0}
#
# by default github actions will run commands in a non-interactive shell
# setting 'bash -leo pipefail {0}' will cause it to run interactively
#

steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: run ci_stub/onyx_job_test_cpu.sh
env:
JOB_COUNT: "${{ steps.cpu-cores.outputs.count }}"
run: |
./KORC/ci_stub/onyx_job_test_cpu.sh
job_test_gpu:
if: true
runs-on: [ self-hosted ]
needs: [ job_verify_actor, job_setup_spack, job_build_gpu, job_setup_workdir ]
defaults:
run:
shell: bash -leo pipefail {0}
#
# by default github actions will run commands in a non-interactive shell
# setting 'bash -leo pipefail {0}' will cause it to run interactively
#

steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: run ci_stub/onyx_job_test_gpu.sh
env:
JOB_COUNT: "${{ steps.cpu-cores.outputs.count }}"
run: |
./KORC/ci_stub/onyx_job_test_gpu.sh
15 changes: 1 addition & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# ignore build directory
/build

# ignore all CMakeFile directories
**/CMakeFiles

# ignore all CmakeCache.txt files
CMakeCache.txt

# ignore all cmake_install.cmake files
cmake_install.cmake

# ignore all Makefile files generated by cmake
Makefile
src/Makefile
Expand All @@ -31,15 +22,11 @@ FIO/m3dc1_lib/makefile
#ignore files in OUT_TEST
**/OUT_TEST

# ignore CTest files
CTestTestfile.cmake
**/Testing

#ignore FIO build and install
/FIO/build
/FIO/install

#ignore all build files
*.o
*.mod
*.a
*.a
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ option (USE_ACC "Use OpenACC" OFF)
option (USE_PSPLINE "Use PSPLINE interpolation" ON)
option (USE_FIO "Use FIO interpolation support" OFF)

set (VALID_PRECISIONS "FLOAT" "DOUBLE")
set (HDF5_PRECISION "DOUBLE" CACHE STRING "FLOAT,DOUBLE")
set_property (CACHE HDF5_PRECISION PROPERTY STRINGS ${VALID_PRECISIONS})

if (HDF5_PRECISION STREQUAL "DOUBLE")
add_compile_options(-DHDF5_DOUBLE_PRESICION)
elseif (HDF5_PRECISION STREQUAL "FLOAT")
add_compile_options(-DHDF5_FLOAT_PRESICION)
else ()
message (FATAL_ERROR "HDF5_PRECISION value \"${HDF5_PRECISION}\" option set to something other than FLOAT or DOUBLE.")
endif ()

#-------------------------------------------------------------------------------
# Sanitizer options
#-------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 73d385e

Please sign in to comment.