Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
drnimbusrain authored Sep 18, 2024
2 parents cfa7fcb + a936459 commit e8701c2
Show file tree
Hide file tree
Showing 86 changed files with 4,843 additions and 3,697 deletions.
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ Do PRs in upstream repositories need to be merged first?
If so add the "waiting for other repos" label and list the upstream PRs
- waiting on noaa-emc/nems/pull/<pr_number>
- waiting on noaa-emc/fv3atm/pull/<pr_number>

# Requirements before merging
- [ ] All new code in this PR is tested by at least one unit test
- [ ] All new code in this PR includes Doxygen documentation
- [ ] All new code in this PR does not add new compilation warnings (check CI output)
47 changes: 39 additions & 8 deletions .github/workflows/GCC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
mpi: ["mpich", "openmpi"]

steps:

- name: checkout-fv3atm
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -59,6 +59,7 @@ jobs:
spack config add "packages:mpi:require:'${{ matrix.mpi }}'"
spack concretize |& tee ${SPACK_ENV}/log.concretize
spack install -j2 --fail-fast
echo "spackrc=$?" >> ${GITHUB_ENV}
spack clean --all
build_fv3atm:
Expand All @@ -73,9 +74,20 @@ jobs:

steps:

- name: install-doxygen
# Only do Doxygen and gcovr build for one job
- name: decide-doc-gcovr-build
run: |
if [[ "${{ matrix.cmake_opts }}" == "-D32BIT=ON" && "${{ matrix.gcc_ver }}" == 12 && "${{ matrix.mpi }}" == mpich ]]; then
echo 'devbuild=ON' | tee -a ${GITHUB_ENV}
echo 'gcov_cmake="-DCMAKE_Fortran_FLAGS=-fprofile-abs-path -fprofile-arcs -ftest-coverage -O0"' | tee -a ${GITHUB_ENV}
else
echo 'devbuild=OFF' | tee -a ${GITHUB_ENV}
fi
- name: install-utilities
run: |
sudo apt-get install doxygen graphviz
python3 -m pip install gcovr
- name: install-cmake
run: |
Expand Down Expand Up @@ -109,14 +121,34 @@ jobs:
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
cat /home/runner/work/fv3atm/fv3atm/spack-develop/opt/spack/linux-ubuntu22.04-zen2/gcc-12.3.0/fms-2023.04-*/lib/cmake/fms/fms-config.cmake
cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }} -DENABLE_DOCS=ON
cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }} -DENABLE_DOCS=ON ${{ env.gcov_cmake }}
make -j2
ls -l /home/runner/work/fv3atm/fv3atm/fv3atm/io
- uses: actions/upload-artifact@v4
- name: run-tests
run: |
cd $GITHUB_WORKSPACE/build
ctest -j2 --output-on-failure --rerun-failed
- name: get-test-coverage
if: ${{ env.devbuild == 'ON' }}
run: |
cd $GITHUB_WORKSPACE/build
gcovr -r .. -v --html-details --gcov-executable gcov-12 --exclude $GITHUB_WORKSPACE/fv3atm/tests --exclude $GITHUB_WORKSPACE/fv3atm/stochastic_physics_repo --exclude $GITHUB_WORKSPACE/fv3atm/build/ccpp --exclude $GITHUB_WORKSPACE/fv3atm/ccpp/physics --exclude $GITHUB_WORKSPACE/fv3atm/ccpp/framework --exclude $GITHUB_WORKSPACE/fv3atm/atmos_cubed_sphere --exclude CMakeFiles --print-summary -o test-coverage.html
- name: upload-test-coverage
uses: actions/upload-artifact@v4
if: ${{ env.devbuild == 'ON' }}
with:
name: test-coverage-fv3atm-${{ github.sha }}
path: |
${{ github.workspace }}/build/*.html
${{ github.workspace }}/build/*.css
- name: upload-docs
uses: actions/upload-artifact@v4
if: ${{ env.devbuild == 'ON' }}
with:
name: docs-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}-${{ matrix.cmake_opts }}
name: docs-fv3atm
path: |
build/docs/html
Expand All @@ -126,4 +158,3 @@ jobs:
with:
name: ccpp_prebuild_logs-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}-${{ matrix.cmake_opts }}
path: ${{ github.workspace }}/build/ccpp/ccpp_prebuild.*

14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set(USE_GFSL63 ON)
if(MOVING_NEST)
set(MOVING_NEST ON)
endif()
if(HYDRO)
set(HYDRO ON)
endif()
add_subdirectory(atmos_cubed_sphere)
target_compile_definitions(fv3 PRIVATE BYPASS_BREED_SLP_INLINE)

Expand All @@ -61,7 +64,11 @@ if(NOT PARALLEL_NETCDF)
endif()

if(MOVING_NEST)
list(APPEND _fv3atm_defs_private MOVING_NEST MOIST_CAPPA USE_COND)
list(APPEND _fv3atm_defs_private MOVING_NEST)
if(NOT HYDRO)
list(APPEND _fv3atm_defs_private MOIST_CAPPA USE_COND)
endif()

if(DEBUG)
list(APPEND _fv3atm_defs_private DEBUG)
endif()
Expand Down Expand Up @@ -157,6 +164,11 @@ if(OPENMP)
target_link_libraries(fv3atm PUBLIC OpenMP::OpenMP_Fortran)
endif()

if(BUILD_TESTING)
include(CTest)
add_subdirectory(tests)
endif()

###############################################################################
### Install
###############################################################################
Expand Down
Loading

0 comments on commit e8701c2

Please sign in to comment.