-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v5.1.0-rc' into dschwoerer-patch-1
- Loading branch information
Showing
75 changed files
with
1,037 additions
and
622 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,60 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if test $BUILD_PETSC ; then | ||
if [[ ! -d $HOME/local/petsc/include/petsc ]]; then | ||
echo "****************************************" | ||
echo "Building PETSc" | ||
echo "****************************************" | ||
|
||
git clone -b release https://gitlab.com/petsc/petsc.git petsc --depth=1 | ||
|
||
unset PETSC_DIR | ||
unset PETSC_ARCH | ||
|
||
pushd petsc | ||
./configure \ | ||
--with-mpi=yes \ | ||
--with-precision=double \ | ||
--with-scalar-type=real \ | ||
--with-shared-libraries=1 \ | ||
--with-debugging=0 \ | ||
{C,CXX,F}OPTFLAGS="-O3" \ | ||
--prefix=$HOME/local/petsc | ||
|
||
make && make install | ||
popd | ||
|
||
echo "****************************************" | ||
echo " Finished building PETSc" | ||
echo "****************************************" | ||
|
||
echo "****************************************" | ||
echo "Building SLEPc" | ||
echo "****************************************" | ||
|
||
git clone -b release https://gitlab.com/slepc/slepc.git slepc --depth=1 | ||
|
||
pushd slepc | ||
unset SLEPC_DIR | ||
unset SLEPC_ARCH | ||
PETSC_DIR=$HOME/local/petsc ./configure --prefix=$HOME/local/slepc | ||
|
||
make SLEPC_DIR=$(pwd) PETSC_DIR=$HOME/local/petsc | ||
make SLEPC_DIR=$(pwd) PETSC_DIR=$HOME/local/petsc install | ||
popd | ||
|
||
echo "****************************************" | ||
echo " Finished building SLEPc" | ||
echo "****************************************" | ||
else | ||
echo "****************************************" | ||
echo " PETSc already installed" | ||
echo "****************************************" | ||
fi | ||
else | ||
echo "****************************************" | ||
echo " PETSc not requested" | ||
echo "****************************************" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
set -ex | ||
|
||
if which docker &> /dev/null ; then | ||
cmd="time sudo docker" | ||
else | ||
cmd="time podman" | ||
fi | ||
|
||
file=$1 | ||
(test $file && test -f $file) || file=.docker/fedora/Dockerfile | ||
test $# -gt 0 && shift | ||
|
||
if test -x $file | ||
then | ||
COMMIT=$(git rev-parse HEAD) $file $@ > Dockerfile | ||
else | ||
cp $file Dockerfile | ||
fi | ||
|
||
$cmd login -p $DOCKER_TOKEN -u $DOCKER_USER | ||
|
||
cat Dockerfile | ||
|
||
$cmd build -t mobydick . --build-arg=COMMIT=$(git rev-parse HEAD) --build-arg=MPI=$MPI --build-arg=CMAKE_OPTIONS="$CMAKE_OPTIONS" --build-arg=BASE=$BASE | ||
for tag in $TAGS | ||
do | ||
$cmd tag mobydick $tag | ||
$cmd push $tag | ||
done |
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,39 @@ | ||
ARG BASE | ||
FROM ghcr.io/dschwoerer/bout-container-base:$BASE | ||
|
||
# ---------------------------------------------------------------- | ||
# Build and install BOUT++ | ||
# ---------------------------------------------------------------- | ||
# user: boutuser | ||
# password: boutforever | ||
|
||
ARG MPI | ||
ARG URL | ||
ARG COMMIT | ||
ARG CMAKE_OPTIONS | ||
|
||
RUN sudo ls | ||
|
||
# Checkout submodules now so configure later is fast, and iterating on | ||
# it less painful | ||
RUN git clone $URL \ | ||
&& chown -R boutuser /home/boutuser/BOUT-dev \ | ||
&& cd BOUT-dev \ | ||
&& git checkout $COMMIT \ | ||
&& git submodule update --init --recursive | ||
|
||
|
||
WORKDIR /home/boutuser/BOUT-dev | ||
|
||
RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/bout++/ \ | ||
-DBOUT_GENERATE_FIELDOPS=OFF \ | ||
-DBOUT_USE_PETSC=ON -DPETSc_ROOT=/opt/petsc \ | ||
-DBOUT_ENABLE_PYTHON=ON \ | ||
-DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=/usr/lib64/$MPI/ -DSUNDIALS_INCLUDE_DIR=/usr/include/$MPI-x86_64/sundials/ \ | ||
$CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1) | ||
|
||
|
||
RUN make -C build -j 2 | ||
RUN sudo make -C build install | ||
|
||
RUN find /opt/bout++ |
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
submodules: true | ||
|
||
- name: Run clang-tidy | ||
uses: ZedThree/clang-tidy-review@v0.8.4 | ||
uses: ZedThree/clang-tidy-review@v0.13.1 | ||
id: review | ||
with: | ||
build_dir: build | ||
|
@@ -44,3 +44,6 @@ jobs: | |
-DBOUT_ENABLE_PYTHON=OFF \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \ | ||
-DBOUT_UPDATE_GIT_SUBMODULE=OFF | ||
- name: Upload clang-tidy fixes | ||
uses: ZedThree/clang-tidy-review/[email protected] |
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,84 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- next | ||
# Add your branch here if you want containers for it | ||
- db-WIP | ||
- docker-ci | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build: | ||
name: Build ${{ matrix.config.name }} Container (${{ matrix.metric3d.name }} ; ${{matrix.mpi}}) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
mpi: [mpich] | ||
metric3d: | ||
- name: "With OpenMP" | ||
cmake: ON | ||
base_prefix: "openmp-" | ||
tag_prefix: "3d-" | ||
- name: "Without OpenMP" | ||
cmake: OFF | ||
base_prefix: "" | ||
tag_prefix: "" | ||
config: | ||
- name: "Debug" | ||
tag_postfix: "debug" | ||
options: "-DCHECK=3" | ||
base_postfix: "mini" | ||
|
||
- name: "Optimised" | ||
tag_postfix: "opt" | ||
options: "-DCHECK=0" | ||
base_postfix: "mini" | ||
|
||
- name: "Full" | ||
tag_postfix: "full" | ||
options: "-DCHECK=3" | ||
base_postfix: "full" | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
flavor: | | ||
prefix=${{ matrix.mpi }}-${{matrix.metric3d.tag_prefix}}${{ matrix.config.tag_postfix }}- | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
build-args: | | ||
BASE=${{ matrix.mpi }}-${{ matrix.metric3d.base_prefix }}${{ matrix.config.base_postfix }}-main | ||
MPI=${{ matrix.mpi }} | ||
CMAKE_OPTIONS=${{ matrix.config.options }} -DBOUT_ENABLE_METRIC_3D=${{ matrix.metric3d.cmake }} -DBOUT_ENABLE_OPENMP=${{ matrix.metric3d.cmake }} | ||
COMMIT=${{ github.sha }} | ||
URL=${{ github.server_url }}/${{ github.repository }} | ||
context: .docker/fedora/ | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 |
---|---|---|
|
@@ -83,3 +83,5 @@ coverage/ | |
/dist/ | ||
/manual/sphinx/_build | ||
/_version.txt | ||
/BOUT++-v*.tar.gz | ||
/BOUT++-v*.tar.xz |
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.