From cf30a35d0c6f7f11cdd87de4a20a7693f16dea5b Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 5 Oct 2022 11:34:08 +0200 Subject: [PATCH 01/50] Fix preCICE branch name (master->main renaming) --- provisioning/install-precice.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index af4c0ed..f4a3812 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -5,10 +5,10 @@ set -ex sudo apt-get install -y cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy # Get preCICE from GitHub: -# - Always get the latest master, no need for versioning +# - Always get the latest main branch, no need for versioning # - Build in Debug mode, so that users can report bugs if [ ! -d "precice/" ]; then - git clone --depth=1 --branch master https://github.com/precice/precice.git + git clone --depth=1 --branch main https://github.com/precice/precice.git fi ( cd precice From bea07007e6036d4e3c8cda31d7c31b875c8ba035 Mon Sep 17 00:00:00 2001 From: David Schneider Date: Mon, 14 Nov 2022 17:23:46 +0100 Subject: [PATCH 02/50] Add ASTE recipe for the latest ASTE release (#47) * Add ASTE recipe for the latest ASTE release * Add corresponding aste version * Use branch name instead of version Co-authored-by: Gerasimos Chourdakis --- README.md | 1 + Vagrantfile | 1 + provisioning/install-aste.sh | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 provisioning/install-aste.sh diff --git a/README.md b/README.md index fb78dd0..6ded08e 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ This box is based on the [generic/ubuntu2004](https://github.com/lavabit/robox/t - SU2 6.0.0 and the SU2-preCICE adapter (master) - code_aster 14.6 and the code_aster-preCICE adapter (master) - DUNE 2.8 and the experimental DUNE-preCICE adapter (master) +- ASTE (master) - Paraview from APT - Gnuplot diff --git a/Vagrantfile b/Vagrantfile index 275e6cd..18d951d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -55,6 +55,7 @@ Vagrant.configure("2") do |config| 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 + config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false # Post-installation steps config.vm.provision "shell", path: "provisioning/post-install.sh", privileged: false diff --git a/provisioning/install-aste.sh b/provisioning/install-aste.sh new file mode 100644 index 0000000..392e3f8 --- /dev/null +++ b/provisioning/install-aste.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -ex + +# Install the C++ vtk library +sudo apt-get -y install libvtk7-dev +sudo apt-get -y install libmetis-dev + +python3 -m pip install sympy scipy jinja2 + +# Get aste +if [ ! -d "aste/" ]; then + git clone --depth=1 --branch master https://github.com/precice/aste.git +fi +( + cd aste + git pull + mkdir -p build && cd build + cmake .. && make -j "$(nproc)" +) + +# Add aste to PATH and libmetis to the library path +echo "export PATH=\"\${HOME}/aste:\${PATH}\"" >>~/.bashrc +echo "export LD_LIBRARY_PATH=\"\${HOME}/aste:\${LD_LIBRARY_PATH}\"" >>~/.bashrc From a694fe4813345acf79196e8b5d33de789db8c5ab Mon Sep 17 00:00:00 2001 From: erikscheurer <84399192+erikscheurer@users.noreply.github.com> Date: Tue, 15 Nov 2022 16:30:12 +0100 Subject: [PATCH 03/50] Add Julia bindings to vm (#48) Co-authored-by: Gerasimos Chourdakis Co-authored-by: Ishaan Desai Co-authored-by: Ishaan Desai --- README.md | 1 + Vagrantfile | 1 + provisioning/install-julia-bindings.sh | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 provisioning/install-julia-bindings.sh diff --git a/README.md b/README.md index 6ded08e..f28ed0a 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ This box is based on the [generic/ubuntu2004](https://github.com/lavabit/robox/t - preCICE latest for the master branch - preCICE config visualizer (master) - preCICE Python bindings (PIP) +- preCICE Julia bindings (Pkg) - 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) diff --git a/Vagrantfile b/Vagrantfile index 18d951d..e38f3a9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -55,6 +55,7 @@ Vagrant.configure("2") do |config| 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 + config.vm.provision "shell", path: "provisioning/install-julia-bindings.sh", privileged: false config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false # Post-installation steps diff --git a/provisioning/install-julia-bindings.sh b/provisioning/install-julia-bindings.sh new file mode 100644 index 0000000..00d8d07 --- /dev/null +++ b/provisioning/install-julia-bindings.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# install latest julia +pip3 install jill +jill install --confirm + +# install preCICE bindings +julia -e 'using Pkg; Pkg.add("PreCICE")' + +# to test the installation, run the following command: +# julia -e 'using Pkg; Pkg.test("PreCICE")' From 94c5979bc01587f453a7564a05e31a86a80da43a Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 18 Nov 2022 15:18:38 +0100 Subject: [PATCH 04/50] Upgrade OpenFOAM to v2206 (#46) --- Vagrantfile | 2 +- provisioning/install-openfoam.sh | 14 +++++++------- provisioning/post-install.sh | 2 +- provisioning/prebuilt/swak4Foam/README.txt | 17 ++++++++++++++++- .../prebuilt/swak4Foam/swak4Foam.tar.gz | 4 ++-- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index e38f3a9..761339e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -46,7 +46,7 @@ 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 "file", source: "provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz", destination: "~/OpenFOAM/vagrant-v2206/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 diff --git a/provisioning/install-openfoam.sh b/provisioning/install-openfoam.sh index 56ff2d8..acb2b62 100644 --- a/provisioning/install-openfoam.sh +++ b/provisioning/install-openfoam.sh @@ -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 v2112: -sudo apt-get install -y openfoam2112-dev +# Install OpenFOAM v2206: +sudo apt-get install -y openfoam2206-dev # Enable OpenFOAM by default: -echo ". /usr/lib/openfoam/openfoam2112/etc/bashrc" >> ~/.bashrc +echo ". /usr/lib/openfoam/openfoam2206/etc/bashrc" >> ~/.bashrc # Get the OpenFOAM-preCICE adapter if [ ! -d "openfoam-adapter/" ]; then @@ -16,7 +16,7 @@ fi ( cd openfoam-adapter git pull - openfoam2112 ./Allwmake + openfoam2206 ./Allwmake ) # Get swak4Foam (provides groovyBC, needed for the turek-hron-fsi3 tutorial) @@ -27,7 +27,7 @@ fi # ( # cd swak4Foam # hg checkout develop -# openfoam2112 ./AllwmakeAll +# openfoam2206 ./AllwmakeAll # ) # # # Remove some swak4Foam files to save space (approx. 150MB) @@ -35,7 +35,7 @@ fi # 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) +# # (see Vagrantfile and post-install.sh, rebuild and update for OpenFOAM version other than v2206) # Build the tutorials partitioned-heat-conduction solver -cd ~/tutorials/partitioned-heat-conduction/openfoam-solver && openfoam2112 wmake +cd ~/tutorials/partitioned-heat-conduction/openfoam-solver && openfoam2206 wmake diff --git a/provisioning/post-install.sh b/provisioning/post-install.sh index 8bed9e7..c3e4253 100644 --- a/provisioning/post-install.sh +++ b/provisioning/post-install.sh @@ -3,7 +3,7 @@ set -ex # Setup swak4Foam ( - cd "${HOME}/OpenFOAM/vagrant-v2112/platforms/linux64GccDPInt32Opt/" + cd "${HOME}/OpenFOAM/vagrant-v2206/platforms/linux64GccDPInt32Opt/" tar -xzvf swak4Foam.tar.gz ) diff --git a/provisioning/prebuilt/swak4Foam/README.txt b/provisioning/prebuilt/swak4Foam/README.txt index e30f332..a8b587f 100644 --- a/provisioning/prebuilt/swak4Foam/README.txt +++ b/provisioning/prebuilt/swak4Foam/README.txt @@ -1,2 +1,17 @@ -Prebuilt libraries and tools of swak4Foam for Ubuntu 20.04 and OpenFOAM v2112, based on commit ea7680cdcf8b (December 2021). +Prebuilt libraries and tools of swak4Foam for Ubuntu 20.04 and OpenFOAM v2206, based on the develop branch of swak4Foam (built on November 2022): + +```bash +vagrant@precicevm:~/swak4Foam$ hg tip +changeset: 3999:481d96f16780 +branch: develop +tag: tip +parent: 3997:4d33e38246ad +parent: 3998:12dad7c691d1 +user: Bernhard F.W. Gschaider +date: Mon Jul 04 01:06:48 2022 +0200 +summary: flow: Promoted 'port/of9' (12dad7c691d1) to 'develop'. +``` + +The files are extracted from `/home/vagrant/OpenFOAM/vagrant-/platforms/` and copied there. + Find the source code on http://hg.code.sf.net/p/openfoam-extend/swak4Foam/rev/ea7680cdcf8b diff --git a/provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz b/provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz index 45be87b..1e469cd 100644 --- a/provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz +++ b/provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6150a56f3670a237e2dbff936a5f99f900d4c71c82fa08bce9dad2795ebfae0 -size 19974607 +oid sha256:284da0859454c970ebbc208e477a8572060280eff4ba6252cd33ed24b25c4fd1 +size 20097408 From 43ca14145ffda4db7b30761ed7d31a6f7fcee78f Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 18 Nov 2022 16:37:55 +0100 Subject: [PATCH 05/50] Update CalculiX to v2.20 --- provisioning/install-calculix.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provisioning/install-calculix.sh b/provisioning/install-calculix.sh index 27a6204..613b803 100644 --- a/provisioning/install-calculix.sh +++ b/provisioning/install-calculix.sh @@ -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.19.src.tar.bz2 -tar xvjf ccx_2.19.src.tar.bz2 -rm -fv ccx_2.19.src.tar.bz2 +wget --quiet http://www.dhondt.de/ccx_2.20.src.tar.bz2 +tar xvjf ccx_2.20.src.tar.bz2 +rm -fv ccx_2.20.src.tar.bz2 # Get the CalculiX-preCICE adapter if [ ! -d "calculix-adapter/" ]; then From 7d5e890a4b8938b18fdfaf8eda1018a3170f6037 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 21 Nov 2022 19:28:53 +0100 Subject: [PATCH 06/50] fix-aste-path --- provisioning/install-aste.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioning/install-aste.sh b/provisioning/install-aste.sh index 392e3f8..1dbae5a 100644 --- a/provisioning/install-aste.sh +++ b/provisioning/install-aste.sh @@ -19,5 +19,5 @@ fi ) # Add aste to PATH and libmetis to the library path -echo "export PATH=\"\${HOME}/aste:\${PATH}\"" >>~/.bashrc -echo "export LD_LIBRARY_PATH=\"\${HOME}/aste:\${LD_LIBRARY_PATH}\"" >>~/.bashrc +echo "export PATH=\"\${HOME}/aste/build:\${PATH}\"" >>~/.bashrc +echo "export LD_LIBRARY_PATH=\"\${HOME}/aste/build:\${LD_LIBRARY_PATH}\"" >>~/.bashrc From 0d5fe51d4fc4e08ddc17a5487a221bc80a77b8f8 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 21 Nov 2022 19:37:28 +0100 Subject: [PATCH 07/50] Add pandas (#59) --- provisioning/install-precice.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index f4a3812..49fe124 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -55,6 +55,9 @@ sudo apt-get install -y python3-pip pip3 install --upgrade pip pip3 install --user pyprecice +# Additional python packages +pip3 install --user pandas # Needed for the post-processing script of the oscillator tutorial + # Get the Python solverdummy into the examples if [ ! -d "python-bindings/" ]; then git clone --depth=1 --branch master https://github.com/precice/python-bindings.git From bed63fb7c0e32f90d8c9a397d27da5d40329a429 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 21 Nov 2022 19:38:52 +0100 Subject: [PATCH 08/50] Add dune-fem (#58) --- provisioning/install-dune.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/provisioning/install-dune.sh b/provisioning/install-dune.sh index 432ca9c..792e736 100755 --- a/provisioning/install-dune.sh +++ b/provisioning/install-dune.sh @@ -68,5 +68,9 @@ 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 +# Install dune-fem from PIP + +pip3 install --user dune-fem==2.8 + # We are done with DUNE, let's do back home cd ~ From c6e7137c30f7b360e299a4f7651c5619b1023432 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 21 Nov 2022 19:47:34 +0100 Subject: [PATCH 09/50] Build elastic-tube-1d (#60) Closes #53. --- provisioning/install-precice.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 49fe124..68e83e4 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -40,6 +40,10 @@ if [ ! -d "tutorials/" ]; then git clone --depth=1 --branch master https://github.com/precice/tutorials.git ln -sf ~/tutorials ~/Desktop/ fi +( + cd tutorials/elastic-tube-1d/fluid-cpp/ && mkdir build && cd build && cmake .. && make && cd ../.. + cd solid-cpp/ && mkdir build && cd build && cmake .. && make +) ( cd tutorials/quickstart/solid-cpp/ && cmake . && make ) From 8661219da36bf5a52533c36566b3a59a127f206c Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 21 Nov 2022 20:33:39 +0100 Subject: [PATCH 10/50] Replace PDF reader (evince -> atril) closes #36 --- provisioning/install-basics.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-basics.sh b/provisioning/install-basics.sh index 281d54c..ff78f0b 100644 --- a/provisioning/install-basics.sh +++ b/provisioning/install-basics.sh @@ -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 baobab catfish +sudo apt-get install -y thunar xfce4-terminal terminator bash-completion tree atril firefox firefox-locale-en baobab catfish # Setup auto-login for the graphical session # Disabled due to https://github.com/precice/vm/issues/40 From a22e921edf31e9dd0518eed6b25c24e7903455cc Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 21 Nov 2022 21:09:02 +0100 Subject: [PATCH 11/50] Make the vm install Nutils v7.0 instead of v6.3 (#56) --- provisioning/install-nutils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-nutils.sh b/provisioning/install-nutils.sh index d9f007e..dd2b068 100644 --- a/provisioning/install-nutils.sh +++ b/provisioning/install-nutils.sh @@ -2,4 +2,4 @@ set -ex # Install Nutils from PIP (we will also need matplotlib in our examples) -pip3 install --user matplotlib nutils==6.3 +pip3 install --user matplotlib nutils==7.0 From 76f47ace172e4da642d720c3a09a880263c22b96 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 21 Nov 2022 21:43:28 +0100 Subject: [PATCH 12/50] Add venv with Nutils 6 for perpendicular-flap (#62) Closes #61 --- provisioning/install-precice.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 68e83e4..906ddd4 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -62,6 +62,19 @@ pip3 install --user pyprecice # Additional python packages pip3 install --user pandas # Needed for the post-processing script of the oscillator tutorial +# Temporary workaround for https://github.com/precice/vm/issues/61 +# Remove as soon as https://github.com/precice/tutorials/issues/217 gets resolved +sudo apt-get install -y python3.8-venv +( + cd tutorials/perpendicular-flap/fluid-nutils/ + python3 -m venv nutils6-env + # shellcheck source=/dev/null + source nutils6-env/bin/activate + pip3 install nutils==6.3 pyprecice + sed -i "s/python3/nutils6-env\/bin\/python3/g" ./run.sh + deactivate +) + # Get the Python solverdummy into the examples if [ ! -d "python-bindings/" ]; then git clone --depth=1 --branch master https://github.com/precice/python-bindings.git From 900f746ac91aacbc7f49f3f71b34fc9259cb8b15 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Tue, 22 Nov 2022 14:21:36 +0100 Subject: [PATCH 13/50] Manually uninstall fenics-ufl package to avoid fenics not working (#64) --- provisioning/install-fenics.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/provisioning/install-fenics.sh b/provisioning/install-fenics.sh index 8348604..c09eede 100644 --- a/provisioning/install-fenics.sh +++ b/provisioning/install-fenics.sh @@ -9,3 +9,6 @@ sudo apt-get -y install --no-install-recommends fenics # Install the FEniCS-preCICE adapter from PIP pip3 install --user fenicsprecice + +# Remove fenics-ufl package manually +pip3 uninstall -y fenics-ufl From 7b4d268fa177e7f8a3d9c73ae898c14e777962b7 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 22 Nov 2022 15:37:11 +0100 Subject: [PATCH 14/50] Move fenics-ufl uninstall step to post-install.sh Investigating why it was previously giving a permission issue. --- provisioning/install-fenics.sh | 3 --- provisioning/post-install.sh | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/provisioning/install-fenics.sh b/provisioning/install-fenics.sh index c09eede..8348604 100644 --- a/provisioning/install-fenics.sh +++ b/provisioning/install-fenics.sh @@ -9,6 +9,3 @@ sudo apt-get -y install --no-install-recommends fenics # Install the FEniCS-preCICE adapter from PIP pip3 install --user fenicsprecice - -# Remove fenics-ufl package manually -pip3 uninstall -y fenics-ufl diff --git a/provisioning/post-install.sh b/provisioning/post-install.sh index c3e4253..ce34535 100644 --- a/provisioning/post-install.sh +++ b/provisioning/post-install.sh @@ -7,6 +7,10 @@ set -ex tar -xzvf swak4Foam.tar.gz ) +# Remove fenics-ufl package +# Workaround for https://github.com/precice/vm/issues/4 +pip3 uninstall -y fenics-ufl + # Create a link to the default shared folder ln -sf /vagrant/ ~/Desktop/shared From c40ecab6927465587f821b5685ed539743e1a7b2 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 14:05:53 +0200 Subject: [PATCH 15/50] Install meld Closes #67 --- provisioning/install-devel.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/provisioning/install-devel.sh b/provisioning/install-devel.sh index 9757a40..883f9d1 100644 --- a/provisioning/install-devel.sh +++ b/provisioning/install-devel.sh @@ -5,4 +5,6 @@ sudo apt-get install -y build-essential git cmake cmake-curses-gui sudo apt-get install -y nano vim gedit +sudo apt-get install -y meld + sudo apt-get install -y ipython3 From 062fe4269d1eecc70741f2b0e52d3444313d7086 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 14:10:19 +0200 Subject: [PATCH 16/50] Remove dune-fem (#70) Closes #68 --- provisioning/install-dune.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/provisioning/install-dune.sh b/provisioning/install-dune.sh index 792e736..432ca9c 100755 --- a/provisioning/install-dune.sh +++ b/provisioning/install-dune.sh @@ -68,9 +68,5 @@ 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 -# Install dune-fem from PIP - -pip3 install --user dune-fem==2.8 - # We are done with DUNE, let's do back home cd ~ From f004994063f21f5106abd40d67d2a6fab5d0c0c3 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 14:52:49 +0200 Subject: [PATCH 17/50] Switch preCICE to RelWithDebInfo Closes #41 --- provisioning/install-precice.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 906ddd4..0a091ec 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -14,7 +14,7 @@ fi cd precice 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 .. + cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -Wno-dev .. make -j "$(nproc)" rm -fv ./*.deb && make package sudo apt-get install -y ./libprecice2_*.deb From aa12205c7c393ac2d4f8e5421a942c49df00a4fa Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 15:00:54 +0200 Subject: [PATCH 18/50] Add settings.json to gitignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 87f6b1f..a14106b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ .vagrant -vagrant \ No newline at end of file +vagrant + +# Editors +settings.json From ef1c609016ae4c34d2b132afe683b6b0a1401621 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 15:25:59 +0200 Subject: [PATCH 19/50] Remove Nutils (#71) It is now installed in each tutorial separately --- README.md | 1 - Vagrantfile | 1 - provisioning/install-nutils.sh | 5 ----- provisioning/install-precice.sh | 13 ------------- 4 files changed, 20 deletions(-) delete mode 100644 provisioning/install-nutils.sh diff --git a/README.md b/README.md index f28ed0a..2f4f977 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ This box is based on the [generic/ubuntu2004](https://github.com/lavabit/robox/t - 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) - DUNE 2.8 and the experimental DUNE-preCICE adapter (master) diff --git a/Vagrantfile b/Vagrantfile index 761339e..300dbad 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -50,7 +50,6 @@ Vagrant.configure("2") do |config| 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 diff --git a/provisioning/install-nutils.sh b/provisioning/install-nutils.sh deleted file mode 100644 index dd2b068..0000000 --- a/provisioning/install-nutils.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -ex - -# Install Nutils from PIP (we will also need matplotlib in our examples) -pip3 install --user matplotlib nutils==7.0 diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 0a091ec..42e6495 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -62,19 +62,6 @@ pip3 install --user pyprecice # Additional python packages pip3 install --user pandas # Needed for the post-processing script of the oscillator tutorial -# Temporary workaround for https://github.com/precice/vm/issues/61 -# Remove as soon as https://github.com/precice/tutorials/issues/217 gets resolved -sudo apt-get install -y python3.8-venv -( - cd tutorials/perpendicular-flap/fluid-nutils/ - python3 -m venv nutils6-env - # shellcheck source=/dev/null - source nutils6-env/bin/activate - pip3 install nutils==6.3 pyprecice - sed -i "s/python3/nutils6-env\/bin\/python3/g" ./run.sh - deactivate -) - # Get the Python solverdummy into the examples if [ ! -d "python-bindings/" ]; then git clone --depth=1 --branch master https://github.com/precice/python-bindings.git From 62a89a3091e1a998a4db56bf82e236aab418ec10 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 15:39:18 +0200 Subject: [PATCH 20/50] Remove swak4Foam (#72) --- Vagrantfile | 1 - provisioning/install-openfoam.sh | 18 ------------------ provisioning/prebuilt/swak4Foam/README.txt | 17 ----------------- .../prebuilt/swak4Foam/swak4Foam.tar.gz | 3 --- 4 files changed, 39 deletions(-) delete mode 100644 provisioning/prebuilt/swak4Foam/README.txt delete mode 100644 provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz diff --git a/Vagrantfile b/Vagrantfile index 300dbad..7351c3e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -46,7 +46,6 @@ 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-v2206/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 diff --git a/provisioning/install-openfoam.sh b/provisioning/install-openfoam.sh index acb2b62..2e9e96e 100644 --- a/provisioning/install-openfoam.sh +++ b/provisioning/install-openfoam.sh @@ -19,23 +19,5 @@ fi openfoam2206 ./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 -# openfoam2206 ./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 v2206) - # Build the tutorials partitioned-heat-conduction solver cd ~/tutorials/partitioned-heat-conduction/openfoam-solver && openfoam2206 wmake diff --git a/provisioning/prebuilt/swak4Foam/README.txt b/provisioning/prebuilt/swak4Foam/README.txt deleted file mode 100644 index a8b587f..0000000 --- a/provisioning/prebuilt/swak4Foam/README.txt +++ /dev/null @@ -1,17 +0,0 @@ -Prebuilt libraries and tools of swak4Foam for Ubuntu 20.04 and OpenFOAM v2206, based on the develop branch of swak4Foam (built on November 2022): - -```bash -vagrant@precicevm:~/swak4Foam$ hg tip -changeset: 3999:481d96f16780 -branch: develop -tag: tip -parent: 3997:4d33e38246ad -parent: 3998:12dad7c691d1 -user: Bernhard F.W. Gschaider -date: Mon Jul 04 01:06:48 2022 +0200 -summary: flow: Promoted 'port/of9' (12dad7c691d1) to 'develop'. -``` - -The files are extracted from `/home/vagrant/OpenFOAM/vagrant-/platforms/` and copied there. - -Find the source code on http://hg.code.sf.net/p/openfoam-extend/swak4Foam/rev/ea7680cdcf8b diff --git a/provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz b/provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz deleted file mode 100644 index 1e469cd..0000000 --- a/provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:284da0859454c970ebbc208e477a8572060280eff4ba6252cd33ed24b25c4fd1 -size 20097408 From b96f545ac24e04ac382d5fb7388cf41538de936b Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 15:40:08 +0200 Subject: [PATCH 21/50] Update preCICE version in Debian package name --- provisioning/install-precice.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 42e6495..9e7286d 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -17,7 +17,7 @@ fi cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -Wno-dev .. make -j "$(nproc)" rm -fv ./*.deb && make package - sudo apt-get install -y ./libprecice2_*.deb + sudo apt-get install -y ./libprecice3_*.deb # Remove generated packages to save space (approx. 70MB) rm -rfv ./*.deb ./*.tar.gz _CPack_Packages ) From e25abe2cdc1968d2d1328d98e1901241d007c77c Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 15:40:45 +0200 Subject: [PATCH 22/50] Remove more code related to swak4Foam --- provisioning/post-install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/provisioning/post-install.sh b/provisioning/post-install.sh index ce34535..9c52fc1 100644 --- a/provisioning/post-install.sh +++ b/provisioning/post-install.sh @@ -1,12 +1,6 @@ #!/usr/bin/env bash set -ex -# Setup swak4Foam -( - cd "${HOME}/OpenFOAM/vagrant-v2206/platforms/linux64GccDPInt32Opt/" - tar -xzvf swak4Foam.tar.gz -) - # Remove fenics-ufl package # Workaround for https://github.com/precice/vm/issues/4 pip3 uninstall -y fenics-ufl From b19df640ff07649b1b6b577c68a771b7fdb0ac1a Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 15:41:22 +0200 Subject: [PATCH 23/50] Do not build the elastic-tube-1d solvers They are now built automatically on the first run of the tutorial. --- provisioning/install-precice.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 9e7286d..036a4ee 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -40,10 +40,6 @@ if [ ! -d "tutorials/" ]; then git clone --depth=1 --branch master https://github.com/precice/tutorials.git ln -sf ~/tutorials ~/Desktop/ fi -( - cd tutorials/elastic-tube-1d/fluid-cpp/ && mkdir build && cd build && cmake .. && make && cd ../.. - cd solid-cpp/ && mkdir build && cd build && cmake .. && make -) ( cd tutorials/quickstart/solid-cpp/ && cmake . && make ) From d13fbaf7d75e0f7bba55d6de2b4b4ebfbe4cd368 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 15:41:49 +0200 Subject: [PATCH 24/50] Install matplotlib Needed in several post-processing scripts, previously installed next to Nutils. --- provisioning/install-precice.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 036a4ee..f0d07d5 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -56,7 +56,7 @@ pip3 install --upgrade pip pip3 install --user pyprecice # Additional python packages -pip3 install --user pandas # Needed for the post-processing script of the oscillator tutorial +pip3 install --user pandas matplotlib # Needed for the post-processing scripts # Get the Python solverdummy into the examples if [ ! -d "python-bindings/" ]; then From d55d48817f726bc93cf1bf9638d15c6cea2d3ea8 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 17:06:20 +0200 Subject: [PATCH 25/50] Install FMI runner (#77) Closes #74 --- Vagrantfile | 1 + provisioning/install-fmi.sh | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 provisioning/install-fmi.sh diff --git a/Vagrantfile b/Vagrantfile index 7351c3e..4710712 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -49,6 +49,7 @@ Vagrant.configure("2") do |config| 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-fmi.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 diff --git a/provisioning/install-fmi.sh b/provisioning/install-fmi.sh new file mode 100644 index 0000000..3a59461 --- /dev/null +++ b/provisioning/install-fmi.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -ex + +# Install the FMI runner from PIP +pip3 install --user fmiprecice From dd9af1bc1981b2accf9413a4f6268ac797e61cee Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 17:18:30 +0200 Subject: [PATCH 26/50] Rename install-fmi.sh to install-fmiprecice.sh --- Vagrantfile | 2 +- provisioning/{install-fmi.sh => install-fmiprecice.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename provisioning/{install-fmi.sh => install-fmiprecice.sh} (100%) diff --git a/Vagrantfile b/Vagrantfile index 4710712..ec8ba9b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -49,7 +49,7 @@ Vagrant.configure("2") do |config| 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-fmi.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-fmiprecice.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 diff --git a/provisioning/install-fmi.sh b/provisioning/install-fmiprecice.sh similarity index 100% rename from provisioning/install-fmi.sh rename to provisioning/install-fmiprecice.sh From 2013ae53f099c630f9b6ec281174b471bb9892e5 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 18:39:04 +0200 Subject: [PATCH 27/50] Update SU2 (#78) --- provisioning/install-su2.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/provisioning/install-su2.sh b/provisioning/install-su2.sh index 69dc370..935d257 100644 --- a/provisioning/install-su2.sh +++ b/provisioning/install-su2.sh @@ -1,15 +1,18 @@ #!/usr/bin/env bash set -ex -# Get SU2 6.0.0 from GitHub -wget --quiet https://github.com/su2code/SU2/archive/v6.0.0.tar.gz -tar -xzf v6.0.0.tar.gz -rm -fv v6.0.0.tar.gz +# Install dependencies +pip3 install --user mpi4py + +# Get SU2 7.5.1 from GitHub +wget --quiet https://github.com/su2code/SU2/archive/refs/tags/v7.5.1.tar.gz +tar -xzf v7.5.1.tar.gz +rm -fv v7.5.1.tar.gz # Add SU2 to PATH and apply. # We first export to a separate script, so that we can load it here (non-interactive shell). { - echo "export SU2_HOME=\"\${HOME}/SU2-6.0.0\"" + echo "export SU2_HOME=\"\${HOME}/SU2-7.5.1\"" echo "export SU2_RUN=\"\${SU2_HOME}/SU2_CFD/bin\"" echo "export PATH=\"\${SU2_RUN}:\${PATH}\"" echo "export PYTHONPATH=\"\${SU2_RUN}:\${PYTHONPATH}\"" @@ -32,13 +35,9 @@ fi # Configure and build the SU2 adapter ( cd "${SU2_HOME}" - ./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 "$(nproc)" - # We still need sudo for whatever reason - sudo make install + ./meson.py build -Denable-pywrapper=true --prefix="${SU2_RUN}" &&\ + ./ninja -C build install ) # Remove the libSU2Core.a library to save space (approx. 500MB) -rm -fv ~/SU2-6.0.0/SU2_CFD/obj/libSU2Core.a +rm -fv ~/SU2-7.5.1/SU2_CFD/obj/libSU2Core.a From 663aba492fe10264c79a38b86cfa1b5bba8b4124 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 21:12:52 +0200 Subject: [PATCH 28/50] Add cargo (Rust) (#80) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Frédéric Simonis --- provisioning/install-devel.sh | 3 +++ provisioning/install-precice.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/provisioning/install-devel.sh b/provisioning/install-devel.sh index 883f9d1..0a3d005 100644 --- a/provisioning/install-devel.sh +++ b/provisioning/install-devel.sh @@ -3,6 +3,9 @@ set -ex sudo apt-get install -y build-essential git cmake cmake-curses-gui +# For the Rust bindings of preCICE, installed by the elastic-tube-1d tutorial +sudo apt-get install -y cargo + sudo apt-get install -y nano vim gedit sudo apt-get install -y meld diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index f0d07d5..fd8498c 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -43,6 +43,12 @@ fi ( cd tutorials/quickstart/solid-cpp/ && cmake . && make ) +( + cd tutorials/elastic-tube-1d/solid-rust/ && mkdir -p .cargo && cargo vendor > .cargo/config.toml +) +( + cd tutorials/elastic-tube-1d/fluid-rust/ && mkdir -p .cargo && cargo vendor > .cargo/config.toml +) ( cd tutorials/heat-exchanger && ./download-meshes.sh ) From 33d8b963979b01f43a76e13e54600d70615e5cf4 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 21:59:14 +0200 Subject: [PATCH 29/50] Install config-visualizer-gui, move Python installation to basics (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Frédéric Simonis --- provisioning/install-basics.sh | 1 + provisioning/install-config-visualizer.sh | 26 +++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/provisioning/install-basics.sh b/provisioning/install-basics.sh index ff78f0b..05d54c4 100644 --- a/provisioning/install-basics.sh +++ b/provisioning/install-basics.sh @@ -12,6 +12,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 atril firefox firefox-locale-en baobab catfish +sudo apt-get install -y python3-dev pipx python-is-python3 # Setup auto-login for the graphical session # Disabled due to https://github.com/precice/vm/issues/40 diff --git a/provisioning/install-config-visualizer.sh b/provisioning/install-config-visualizer.sh index 06359ac..81d0551 100644 --- a/provisioning/install-config-visualizer.sh +++ b/provisioning/install-config-visualizer.sh @@ -1,18 +1,22 @@ #!/usr/bin/env bash set -ex -# Get the config-visualizer from GitHub -if [ ! -d "config-visualizer/" ]; then - git clone --depth=1 --branch master https://github.com/precice/config-visualizer.git -fi -pip3 install --user -e config-visualizer +# Install CLI dependencies +sudo apt-get install -y graphviz +# Install GUI depedencies +sudo apt-get install -y libcairo2-dev libgirepository1.0-dev gcc libcairo2-dev pkg-config gir1.2-gtk-4.0 + +# Get the config-visualizer from PIP +pipx install precice-config-visualizer +pipx install precice-config-visualizer-gui # Add the config-visualizer to PATH -echo "export PATH=\"\${HOME}/config-visualizer/bin:\${PATH}\"" >>~/.bashrc +# shellcheck disable=SC2016 +echo 'export PATH="${HOME}/.local/bin:${PATH}"' >> ~/.bashrc -# By default, there is no `python` executable, there is only `python3`, -# which causes issues to the config-visualizer -sudo apt-get install -y python-is-python3 +# Add the GUI in the apps menu +mkdir -p ~/.local/share/applications ~/.local/share/icons -# Install graphviz, which provides dot, an almost required package to make this useful -sudo apt-get install -y graphviz +CV_LOC_SHARE=~/.local/pipx/venvs/precice-config-visualizer-gui/share +cp $CV_LOC_SHARE/applications/org.precice.config_visualizer.desktop ~/.local/share/applications/ +cp $CV_LOC_SHARE/icons/hicolor/scalable/apps/org.precice.config_visualizer.svg ~/.local/share/icons/ From c879fc8eff249a1df574d889aa1bb062d9d21411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Tue, 16 Apr 2024 22:01:40 +0200 Subject: [PATCH 30/50] Add missing venv --- provisioning/install-basics.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-basics.sh b/provisioning/install-basics.sh index 05d54c4..d3939b8 100644 --- a/provisioning/install-basics.sh +++ b/provisioning/install-basics.sh @@ -12,7 +12,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 atril firefox firefox-locale-en baobab catfish -sudo apt-get install -y python3-dev pipx python-is-python3 +sudo apt-get install -y python3-dev pipx python-is-python3 python3-venv # Setup auto-login for the graphical session # Disabled due to https://github.com/precice/vm/issues/40 From 876cf15339e0170f813145b1a4d7c23941905732 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 22:05:48 +0200 Subject: [PATCH 31/50] Update README --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2f4f977..e69d1b4 100644 --- a/README.md +++ b/README.md @@ -47,15 +47,18 @@ This box is based on the [generic/ubuntu2004](https://github.com/lavabit/robox/t - Terminator (a nice split-window terminal emulator, find it in `Applications > System`) - Git, CMake, ccmake - Editors: nano, vim, gedit -- preCICE latest for the master branch -- preCICE config visualizer (master) +- Diff viewer: meld +- preCICE latest from the master branch (built in release-with-debug-info mode) +- preCICE config visualizer with its GUI (master) - preCICE Python bindings (PIP) - preCICE Julia bindings (Pkg) +- preCICE Rust bindings (Cargo) +- preCICE FMI Runner (PIP) - 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) -- SU2 6.0.0 and the SU2-preCICE adapter (master) +- SU2 7.5.1 and the SU2-preCICE adapter (master) - code_aster 14.6 and the code_aster-preCICE adapter (master) - DUNE 2.8 and the experimental DUNE-preCICE adapter (master) - ASTE (master) From 58a99fcfa205607f637d022eb77a7838e3a31040 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 22:09:46 +0200 Subject: [PATCH 32/50] Install micro-manager --- Vagrantfile | 1 + provisioning/install-micro-manager.sh | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 provisioning/install-micro-manager.sh diff --git a/Vagrantfile b/Vagrantfile index ec8ba9b..c1c5474 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -50,6 +50,7 @@ Vagrant.configure("2") do |config| 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-fmiprecice.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-micro-manager.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 diff --git a/provisioning/install-micro-manager.sh b/provisioning/install-micro-manager.sh new file mode 100644 index 0000000..bf0ea3b --- /dev/null +++ b/provisioning/install-micro-manager.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -ex + +pip install --user micro-manager-precice From 2a4188db05a7b91ee62eefac7b0b90a989ab9a7b Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 16 Apr 2024 23:23:54 +0200 Subject: [PATCH 33/50] Add Micro-Manager in the README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e69d1b4..2bb743b 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ This box is based on the [generic/ubuntu2004](https://github.com/lavabit/robox/t - preCICE Julia bindings (Pkg) - preCICE Rust bindings (Cargo) - preCICE FMI Runner (PIP) +- preCICE Micro Manager (PIP) - 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) From 9e0a47f97b024ad834fc9b514619817521dbacea Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 17 Apr 2024 12:11:00 +0200 Subject: [PATCH 34/50] Revert back to bento/ubuntu-20.04 (#84) --- README.md | 7 ++++++- Vagrantfile | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2bb743b..6ac24b6 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ A few things you may need: ## What is included? -This box is based on the [generic/ubuntu2004](https://github.com/lavabit/robox/tree/master/scripts/ubuntu2004) base box and installs: +This box is based on the ~~[generic/ubuntu2004](https://github.com/lavabit/robox/tree/master/scripts/ubuntu2004)~~ [bento/ubuntu-20.04](https://github.com/chef/bento) base box and installs: - Xubuntu-core (Xfce desktop environment) and related tools - VirtualBox guest additions @@ -120,6 +120,11 @@ vagrant box remove test-box If you require a more responsive experience, lower overhead, or exotic features such as GPU pass through, then the `libvirt` vagrant box is for you. This allows you to run the vagrant box via libvirt and QEMU as a Kernerl Virtual Machine (KVM). +> Note +> The libvirt variant does not work with the `bento/ubuntu-20.04` base image, but also the VirtualBox variant does not at the moment work with the `generic/ubuntu2004` image. +> Change the base image in the beginning of the Vagrantfile if you need this feature. +> See https://github.com/precice/vm/issues/83 for details. + To use this box, first install the vagrant plugin `vagrant-libvirt` following the [official installation instructions](https://github.com/vagrant-libvirt/vagrant-libvirt#installation). Then you follow the normal usage instructions above, but you need to tell vagrant to use the `libvirt` box by passing one additional option: ``` diff --git a/Vagrantfile b/Vagrantfile index c1c5474..a2878d3 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,7 +4,9 @@ Vagrant.configure("2") do |config| # The generic/ images support virtualbox as well as libvirt and hyperv. # This allows us to create performance oriented images for Linux (libvirt) and Windows (hyperv). - config.vm.box = "generic/ubuntu2004" + # However, it does not build: https://github.com/precice/vm/issues/83 + # config.vm.box = "generic/ubuntu2004" + config.vm.box = "bento/ubuntu-20.04" # We don't want the box to automatically update every time it starts. # We can instead handle updates internally, without destroying the machine. From 86805973b190d3353c164f81fe7c47ad2b934420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Wed, 17 Apr 2024 12:17:04 +0200 Subject: [PATCH 35/50] Fix the config visualizer in the vm (#86) --- provisioning/install-config-visualizer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provisioning/install-config-visualizer.sh b/provisioning/install-config-visualizer.sh index 81d0551..d10d879 100644 --- a/provisioning/install-config-visualizer.sh +++ b/provisioning/install-config-visualizer.sh @@ -4,11 +4,11 @@ set -ex # Install CLI dependencies sudo apt-get install -y graphviz # Install GUI depedencies -sudo apt-get install -y libcairo2-dev libgirepository1.0-dev gcc libcairo2-dev pkg-config gir1.2-gtk-4.0 +sudo apt-get install -y build-essential pkg-config python3-dev libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 # Get the config-visualizer from PIP -pipx install precice-config-visualizer -pipx install precice-config-visualizer-gui +pipx install precice-config-visualizer==1.1.3 +pipx install precice-config-visualizer-gui==0.1.0 # Add the config-visualizer to PATH # shellcheck disable=SC2016 From 627496670771d856b7dff697d40f6e36a89efc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Thu, 18 Apr 2024 16:44:33 +0200 Subject: [PATCH 36/50] Fix link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ac24b6..b544a59 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can afterwards also see and manage the produced VM in VirtualBox. A few things you may need: - The username and password are `vagrant`/`vagrant` -- The keyboard layout is US English (QWERTY). You can change this in [`install-basics.sh`](./install-basics.sh) or through the keyboard setting shortcut on `~/Desktop`. +- The keyboard layout is US English (QWERTY). You can change this in [`install-basics.sh`](./provisioning/install-basics.sh) or through the keyboard setting shortcut on `~/Desktop`. - Find scripts to install additional software on `~/Desktop/shared`. ### What else can I do? From 2bf0132cb7c62c9167bd2d88beb8da4f8263ace7 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 12:04:08 +0200 Subject: [PATCH 37/50] Reinstall config-visualizer if already installed To support continuing from a previously failed build --- provisioning/install-config-visualizer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioning/install-config-visualizer.sh b/provisioning/install-config-visualizer.sh index d10d879..2915857 100644 --- a/provisioning/install-config-visualizer.sh +++ b/provisioning/install-config-visualizer.sh @@ -7,8 +7,8 @@ sudo apt-get install -y graphviz sudo apt-get install -y build-essential pkg-config python3-dev libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 # Get the config-visualizer from PIP -pipx install precice-config-visualizer==1.1.3 -pipx install precice-config-visualizer-gui==0.1.0 +pipx install --force precice-config-visualizer==1.1.3 +pipx install --force precice-config-visualizer-gui==0.1.0 # Add the config-visualizer to PATH # shellcheck disable=SC2016 From cb73901eea6f576c64b79e5640d62789aafb32a9 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 12:04:46 +0200 Subject: [PATCH 38/50] Update OpenFOAM --- README.md | 2 +- provisioning/install-openfoam.sh | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b544a59..64388af 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ This box is based on the ~~[generic/ubuntu2004](https://github.com/lavabit/robox - preCICE Rust bindings (Cargo) - preCICE FMI Runner (PIP) - preCICE Micro Manager (PIP) -- OpenFOAM v2112 and the OpenFOAM-preCICE adapter (master) +- OpenFOAM v2312 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) diff --git a/provisioning/install-openfoam.sh b/provisioning/install-openfoam.sh index 2e9e96e..10c6b8a 100644 --- a/provisioning/install-openfoam.sh +++ b/provisioning/install-openfoam.sh @@ -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 v2206: -sudo apt-get install -y openfoam2206-dev +# Install OpenFOAM v2312: +sudo apt-get install -y openfoam2312-dev # Enable OpenFOAM by default: -echo ". /usr/lib/openfoam/openfoam2206/etc/bashrc" >> ~/.bashrc +echo ". /usr/lib/openfoam/openfoam2312/etc/bashrc" >> ~/.bashrc # Get the OpenFOAM-preCICE adapter if [ ! -d "openfoam-adapter/" ]; then @@ -16,8 +16,9 @@ fi ( cd openfoam-adapter git pull - openfoam2206 ./Allwmake + openfoam2312 ./Allclean + openfoam2312 ./Allwmake ) # Build the tutorials partitioned-heat-conduction solver -cd ~/tutorials/partitioned-heat-conduction/openfoam-solver && openfoam2206 wmake +cd ~/tutorials/partitioned-heat-conduction/solver-openfoam && openfoam2312 wmake From dce8f24a06ba8bdf6be38e5dc7d2fc6bd70c792c Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 12:05:35 +0200 Subject: [PATCH 39/50] Correct CalculiX version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64388af..0669516 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ This box is based on the ~~[generic/ubuntu2004](https://github.com/lavabit/robox - preCICE Micro Manager (PIP) - OpenFOAM v2312 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) +- CalculiX 2.20 from source and the CalculiX-preCICE adapter (master) - FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter (PIP) - SU2 7.5.1 and the SU2-preCICE adapter (master) - code_aster 14.6 and the code_aster-preCICE adapter (master) From 8cc36bfa84ff0c314a0cc44e051120afc0bf287a Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 12:06:30 +0200 Subject: [PATCH 40/50] Disable uninstalling fenics-ufl --- provisioning/post-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/post-install.sh b/provisioning/post-install.sh index 9c52fc1..6f082c2 100644 --- a/provisioning/post-install.sh +++ b/provisioning/post-install.sh @@ -3,7 +3,7 @@ set -ex # Remove fenics-ufl package # Workaround for https://github.com/precice/vm/issues/4 -pip3 uninstall -y fenics-ufl +# pip3 uninstall -y fenics-ufl # Create a link to the default shared folder ln -sf /vagrant/ ~/Desktop/shared From a714000df1758c592a8ce8b37c931059d6b10863 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 12:34:01 +0200 Subject: [PATCH 41/50] Fix pipx venv path for config-visualizer --- provisioning/install-config-visualizer.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/provisioning/install-config-visualizer.sh b/provisioning/install-config-visualizer.sh index 2915857..6538322 100644 --- a/provisioning/install-config-visualizer.sh +++ b/provisioning/install-config-visualizer.sh @@ -7,8 +7,10 @@ sudo apt-get install -y graphviz sudo apt-get install -y build-essential pkg-config python3-dev libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 # Get the config-visualizer from PIP -pipx install --force precice-config-visualizer==1.1.3 -pipx install --force precice-config-visualizer-gui==0.1.0 +PRECEICE_CONFIG_VISUALIZER_VERSION=1.1.3 +PRECEICE_CONFIG_VISUALIZER_GUI_VERSION=0.1.0 +pipx install --force precice-config-visualizer==${PRECEICE_CONFIG_VISUALIZER_VERSION} +pipx install --force precice-config-visualizer-gui==${PRECEICE_CONFIG_VISUALIZER_GUI_VERSION} # Add the config-visualizer to PATH # shellcheck disable=SC2016 @@ -17,6 +19,6 @@ echo 'export PATH="${HOME}/.local/bin:${PATH}"' >> ~/.bashrc # Add the GUI in the apps menu mkdir -p ~/.local/share/applications ~/.local/share/icons -CV_LOC_SHARE=~/.local/pipx/venvs/precice-config-visualizer-gui/share +CV_LOC_SHARE=~/.local/pipx/venvs/precice-config-visualizer-gui\=\=${PRECEICE_CONFIG_VISUALIZER_GUI_VERSION}/share cp $CV_LOC_SHARE/applications/org.precice.config_visualizer.desktop ~/.local/share/applications/ cp $CV_LOC_SHARE/icons/hicolor/scalable/apps/org.precice.config_visualizer.svg ~/.local/share/icons/ From e12ca135d962fd48a2840773be5c788d52dda75f Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 13:09:44 +0200 Subject: [PATCH 42/50] Fix shellcheck complaints --- provisioning/install-config-visualizer.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/provisioning/install-config-visualizer.sh b/provisioning/install-config-visualizer.sh index 6538322..2e2bde0 100644 --- a/provisioning/install-config-visualizer.sh +++ b/provisioning/install-config-visualizer.sh @@ -7,10 +7,10 @@ sudo apt-get install -y graphviz sudo apt-get install -y build-essential pkg-config python3-dev libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 # Get the config-visualizer from PIP -PRECEICE_CONFIG_VISUALIZER_VERSION=1.1.3 -PRECEICE_CONFIG_VISUALIZER_GUI_VERSION=0.1.0 -pipx install --force precice-config-visualizer==${PRECEICE_CONFIG_VISUALIZER_VERSION} -pipx install --force precice-config-visualizer-gui==${PRECEICE_CONFIG_VISUALIZER_GUI_VERSION} +PRECICE_CONFIG_VISUALIZER_VERSION=1.1.3 +PRECICE_CONFIG_VISUALIZER_GUI_VERSION=0.1.0 +pipx install --force precice-config-visualizer==${PRECICE_CONFIG_VISUALIZER_VERSION} +pipx install --force precice-config-visualizer-gui==${PRECICE_CONFIG_VISUALIZER_GUI_VERSION} # Add the config-visualizer to PATH # shellcheck disable=SC2016 @@ -19,6 +19,6 @@ echo 'export PATH="${HOME}/.local/bin:${PATH}"' >> ~/.bashrc # Add the GUI in the apps menu mkdir -p ~/.local/share/applications ~/.local/share/icons -CV_LOC_SHARE=~/.local/pipx/venvs/precice-config-visualizer-gui\=\=${PRECEICE_CONFIG_VISUALIZER_GUI_VERSION}/share +CV_LOC_SHARE=~/.local/pipx/venvs/precice-config-visualizer-gui==${PRECICE_CONFIG_VISUALIZER_GUI_VERSION}/share cp $CV_LOC_SHARE/applications/org.precice.config_visualizer.desktop ~/.local/share/applications/ cp $CV_LOC_SHARE/icons/hicolor/scalable/apps/org.precice.config_visualizer.svg ~/.local/share/icons/ From 7cdf04af7514b048d32ba36dead0fe0a7ae6b260 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 14:20:02 +0200 Subject: [PATCH 43/50] Fix SU2 paths --- provisioning/install-su2.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/provisioning/install-su2.sh b/provisioning/install-su2.sh index 935d257..35eb466 100644 --- a/provisioning/install-su2.sh +++ b/provisioning/install-su2.sh @@ -9,13 +9,13 @@ wget --quiet https://github.com/su2code/SU2/archive/refs/tags/v7.5.1.tar.gz tar -xzf v7.5.1.tar.gz rm -fv v7.5.1.tar.gz -# Add SU2 to PATH and apply. +# Add SU2 and the SU2 adapter to PATH and apply. # We first export to a separate script, so that we can load it here (non-interactive shell). { echo "export SU2_HOME=\"\${HOME}/SU2-7.5.1\"" - echo "export SU2_RUN=\"\${SU2_HOME}/SU2_CFD/bin\"" - echo "export PATH=\"\${SU2_RUN}:\${PATH}\"" - echo "export PYTHONPATH=\"\${SU2_RUN}:\${PYTHONPATH}\"" + echo "export SU2_RUN=\"\${SU2_HOME}/SU2_CFD\"" + echo "export PATH=\"\${SU2_RUN}/bin/:\${HOME}/su2-adapter/run/:\${PATH}\"" + echo "export PYTHONPATH=\"\${SU2_RUN}/bin/:\${PYTHONPATH}\"" } >> ~/.su2-bashrc echo ". \${HOME}/.su2-bashrc" >> ~/.bashrc From 6fb6393da9781a924d7b6e139d0758b707963908 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 19 Apr 2024 14:21:28 +0200 Subject: [PATCH 44/50] Update config-visualizer aliases --- provisioning/.alias | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provisioning/.alias b/provisioning/.alias index 4831f56..17c3eac 100644 --- a/provisioning/.alias +++ b/provisioning/.alias @@ -1,12 +1,12 @@ # preCICE config visualizer function preciceToPNG(){ - cat "${1:-precice-config.xml}" | precice-config-visualizer | dot -Tpng > precice-config.png + precice-config-visualizer "${1:-precice-config.xml}" | dot -Tpng > precice-config.png } function preciceToPDF(){ - cat "${1:-precice-config.xml}" | precice-config-visualizer | dot -Tpdf > precice-config.pdf + precice-config-visualizer "${1:-precice-config.xml}" | dot -Tpdf > precice-config.pdf } function preciceToSVG(){ - cat "${1:-precice-config.xml}" | precice-config-visualizer | dot -Tsvg > precice-config.svg + precice-config-visualizer "${1:-precice-config.xml}" | dot -Tsvg > precice-config.svg } From ab7279e39a0ee797db00bf493aed0bf551b8310a Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 20 Apr 2024 07:41:03 +0200 Subject: [PATCH 45/50] Disable VBOXSYMLINKCREATE for GitHub Actions Debugging --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b298d37..47114cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: - name: Run vagrant up run: | - vagrant up --provider=${{ matrix.provider }} + VAGRANT_DISABLE_VBOXSYMLINKCREATE=1 vagrant up --provider=${{ matrix.provider }} - name: Package Vagrant box run: vagrant package --base "preCICE-VM" --output preCICE.box From de16019a5e375dae3818be48210fe8ba90474501 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 23 Apr 2024 17:13:04 +0200 Subject: [PATCH 46/50] Add DuMux 3.8 and update DUNE to 2.9.1 (#87) --- README.md | 3 +- provisioning/install-dune.sh | 63 +++++++++++++++++++++++------------- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 0669516..a52559f 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,8 @@ This box is based on the ~~[generic/ubuntu2004](https://github.com/lavabit/robox - FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter (PIP) - SU2 7.5.1 and the SU2-preCICE adapter (master) - code_aster 14.6 and the code_aster-preCICE adapter (master) -- DUNE 2.8 and the experimental DUNE-preCICE adapter (master) +- DUNE 2.9.1 and the experimental DUNE-preCICE adapter (main) +- DuMuX 3.8 and the DuMuX-preCICE adapter (v2.0.0) - ASTE (master) - Paraview from APT - Gnuplot diff --git a/provisioning/install-dune.sh b/provisioning/install-dune.sh index 432ca9c..2507ae5 100755 --- a/provisioning/install-dune.sh +++ b/provisioning/install-dune.sh @@ -1,72 +1,89 @@ #!/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 +# Make a folder to collect all DUNE-related code +mkdir -p dune-dumux && cd dune-dumux -# Get required DUNE modules +# Modules used by DUNE and DuMux +# While the installdumux.py script clones these as well, +# we explicitly clone them to control the versions. if [ ! -d "dune-common/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-common.git + git clone --depth 1 --branch v2.9.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 + git clone --depth 1 --branch v2.9.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 + git clone --depth 1 --branch v2.9.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 + git clone --depth 1 --branch v2.9.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 + git clone --depth 1 --branch v2.9.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 +if [ ! -d "dune-foamgrid/" ]; then + # The missing v in the tag in this module originates from the project itself + git clone --depth 1 --branch 2.9.1 https://gitlab.dune-project.org/extensions/dune-foamgrid.git fi -if [ ! -d "dune-uggrid/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-uggrid.git +if [ ! -d "dune-functions/" ]; then + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/staging/dune-functions.git fi if [ ! -d "dune-typetree/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-typetree.git + git clone --depth 1 --branch v2.9.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 +if [ ! -d "dune-uggrid/" ]; then + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/staging/dune-uggrid.git fi -# Get the dune-elastodynamics module (solid solver) +# Get the dune-elastodynamics module (solid solver for the plain dune adapter) if [ ! -d "dune-elastodynamics/" ]; then - git clone --branch master --depth=1 https://github.com/maxfirmbach/dune-elastodynamics.git + git clone --depth 1 --branch master https://github.com/maxfirmbach/dune-elastodynamics.git fi ( cd dune-elastodynamics git pull ) -# Get the DUNE-preCICE adapter +# Get the plain DUNE-preCICE adapter if [ ! -d "dune-adapter/" ]; then - git clone --branch main --depth=1 https://github.com/precice/dune-adapter.git + git clone --depth 1 --branch main 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 +./dune-common/bin/dunecontrol all + +# Get DuMux and the DuMux-preCICE adapter +if [ ! -d "dumux/" ]; then + git clone --depth 1 --branch releases/3.8 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git +fi + +# Build DuMux +CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_DISABLE_FIND_PACKAGE_Kokkos=TRUE" ./dune-common/bin/dunecontrol --only=dumux all + +if [ ! -d "dumux-adapter/" ]; then + git clone --depth 1 --branch v2.0.0 https://github.com/precice/dumux-adapter.git +fi + +# Build the DuMux-preCICE adapter +CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_DISABLE_FIND_PACKAGE_Kokkos=TRUE" ./dune-common/bin/dunecontrol --only=dumux-precice all # Set the DUNE_CONTROL_PATH (DUNE recursively finds modules in this directory) -echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune\"" >> ~/.bashrc +echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune-dumux\"" >> ~/.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 +cp ~/dune-dumux/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 ~ From 03eb24fd8236ecc9ebc609de476da540e179375d Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 23 Apr 2024 18:16:37 +0200 Subject: [PATCH 47/50] Version-agnostic apt install of preCICE Debian package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Frédéric Simonis --- provisioning/install-precice.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index fd8498c..51e7711 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -17,7 +17,7 @@ fi cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -Wno-dev .. make -j "$(nproc)" rm -fv ./*.deb && make package - sudo apt-get install -y ./libprecice3_*.deb + sudo apt-get install -y ./libprecice*_*.deb # Remove generated packages to save space (approx. 70MB) rm -rfv ./*.deb ./*.tar.gz _CPack_Packages ) From c08fdcc8b2d754ee4b000de6e1f83a2134ac72ad Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 23 Apr 2024 18:17:09 +0200 Subject: [PATCH 48/50] Install polars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Frédéric Simonis --- provisioning/install-precice.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 51e7711..4c760f7 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -62,7 +62,7 @@ pip3 install --upgrade pip pip3 install --user pyprecice # Additional python packages -pip3 install --user pandas matplotlib # Needed for the post-processing scripts +pip3 install --user pandas matplotlib polars # Needed for the post-processing scripts # Get the Python solverdummy into the examples if [ ! -d "python-bindings/" ]; then From 235bd037a471fd0a36b2ba0806c5dd322b40e4a3 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 23 Apr 2024 18:20:15 +0200 Subject: [PATCH 49/50] Simplify config-visualizer aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit co-authored-by: Frédéric Simonis --- provisioning/.alias | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provisioning/.alias b/provisioning/.alias index 17c3eac..67234b9 100644 --- a/provisioning/.alias +++ b/provisioning/.alias @@ -1,12 +1,12 @@ # preCICE config visualizer function preciceToPNG(){ - precice-config-visualizer "${1:-precice-config.xml}" | dot -Tpng > precice-config.png + precice-config-visualizer -o precice-config.png "${1:-precice-config.xml}" } function preciceToPDF(){ - precice-config-visualizer "${1:-precice-config.xml}" | dot -Tpdf > precice-config.pdf + precice-config-visualizer -o precice-config.pdf "${1:-precice-config.xml}" } function preciceToSVG(){ - precice-config-visualizer "${1:-precice-config.xml}" | dot -Tsvg > precice-config.svg + precice-config-visualizer -o precice-config.svg "${1:-precice-config.xml}" } From 8f4fc38b94a78741cc55d17967e8623b0e03e4ca Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 23 Apr 2024 18:23:32 +0200 Subject: [PATCH 50/50] Enable debug log in preCICE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Frédéric Simonis --- provisioning/install-precice.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 4c760f7..cda6d35 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -14,7 +14,7 @@ fi cd precice git pull mkdir -p build && cd build/ - cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -Wno-dev .. + cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRECICE_RELEASE_WITH_DEBUG_LOG=ON -DBUILD_TESTING=OFF -Wno-dev .. make -j "$(nproc)" rm -fv ./*.deb && make package sudo apt-get install -y ./libprecice*_*.deb