Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4157d7a 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed May 21, 2024
0 parents commit ee36316
Show file tree
Hide file tree
Showing 99 changed files with 13,265 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ba84d17926dce8878d80a0691be1baf6
tags: 645f666f9bcd5a90fca523b33c5a78b7
18 changes: 18 additions & 0 deletions .github/problem-matchers/gcc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"__comment": "Taken from vscode-cpptools's Extension/package.json gcc rule",
"problemMatcher": [
{
"owner": "gcc-problem-matcher",
"pattern": [
{
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
40 changes: 40 additions & 0 deletions .github/problem-matchers/sphinx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"problemMatcher": [
{
"owner": "sphinx-problem-matcher",
"pattern": [
{
"regexp": "^(.*):(\\d+):\\s+(\\w*):\\s+(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
},
{
"owner": "sphinx-problem-matcher-loose",
"pattern": [
{
"_comment": "A bit of a looser pattern, doesn't look for line numbers, just looks for file names relying on them to start with / and end with .rst",
"regexp": "(\/.*\\.rst):\\s+(\\w*):\\s+(.*)$",
"file": 1,
"severity": 2,
"message": 3
}
]
},
{
"owner": "sphinx-problem-matcher-loose-no-severity",
"pattern": [
{
"_comment": "Looks for file names ending with .rst and line numbers but without severity",
"regexp": "^(.*\\.rst):(\\d+):(.*)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
189 changes: 189 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: PelePhysics
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: './Eos ./Transport ./Reactions ./Source ./Utility ./Testing ./Support/Fuego/Mechanism/Models'
exclude: '.'
extensions: 'H,h,cpp'
clangFormatVersion: 13

Pythia:
needs: Formatting
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]
poetry-version: [1.1.7]
defaults:
run:
working-directory: ${{github.workspace}}/Support/Fuego/Pythia
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{matrix.python-version}}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{matrix.poetry-version}}
- name: Install Dependencies using Poetry
run: poetry install
- name: Formatting with black
run: poetry run black --check .
- name: Sort imports with isort
run: poetry run isort --check-only --diff .
- name: Run tests
run: poetry run bash -c "cd ../Mechanism/Models/air && ./make-mechanism.sh"

Transport-EOS-Reactions:
needs: Formatting
runs-on: ubuntu-latest
strategy:
matrix:
comp: [gnu, llvm, cuda, hip, dpcpp]
include:
- comp: gnu
amrex_build_args: 'COMP=gnu'
dependency_cmds:
- comp: llvm
amrex_build_args: 'COMP=llvm'
dependency_cmds:
- comp: cuda
amrex_build_args: 'COMP=gnu USE_CUDA=TRUE'
dependency_cmds: '.github/workflows/dependencies/dependencies_cuda.sh'
- comp: hip
amrex_build_args: 'USE_HIP=TRUE AMD_ARCH=gfx908 LIBRARY_LOCATIONS=/opt/rocm/lib'
dependency_cmds: '.github/workflows/dependencies/dependencies_hip.sh'
- comp: dpcpp
amrex_build_args: 'USE_DPCPP=TRUE'
dependency_cmds: '.github/workflows/dependencies/dependencies_dpcpp.sh'
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{github.token}}
- name: Checkout PelePhysics
uses: actions/checkout@v2
with:
path: PelePhysics-${{matrix.comp}}
- name: Checkout AMReX
uses: actions/checkout@v2
with:
repository: AMReX-Codes/amrex
path: AMReX-${{matrix.comp}}
- name: Set Environment Variables
run: |
echo "AMREX_HOME=${{github.workspace}}/AMReX-${{matrix.comp}}" >> $GITHUB_ENV
echo "PELE_PHYSICS_HOME=${{github.workspace}}/PelePhysics-${{matrix.comp}}" >> $GITHUB_ENV
echo "TRANSPORT_WORKING_DIRECTORY=${{github.workspace}}/PelePhysics-${{matrix.comp}}/Testing/Exec/TranEval" >> $GITHUB_ENV
echo "EOS_WORKING_DIRECTORY=${{github.workspace}}/PelePhysics-${{matrix.comp}}/Testing/Exec/EosEval" >> $GITHUB_ENV
echo "REACT_WORKING_DIRECTORY=${{github.workspace}}/PelePhysics-${{matrix.comp}}/Testing/Exec/ReactEval" >> $GITHUB_ENV
echo "IGNDELAY_WORKING_DIRECTORY=${{github.workspace}}/PelePhysics-${{matrix.comp}}/Testing/Exec/IgnitionDelay" >> $GITHUB_ENV
echo "NPROCS=$(nproc)" >> $GITHUB_ENV
if [ "${{matrix.comp}}" == 'cuda' ]; then \
echo "CUDA_HOME=/usr/local/cuda-11.2" >> $GITHUB_ENV; \
echo "LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV; \
echo "/usr/local/cuda-11.2/bin" >> $GITHUB_PATH; \
fi
- name: Dependencies
working-directory: ${{env.TRANSPORT_WORKING_DIRECTORY}}
run: |
if [ "${{matrix.comp}}" == 'cuda' ]; then \
${{github.workspace}}/PelePhysics-${{matrix.comp}}/${{matrix.dependency_cmds}}; \
echo "CUDA_HOME=${CUDA_HOME}"; \
ls ${CUDA_HOME} > /dev/null; \
which nvcc || echo "nvcc not in PATH!"; \
fi
if [ "${{matrix.comp}}" == 'hip' ]; then \
${{github.workspace}}/PelePhysics-${{matrix.comp}}/${{matrix.dependency_cmds}}; \
source /etc/profile.d/rocm.sh
which hipcc || echo "hipcc not in PATH!"; \
fi
if [ "${{matrix.comp}}" == 'dpcpp' ]; then \
${{github.workspace}}/PelePhysics-${{matrix.comp}}/${{matrix.dependency_cmds}}; \
source /opt/intel/oneapi/setvars.sh || true
which dpcpp || echo "dpcpp not in PATH!"; \
fi
cmake --version
make TPL ${{matrix.amrex_build_args}};
- name: Test Transport
working-directory: ${{env.TRANSPORT_WORKING_DIRECTORY}}
run: |
echo "::add-matcher::${{github.workspace}}/PelePhysics-${{matrix.comp}}/.github/problem-matchers/gcc.json"
if [ "${{matrix.comp}}" == 'hip' ]; then source /etc/profile.d/rocm.sh; fi;
if [ "${{matrix.comp}}" == 'dpcpp' ]; then source /opt/intel/oneapi/setvars.sh || true; fi;
for TYPE in Constant Simple Sutherland; do \
printf "\n-------- ${TYPE} --------\n"; \
make -j ${{env.NPROCS}} Transport_Model=${TYPE} TINY_PROFILE=TRUE ${{matrix.amrex_build_args}}; \
if [ "${{matrix.comp}}" == 'gnu' ] || [ "${{matrix.comp}}" == 'llvm' ]; then \
./Pele2d.${{matrix.comp}}.TPROF.ex inputs.2d_${TYPE}; \
fi; \
make realclean; \
if [ $? -ne 0 ]; then exit 1; fi; \
done
- name: Test EOS
working-directory: ${{env.EOS_WORKING_DIRECTORY}}
run: |
echo "::add-matcher::${{github.workspace}}/PelePhysics-${{matrix.comp}}/.github/problem-matchers/gcc.json"
if [ "${{matrix.comp}}" == 'hip' ]; then source /etc/profile.d/rocm.sh; fi;
if [ "${{matrix.comp}}" == 'dpcpp' ]; then source /opt/intel/oneapi/setvars.sh || true; fi;
for TYPE in Fuego GammaLaw; do \
if [ "${TYPE}" == 'Fuego' ]; then CHEMISTRY=LiDryer; else CHEMISTRY=Null; fi; \
printf "\n-------- ${TYPE} --------\n"; \
make -j ${{env.NPROCS}} Eos_Model=${TYPE} Chemistry_Model=${CHEMISTRY} TINY_PROFILE=TRUE ${{matrix.amrex_build_args}}; \
if [ "${{matrix.comp}}" == 'gnu' ] || [ "${{matrix.comp}}" == 'llvm' ]; then \
./Pele2d.${{matrix.comp}}.TPROF.ex inputs.2d; \
fi; \
make realclean; \
if [ $? -ne 0 ]; then exit 1; fi; \
done
- name: Test Reactions
working-directory: ${{env.REACT_WORKING_DIRECTORY}}
run: |
echo "::add-matcher::${{github.workspace}}/PelePhysics-${{matrix.comp}}/.github/problem-matchers/gcc.json"
if [ "${{matrix.comp}}" == 'hip' ]; then source /etc/profile.d/rocm.sh; fi;
if [ "${{matrix.comp}}" == 'dpcpp' ]; then source /opt/intel/oneapi/setvars.sh || true; fi;
make -j ${{env.NPROCS}} Eos_Model=Fuego Chemistry_Model=drm19 TINY_PROFILE=TRUE ${{matrix.amrex_build_args}}
if [ "${{matrix.comp}}" == 'gnu' ] || [ "${{matrix.comp}}" == 'llvm' ]; then \
for TYPE in Cvode Arkode RK64; do \
printf "\n-------- ${TYPE} --------\n"; \
./Pele3d.${{matrix.comp}}.TPROF.ex inputs.3d_Array4 ode.dt=1.e-05 ode.ndt=100 chem_integrator="Reactor${TYPE}"; \
./Pele3d.${{matrix.comp}}.TPROF.ex inputs.3d_1dArray ode.dt=1.e-05 ode.ndt=100 chem_integrator="Reactor${TYPE}"; \
if [ $? -ne 0 ]; then exit 1; fi; \
done \
fi;
make realclean
make -j ${{env.NPROCS}} Eos_Model=Fuego Chemistry_Model=LiDryer TINY_PROFILE=TRUE ${{matrix.amrex_build_args}}
if [ "${{matrix.comp}}" == 'gnu' ] || [ "${{matrix.comp}}" == 'llvm' ]; then \
for TYPE in Cvode Arkode RK64; do \
printf "\n-------- ${TYPE} --------\n"; \
./Pele3d.${{matrix.comp}}.TPROF.ex inputs.3d_Array4 ode.dt=1.e-05 ode.ndt=100 chem_integrator="Reactor${TYPE}"; \
./Pele3d.${{matrix.comp}}.TPROF.ex inputs.3d_1dArray ode.dt=1.e-05 ode.ndt=100 chem_integrator="Reactor${TYPE}"; \
if [ $? -ne 0 ]; then exit 1; fi; \
done \
fi
make realclean
- name: Test Ignition delay
working-directory: ${{env.IGNDELAY_WORKING_DIRECTORY}}
run: |
echo "::add-matcher::${{github.workspace}}/PelePhysics-${{matrix.comp}}/.github/problem-matchers/gcc.json"
if [ "${{matrix.comp}}" == 'gnu' ] || [ "${{matrix.comp}}" == 'llvm' ]; then \
python -m pip install --upgrade pip
pip install numpy
make -j ${{env.NPROCS}} Eos_Model=Fuego Chemistry_Model=dodecane_lu TINY_PROFILE=TRUE ${{matrix.amrex_build_args}}
bash exec_ignDelay.sh
python check_ignDelay.py
if [ $? -ne 0 ]; then exit 1; fi; \
fi;
make realclean
35 changes: 35 additions & 0 deletions .github/workflows/dependencies/dependencies_cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
#
# Copyright 2020 Axel Huebl
#
# License: BSD-3-Clause-LBNL

# search recursive inside a folder if a file contains tabs
#
# @result 0 if no files are found, else 1
#

set -eu -o pipefail

CUDA_VERSION=11-2

sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" \
| sudo tee /etc/apt/sources.list.d/cuda.list
sudo apt-get update
sudo apt-get install -y \
cuda-command-line-tools-${CUDA_VERSION} \
cuda-compiler-${CUDA_VERSION} \
cuda-cupti-dev-${CUDA_VERSION} \
cuda-minimal-build-${CUDA_VERSION} \
cuda-nvml-dev-${CUDA_VERSION} \
cuda-nvtx-${CUDA_VERSION} \
libcurand-dev-${CUDA_VERSION} \
libcusolver-dev-${CUDA_VERSION} \
libcusparse-dev-${CUDA_VERSION} \
libcublas-dev-${CUDA_VERSION} \
libcurand-dev-${CUDA_VERSION}

export PATH=/usr/local/cuda-11.2/bin:${PATH}
which nvcc
nvcc --version
18 changes: 18 additions & 0 deletions .github/workflows/dependencies/dependencies_dpcpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Copyright 2020 The AMReX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl

set -eu -o pipefail

sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list

sudo apt-get update
sudo apt-get install -y \
intel-oneapi-dpcpp-cpp-compiler \
intel-oneapi-mkl-devel
36 changes: 36 additions & 0 deletions .github/workflows/dependencies/dependencies_hip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
#
# Copyright 2020 The AMReX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl

# search recursive inside a folder if a file contains tabs
#
# @result 0 if no files are found, else 1
#

set -eu -o pipefail

sudo wget http://repo.radeon.com/rocm/rocm.gpg.key
sudo apt-key add rocm.gpg.key
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ ubuntu main' \
| sudo tee /etc/apt/sources.list.d/rocm.list
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
| sudo tee -a /etc/profile.d/rocm.sh

sudo apt-get update
sudo apt-get install -y \
rocm-dev \
roctracer-dev \
rocprofiler-dev \
rocrand-dev \
rocprim-dev \
rocm-libs

source /etc/profile.d/rocm.sh
which hipcc
which clang
which clang++
which flang
hipcc --version
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: PelePhysics-Docs

on:
push:
branches: [development]
paths:
- 'Docs/**'
- 'README.md'
- '.github/workflows/docs.yml'
pull_request:
branches: [development]
paths:
- 'Docs/**'
- 'README.md'
- '.github/workflows/docs.yml'

jobs:
Docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme
- name: Configure
run: cmake -B${{runner.workspace}}/build-docs ${{github.workspace}}/Docs
- name: Build
working-directory: ${{runner.workspace}}/build-docs
run: |
echo "::add-matcher::.github/problem-matchers/sphinx.json"
cmake --build ${{runner.workspace}}/build-docs
echo "::remove-matcher owner=sphinx-problem-matcher-loose-no-severity::"
echo "::remove-matcher owner=sphinx-problem-matcher-loose::"
echo "::remove-matcher owner=sphinx-problem-matcher::"
touch ${{runner.workspace}}/build-docs/sphinx/html/.nojekyll
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/development'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ${{runner.workspace}}/build-docs/sphinx/html
SINGLE_COMMIT: true
Empty file added .nojekyll
Empty file.
Loading

0 comments on commit ee36316

Please sign in to comment.