This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
Update docs to reflect current way we comput the viscous stress #251
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
name: PeleLM-CI | |
on: | |
push: | |
branches: [development] | |
pull_request: | |
branches: [development] | |
jobs: | |
#Formatting: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: DoozyX/[email protected] | |
# with: | |
# source: './Source ./Exec' | |
# exclude: '.' | |
# extensions: 'H,h,cpp' | |
# clangFormatVersion: 11 | |
CMake: | |
#needs: Formatting | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
# Not easy to get fortran found by CMake on MacOS here | |
#os: [ubuntu-latest, macos-latest] | |
os: [ubuntu-latest] | |
include: | |
#- os: macos-latest | |
# install_deps: brew install open-mpi automake | |
# comp: llvm | |
# procs: $(sysctl -n hw.ncpu) | |
# mpipreflags: -DMPIEXEC_PREFLAGS:STRING=--oversubscribe | |
- os: ubuntu-latest | |
install_deps: sudo apt-get install mpich libmpich-dev | |
comp: gnu | |
procs: $(nproc) | |
mpipreflags: | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{github.token}} | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Setup | |
run: | | |
echo "NPROCS=${{matrix.procs}}" >> $GITHUB_ENV | |
cmake -E make_directory ${{runner.workspace}}/deps | |
- name: Dependencies | |
run: | | |
# Install MPI | |
${{matrix.install_deps}} | |
## Install MetaPhysicL | |
#cd ${{runner.workspace}}/deps | |
#git clone --recursive https://github.com/roystgnr/MetaPhysicL.git ${{runner.workspace}}/deps/MetaPhysicL | |
#cd ${{runner.workspace}}/deps/MetaPhysicL | |
#./bootstrap | |
#./configure --prefix="${{runner.workspace}}/deps/install/MetaPhysicL" | |
#make -j ${{env.NPROCS}} | |
#make install | |
## Install MASA | |
#cd ${{runner.workspace}}/deps | |
#git clone --recursive https://github.com/manufactured-solutions/MASA.git ${{runner.workspace}}/deps/MASA | |
#cd ${{runner.workspace}}/deps/MASA | |
#./bootstrap | |
#./configure CXX='mpicxx -std=c++11' CC=mpicc \ | |
# METAPHYSICL_DIR="${{runner.workspace}}/deps/install/MetaPhysicL" \ | |
# --prefix="${{runner.workspace}}/deps/install/MASA" | |
#make -j ${{env.NPROCS}} | |
#make install | |
# Install Python packages | |
python -m pip install --upgrade pip | |
pip install nose numpy pandas | |
- name: Configure | |
run: | | |
for DIM in 3; do \ | |
if [ "${DIM}" != '3' ]; then WARNINGS=OFF; else WARNINGS=ON; fi; \ | |
printf "\n-------- Configuring ${DIM}D --------\n"; \ | |
cmake -B${{runner.workspace}}/build-${DIM}d-${{matrix.os}} \ | |
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \ | |
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ | |
-DPELELM_DIM:STRING=${DIM} \ | |
-DPELELM_ENABLE_MPI:BOOL=ON \ | |
${{matrix.mpipreflags}} \ | |
-DPELELM_ENABLE_TESTS:BOOL=ON \ | |
-DPELELM_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ | |
-DPELELM_ENABLE_MASA:BOOL=OFF \ | |
-DPELELM_ENABLE_ALL_WARNINGS:BOOL=${WARNINGS} \ | |
${{github.workspace}}; \ | |
done | |
- name: Build | |
run: | | |
for DIM in 3; do \ | |
printf "\n-------- Building ${DIM}D --------\n"; \ | |
cmake --build ${{runner.workspace}}/build-${DIM}d-${{matrix.os}} \ | |
--parallel ${{env.NPROCS}} 2>&1 | tee -a ${{runner.workspace}}/build-output.txt; \ | |
done | |
- name: Report | |
run: | | |
#echo "::add-matcher::.github/problem-matchers/gcc.json" | |
cat ${{runner.workspace}}/build-output.txt | egrep "warning:|error:" | sort | uniq | sort -nr | \ | |
awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' | |
##- name: Test | |
## run: | | |
## for DIM in 3; do \ | |
## printf "\n-------- Testing ${DIM}D --------\n"; \ | |
## cd ${{runner.workspace}}/build-${DIM}d-${{matrix.os}}; \ | |
## ctest -j ${{env.NPROCS}} -LE no-ci --output-on-failure; \ | |
## done | |
#GNUmake: | |
# needs: Formatting | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Cancel previous runs | |
# uses: styfle/[email protected] | |
# with: | |
# access_token: ${{github.token}} | |
# - uses: actions/checkout@v2 | |
# with: | |
# submodules: true | |
# - name: Setup | |
# run: | | |
# echo "NPROCS=$(nproc)" >> $GITHUB_ENV | |
# printf "CC=gcc-8\nCXX=g++-8\nFC=gfortran-8\nF90=gfortran-8" >> ./Submodules/AMReX/Tools/GNUMake/Make.local | |
# - name: PMF debug make | |
# working-directory: ./ExecCpp/RegTests/PMF | |
# run: make -j ${{env.NPROCS}} COMP=gnu USE_MPI=FALSE DEBUG=TRUE | |
# - name: PMF debug test | |
# working-directory: ./ExecCpp/RegTests/PMF | |
# run: ./Pele3d.gnu.DEBUG.ex tests/pmf-1/pmf-1.i max_step=2 amr.plot_files_output=0 amr.checkpoint_files_output=0 | |
# - name: EB debug build | |
# working-directory: ./ExecCpp/RegTests/EB-C10 | |
# run: make -j ${{env.NPROCS}} COMP=gnu USE_MPI=FALSE DEBUG=TRUE | |
# - name: EB debug test | |
# working-directory: ./ExecCpp/RegTests/EB-C10 | |
# run: ./Pele3d.gnu.DEBUG.ex tests/eb-c10/eb-c10.i max_step=2 amr.plot_files_output=0 amr.checkpoint_files_output=0 | |
#CUDA: | |
# #needs: Formatting | |
# runs-on: ubuntu-latest | |
# name: CUDA v${{matrix.cuda_ver}} | |
# strategy: | |
# matrix: | |
# #cuda_pkg: [11-1, 10-2] | |
# cuda_pkg: [11-1] | |
# include: | |
# - cuda_ver: "11.1" | |
# cuda_pkg: 11-1 | |
# cuda_extra: libcurand-dev-11-1 cuda-cupti-dev-11-1 libcusparse-dev-11-1 libcusolver-dev-11-1 libcublas-dev-11-1 | |
# #- cuda_ver: "10.2" | |
# # cuda_pkg: 10-2 | |
# # cuda_extra: cuda-curand-dev-10-2 cuda-cupti-dev-10-2 | |
# steps: | |
# - name: Cancel previous runs | |
# uses: styfle/[email protected] | |
# with: | |
# access_token: ${{github.token}} | |
# - uses: actions/checkout@v2 | |
# with: | |
# submodules: true | |
# - name: Dependencies | |
# run: | | |
# export DEBIAN_FRONTEND=noninteractive | |
# wget -q -O - https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | sudo apt-key add - | |
# echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list | |
# echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/nvidia-ml.list | |
# sudo apt-get update | |
# sudo apt-get install -y --no-install-recommends \ | |
# libopenmpi-dev cuda-command-line-tools-${{matrix.cuda_pkg}} \ | |
# cuda-compiler-${{matrix.cuda_pkg}} cuda-minimal-build-${{matrix.cuda_pkg}} \ | |
# cuda-nvml-dev-${{matrix.cuda_pkg}} cuda-nvtx-${{matrix.cuda_pkg}} ${{matrix.cuda_extra}} | |
# - name: Configure | |
# run: | | |
# echo "NPROCS=$(nproc)" >> $GITHUB_ENV | |
# export PATH=/usr/local/nvidia/bin:/usr/local/cuda-${{matrix.cuda_ver}}/bin:${PATH} | |
# export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda-${{matrix.cuda_ver}}/lib:${LD_LIBRARY_PATH} | |
# cmake -Bbuild-${{matrix.cuda_pkg}} \ | |
# -DPELELM_ENABLE_MPI=OFF \ | |
# -DPELELM_ENABLE_CUDA=ON \ | |
# -DAMReX_CUDA_ERROR_CAPTURE_THIS:BOOL=ON \ | |
# -DAMReX_CUDA_ARCH=Volta \ | |
# ${{github.workspace}} | |
# - name: Build | |
# run: cmake --build build-${{matrix.cuda_pkg}} --parallel ${{env.NPROCS}} | |
cppcheck: | |
#needs: Formatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{github.token}} | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Dependencies | |
run: sudo apt-get install -y cppcheck | |
- name: Configure | |
run: | | |
cmake -B${{runner.workspace}}/build-cppcheck \ | |
-DPELELM_ENABLE_MPI:BOOL=OFF \ | |
-DPELELM_ENABLE_TESTS:BOOL=ON \ | |
-DPELELM_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ | |
-DPELELM_ENABLE_MASA:BOOL=OFF \ | |
-DPELELM_ENABLE_CPPCHECK:BOOL=ON \ | |
${{github.workspace}} | |
- name: Check | |
working-directory: ${{runner.workspace}}/build-cppcheck | |
run: make cppcheck | |
- name: Full report | |
working-directory: ${{runner.workspace}}/build-cppcheck/cppcheck | |
run: cat cppcheck-full-report.txt | |
- name: Short report | |
working-directory: ${{runner.workspace}}/build-cppcheck | |
run: | | |
#echo "::add-matcher::.github/problem-matchers/cppcheck.json" | |
cat cppcheck-warnings.txt | |
clang-tidy: | |
#needs: Formatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{github.token}} | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Dependencies | |
run: | | |
sudo apt-get install -y clang-tidy-10 | |
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-10 100 | |
- name: Configure | |
run: | | |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV | |
cmake -B${{runner.workspace}}/build-clang-tidy \ | |
-DCMAKE_CXX_COMPILER:STRING=clang++ \ | |
-DCMAKE_C_COMPILER:STRING=clang \ | |
-DCMAKE_Fortran_COMPILER:STRING=gfortran \ | |
-DPELELM_ENABLE_MPI:BOOL=OFF \ | |
-DPELELM_ENABLE_TESTS:BOOL=ON \ | |
-DPELELM_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ | |
-DPELELM_ENABLE_MASA:BOOL=OFF \ | |
-DPELELM_ENABLE_CLANG_TIDY:BOOL=ON \ | |
${{github.workspace}} | |
- name: Check | |
working-directory: ${{runner.workspace}}/build-clang-tidy | |
run: | | |
cmake --build . --parallel ${{env.NPROCS}} 2> clang-tidy-full-report.txt | |
cat clang-tidy-full-report.txt | grep "warning:" | \ | |
egrep -v "amrex|sundials|PelePhysics|IAMR|AMReX-Hydro|googletest" | sort | uniq | sort -nr | \ | |
awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > clang-tidy-warnings.txt | |
- name: Full report | |
working-directory: ${{runner.workspace}}/build-clang-tidy | |
run: cat clang-tidy-full-report.txt | |
- name: Short report | |
working-directory: ${{runner.workspace}}/build-clang-tidy | |
run: | | |
#echo "::add-matcher::.github/problem-matchers/gcc.json" | |
cat clang-tidy-warnings.txt |