Skip to content

Commit

Permalink
Release v202202.0.0
Browse files Browse the repository at this point in the history
Merge Request #29
  • Loading branch information
MakisH authored Feb 13, 2022
2 parents b7fccf4 + b9d03ed commit 1045afd
Show file tree
Hide file tree
Showing 18 changed files with 169 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.so filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ name: Build and package
on:
pull_request:
types: [ready_for_review]
workflow_dispatch:

jobs:
vagrant-up:
runs-on: macos-10.15

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: Cache Vagrant boxes
uses: actions/cache@v2
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ This box is based on the [bento/ubuntu-20.04](https://github.com/chef/bento/blob
- preCICE latest for the master branch
- preCICE config visualizer (master)
- preCICE Python bindings (PIP)
- OpenFOAM v2012 and the OpenFOAM-preCICE adapter (master)
- deal.II 9.2 from the official backports and the deal.II-preCICE adapter (master)
- CalculiX 2.16 from source and the CalculiX-preCICE adapter (master)
- OpenFOAM v2112 and the OpenFOAM-preCICE adapter (master)
- deal.II 9.3 from the official backports and the deal.II-preCICE adapter (master)
- CalculiX 2.19 from source and the CalculiX-preCICE adapter (master)
- FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter (PIP)
- Nutils latest from PIP
- SU2 6.0.0 and the SU2-preCICE adapter (master)
- code_aster 14.6 and the code_aster-preCICE adapter (master)
- Paraview from the official binaries
- DUNE 2.8 and the experimental DUNE-preCICE adapter (master)
- Paraview from APT
- Gnuplot

It then adds to the `/home/vagrant/`:
Expand Down Expand Up @@ -87,7 +88,7 @@ In case you killed the session before provisioning finished, the setup of your V

## Testing before publishing

We now have a GitHub action that can build the Vagrant box. This workflow only runs for pull requests that are marked as "ready for review" (i.e. not "draft"), as it takes significant time to complete (~1.5h). If you already submitted a normal PR but the workflow is not triggered, convert the PR to draft and then to "ready for review" again.
We now have a GitHub action that can build the Vagrant box. This workflow only runs for pull requests that are marked as "ready for review" (i.e. not "draft"), as it takes significant time to complete (~1.5h). If you already submitted a normal PR but the workflow is not triggered, you can manually trigger it from the "Actions" tab.

The workflow uploads the resulting box as an artifact and it also prints its SHA256 checksum before that. Download the job artifact and unzip it. Then run add the box to Vagrant:

Expand Down
2 changes: 2 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ Vagrant.configure("2") do |config|
# Install solvers, adapters, and related tools
config.vm.provision "shell", path: "provisioning/install-config-visualizer.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-openfoam.sh", privileged: false
config.vm.provision "file", source: "provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz", destination: "~/OpenFOAM/vagrant-v2112/platforms/linux64GccDPInt32Opt/swak4Foam.tar.gz"
config.vm.provision "shell", path: "provisioning/install-dealii.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-calculix.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-fenics.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-nutils.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-su2.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-code_aster.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-dune.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-paraview.sh", privileged: false

# Post-installation steps
Expand Down
3 changes: 3 additions & 0 deletions provisioning/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ sudo apt-get clean

# Cleanup all object files from compilation
find "${HOME}" -type f -name '*.o' -exec rm -fv {} \;

# Remove the cache
rm -rfv ~/.cache
2 changes: 1 addition & 1 deletion provisioning/install-basics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sudo apt-get upgrade -qy

# Install the Xfce desktop environment and basic applications
sudo apt-get install -y xubuntu-core^
sudo apt-get install -y thunar xfce4-terminal terminator bash-completion tree evince firefox firefox-locale-en
sudo apt-get install -y thunar xfce4-terminal terminator bash-completion tree evince firefox firefox-locale-en baobab catfish

# Install the VirtualBox guest additions
sudo apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
Expand Down
8 changes: 4 additions & 4 deletions provisioning/install-calculix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -ex
sudo apt-get install -y libarpack2-dev libspooles-dev libyaml-cpp-dev

# Install CalculiX
wget --quiet http://www.dhondt.de/ccx_2.16.src.tar.bz2
tar xvjf ccx_2.16.src.tar.bz2
rm -fv ccx_2.16.src.tar.bz2
wget --quiet http://www.dhondt.de/ccx_2.19.src.tar.bz2
tar xvjf ccx_2.19.src.tar.bz2
rm -fv ccx_2.19.src.tar.bz2

# Get the CalculiX-preCICE adapter
if [ ! -d "calculix-adapter/" ]; then
Expand All @@ -16,7 +16,7 @@ fi
(
cd calculix-adapter
git pull
make -j 2
make -j "$(nproc)"
)

# Add the CalculiX adapter to PATH
Expand Down
5 changes: 5 additions & 0 deletions provisioning/install-code_aster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ fi
ln -sf "${HOME}/code_aster-adapter/cht/adapter.py" .
)

# Remove the code_aster tests to save space (approx. 500MB)
rm -rfv ~/code_aster/14.6/share/aster/tests
# Remove some documentation to save space (~100MB)
rm -rfv ~/code_aster/public/med-4.00/share/doc

# Optional: Update the tutorials exchange directory (needs to be absolute) and generate the export file.
(
cd "${HOME}/tutorials/flow-over-heated-plate-steady-state"
Expand Down
6 changes: 3 additions & 3 deletions provisioning/install-dealii.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -ex

# Install deal.II from the deal.II 9.2.0 backports PPA
sudo add-apt-repository ppa:ginggs/deal.ii-9.2.0-backports
# Install deal.II from the deal.II 9.3.0 backports PPA
sudo add-apt-repository ppa:ginggs/deal.ii-9.3.0-backports
sudo apt-get update
sudo apt-get install -y libdeal.ii-dev

Expand All @@ -13,7 +13,7 @@ fi
(
cd dealii-adapter
git pull
cmake . && make -j 2
cmake . && make -j "$(nproc)"
)

# Add the deal.II adapter to PATH
Expand Down
72 changes: 72 additions & 0 deletions provisioning/install-dune.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env bash
set -ex

# Make a folder to collect all DUNE-related code (-p to allow re-provisioning)
mkdir -p dune && cd dune

# Get required DUNE modules
if [ ! -d "dune-common/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-common.git
fi

if [ ! -d "dune-istl/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-istl.git
fi

if [ ! -d "dune-localfunctions/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-localfunctions.git
fi

if [ ! -d "dune-grid/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-grid.git
fi

if [ ! -d "dune-geometry/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-geometry.git
fi

if [ ! -d "dune-functions/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-functions.git
fi

if [ ! -d "dune-uggrid/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-uggrid.git
fi

if [ ! -d "dune-typetree/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-typetree.git
fi

if [ ! -d "dune-foamgrid/" ]; then
git clone --branch releases/2.8 --depth=1 https://gitlab.dune-project.org/extensions/dune-foamgrid.git
fi

# Get the dune-elastodynamics module (solid solver)
if [ ! -d "dune-elastodynamics/" ]; then
git clone --branch master --depth=1 https://github.com/maxfirmbach/dune-elastodynamics.git
fi
(
cd dune-elastodynamics
git pull
)

# Get the DUNE-preCICE adapter
if [ ! -d "dune-adapter/" ]; then
git clone --branch main --depth=1 https://github.com/precice/dune-adapter.git
fi
(
cd dune-adapter/dune-precice
git pull
)

# Build all the DUNE and DUNE-preCICE related modules
DUNE_CONTROL_PATH=~/dune ./dune-common/bin/dunecontrol all

# Set the DUNE_CONTROL_PATH (DUNE recursively finds modules in this directory)
echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune\"" >> ~/.bashrc

# Copy the built example code to the tutorials
cp ~/dune/dune-adapter/dune-precice-howto/build-cmake/examples/dune-perpendicular-flap ~/tutorials/perpendicular-flap/solid-dune

# We are done with DUNE, let's do back home
cd ~
2 changes: 1 addition & 1 deletion provisioning/install-nutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -ex

# Install Nutils from PIP (we will also need matplotlib in our examples)
pip3 install --user matplotlib nutils
pip3 install --user matplotlib nutils==6.3
29 changes: 25 additions & 4 deletions provisioning/install-openfoam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -ex
# Add the signing key, add the repository, update:
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash

# Install OpenFOAM v2012:
sudo apt-get install -y openfoam2012-dev
# Install OpenFOAM v2112:
sudo apt-get install -y openfoam2112-dev
# Enable OpenFOAM by default:
echo ". /usr/lib/openfoam/openfoam2012/etc/bashrc" >> ~/.bashrc
echo ". /usr/lib/openfoam/openfoam2112/etc/bashrc" >> ~/.bashrc

# Get the OpenFOAM-preCICE adapter
if [ ! -d "openfoam-adapter/" ]; then
Expand All @@ -16,5 +16,26 @@ fi
(
cd openfoam-adapter
git pull
openfoam2012 ./Allwmake
openfoam2112 ./Allwmake
)

# Get swak4Foam (provides groovyBC, needed for the turek-hron-fsi3 tutorial)
#
# # Option 1: Build from source
# sudo apt-get install -y mercurial
# hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam
# (
# cd swak4Foam
# hg checkout develop
# openfoam2112 ./AllwmakeAll
# )
#
# # Remove some swak4Foam files to save space (approx. 150MB)
# rm -rfv .~swak4Foam
# sudo apt-get purge --autoremove -y mercurial # This also removes Python2, yipieh!
#
# # Option 2: Use pre-built binaries
# # (see Vagrantfile and post-install.sh, rebuild and update for OpenFOAM version other than v2112)

# Build the tutorials partitioned-heat-conduction solver
cd ~/tutorials/partitioned-heat-conduction/openfoam-solver && openfoam2112 wmake
9 changes: 1 addition & 8 deletions provisioning/install-paraview.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/usr/bin/env bash
set -ex

if [ ! -d "paraview" ]; then
mkdir paraview
PARAVIEW_URL="https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.8&type=binary&os=Linux&downloadFile=ParaView-5.8.1-MPI-Linux-Python3.7-64bit.tar.gz"
wget --no-check-certificate --quiet -O - "${PARAVIEW_URL}" | tar -xz -C paraview
ln -sf ~/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin/paraview ~/Desktop/
# Add ParaView to PATH
echo "export PATH=\"\${HOME}/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin:\${PATH}\"" >>~/.bashrc
fi
sudo apt-get install -y paraview
22 changes: 21 additions & 1 deletion provisioning/install-precice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,37 @@ fi
git pull
mkdir -p build && cd build/
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -Wno-dev ..
make -j 2
make -j "$(nproc)"
rm -fv ./*.deb && make package
sudo apt-get install -y ./libprecice2_*.deb
# Remove generated packages to save space (approx. 70MB)
rm -rfv ./*.deb ./*.tar.gz _CPack_Packages
)

# Collect examples and tutorials
cp -r /usr/share/precice/examples/ ./precice-examples
(
cd precice-examples/solverdummies
cd c && cmake . && make && cd ..
cd cpp && cmake . && make && cd ..
cd fortran && cmake . && make && cd ..
if [ ! -d "fortran-module/" ]; then
git clone --depth=1 --branch master https://github.com/precice/fortran-module.git
fi
cd fortran-module && make
cd examples/solverdummy && make
)

if [ ! -d "tutorials/" ]; then
git clone --depth=1 --branch master https://github.com/precice/tutorials.git
ln -sf ~/tutorials ~/Desktop/
fi
(
cd tutorials/quickstart/solid-cpp/ && cmake . && make
)
(
cd tutorials/heat-exchanger && ./download-meshes.sh
)
sudo apt-get -y install gnuplot # needed for watchpoint scripts of tutorials


Expand Down
5 changes: 4 additions & 1 deletion provisioning/install-su2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ fi
./configure --disable-metis --disable-parmetis --disable-cgns --disable-DOT \
--disable-MSH --disable-DEF --disable-SOL --disable-GEO \
--prefix="${SU2_RUN}" CXXFLAGS='-std=c++11'
make -j 2
make -j "$(nproc)"
# We still need sudo for whatever reason
sudo make install
)

# Remove the libSU2Core.a library to save space (approx. 500MB)
rm -fv ~/SU2-6.0.0/SU2_CFD/obj/libSU2Core.a
10 changes: 10 additions & 0 deletions provisioning/post-install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#!/usr/bin/env bash
set -ex

# Setup swak4Foam
(
cd "${HOME}/OpenFOAM/vagrant-v2112/platforms/linux64GccDPInt32Opt/"
tar -xzvf swak4Foam.tar.gz
)

# Create a link to the default shared folder
ln -sf /vagrant/ ~/Desktop/shared

# Add terminator on the desktop
cp /usr/share/applications/terminator.desktop ~/Desktop/
chmod +x ~/Desktop/terminator.desktop

# Disable the screensaver and automatic screen lock
{
echo "xset s off -dpms"
Expand Down
2 changes: 2 additions & 0 deletions provisioning/prebuilt/swak4Foam/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Prebuilt libraries and tools of swak4Foam for Ubuntu 20.04 and OpenFOAM v2112, based on commit ea7680cdcf8b (December 2021).
Find the source code on http://hg.code.sf.net/p/openfoam-extend/swak4Foam/rev/ea7680cdcf8b
3 changes: 3 additions & 0 deletions provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz
Git LFS file not shown

0 comments on commit 1045afd

Please sign in to comment.