forked from NOAA-EMC/WW3
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/gpu/w3srce_refactor' into feature/gpu/st4
* feature/gpu/w3srce_refactor: Enable doxygen documentation in the cmake build system (NOAA-EMC#1281) Simplify MPI ifdefs in subroutine W3MPIO (NOAA-EMC#1266) Add depth scaling value to SMC regression tests. (NOAA-EMC#1264) Updates to NCEP regtests for Orion Rocky9 OS(NOAA-EMC#1263) Fix code stability issue in ww3_outp (NOAA-EMC#1258) Fix GNU regtest CI failure (NOAA-EMC#1253) Add option to use NetCDF output instead of binary for point output (NOAA-EMC#1230)
- Loading branch information
Showing
29 changed files
with
1,613 additions
and
757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: regtest_gnu | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
# Cancel in-progress workflows when pushing to a branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
cache_key: gnu11-1 | ||
CC: gcc-10 | ||
FC: gfortran-10 | ||
CXX: g++-10 | ||
|
||
|
||
# Split into a steup step, and a WW3 build step which | ||
# builds multiple switches in a matrix. The setup is run once and | ||
# the environment is cached so each build of WW3 can share the dependencies. | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout-ww3 | ||
if: steps.cache-env.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ww3 | ||
# Cache spack, OASIS, and compiler | ||
# No way to flush Action cache, so key may have # appended | ||
- name: cache-env | ||
id: cache-env | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
spack | ||
~/.spack | ||
work_oasis3-mct | ||
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_gnu.yaml') }} | ||
|
||
# Build WW3 spack environment | ||
- name: install-dependencies-with-spack | ||
if: steps.cache-env.outputs.cache-hit != 'true' | ||
run: | | ||
# Install NetCDF, ESMF, g2, etc using Spack | ||
sudo apt install cmake | ||
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git | ||
source spack/share/spack/setup-env.sh | ||
spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml | ||
spack env activate ww3-gnu | ||
spack compiler find | ||
spack external find cmake | ||
spack add [email protected] | ||
spack concretize | ||
spack install --dirty -v | ||
- name: build-oasis | ||
if: steps.cache-env.outputs.cache-hit != 'true' | ||
run: | | ||
source spack/share/spack/setup-env.sh | ||
spack env activate ww3-gnu | ||
export WWATCH3_DIR=${GITHUB_WORKSPACE}/ww3/model | ||
export OASIS_INPUT_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/oasis3-mct | ||
export OASIS_WORK_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct | ||
cd ww3/regtests/ww3_tp2.14/input/oasis3-mct/util/make_dir | ||
cmake . | ||
make VERBOSE=1 | ||
cp -r ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct ${GITHUB_WORKSPACE} | ||
regtest_gnu: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: install-dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install doxygen gcovr valgrind | ||
- name: checkout-ww3 | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ww3 | ||
|
||
- name: cache-env | ||
id: cache-env | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
spack | ||
~/.spack | ||
work_oasis3-mct | ||
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_gnu.yaml') }} | ||
|
||
- name: build-ww3 | ||
run: | | ||
source spack/share/spack/setup-env.sh | ||
spack env activate ww3-gnu | ||
set -x | ||
cd ww3 | ||
export CC=mpicc | ||
export FC=mpif90 | ||
export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct | ||
# mkdir build && cd build | ||
export LD_LIBRARY_PATH="/home/runner/work/WW3/WW3/spack/var/spack/environments/ww3-gnu/.spack-env/view/:$LD_LIBRARY_PATH" | ||
# cmake -DSWITCH=${GITHUB_WORKSPACE}/ww3/regtests/unittests/data/switch.io -DCMAKE_BUILD_TYPE=Debug .. | ||
# make -j2 VERBOSE=1 | ||
cd ${GITHUB_WORKSPACE}/ww3 | ||
ls -l | ||
${GITHUB_WORKSPACE}/ww3/model/bin/ww3_from_ftp.sh -k | ||
cd regtests | ||
./bin/run_cmake_test -o all -S -T -s PR1_MPI -w work_PR1_MPI -f -p mpirun -n 24 ../model ww3_tp2.5 | ||
cd ww3_tp2.5 | ||
ls -l | ||
cd work_PR1_MPI | ||
pwd | ||
ls -l | ||
# ncdump -h out_pnt.ww3.nc > ncdump_out.txt | ||
# cat ncdump_out.txt | ||
# pwd | ||
# cat ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt | ||
# cmp ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt ncdump_out.txt | ||
- name: cache-data | ||
id: cache-data | ||
uses: actions/cache@v3 | ||
with: | ||
path: ww3/ww3_from_ftp.v7.14.1.tar.gz | ||
key: ww3_from_ftp.v7.14.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
EnableDoxygen(docs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Doxygen documentation- Matt Masarik 24-Jul-2024. | ||
function(EnableDoxygen outdir) | ||
find_package(Doxygen REQUIRED) | ||
if (NOT DOXYGEN_FOUND) | ||
add_custom_target(enable_docs | ||
COMMAND false | ||
COMMENT "Doxygen not found") | ||
return() | ||
endif() | ||
|
||
set(src_input "${CMAKE_SOURCE_DIR}/model/src") | ||
set(doc_output "${CMAKE_BINARY_DIR}/${outdir}") | ||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${outdir}/html) | ||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in | ||
${CMAKE_BINARY_DIR}/${outdir}/Doxyfile @ONLY) | ||
set(DOXYGEN_GENERATE_HTML YES) | ||
set(DOXYGEN_QUIET YES) | ||
add_custom_target(enable_docs | ||
COMMAND | ||
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/${outdir}/Doxyfile | ||
WORKING_DIRECTORY | ||
${CMAKE_BINARY_DIR}/${outdir} | ||
COMMENT | ||
"Generate Doxygen HTML documentation") | ||
message("-- Doxygen HTML index page: " | ||
${CMAKE_BINARY_DIR}/${outdir}/html/index.html) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.