From cf30a35d0c6f7f11cdd87de4a20a7693f16dea5b Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 5 Oct 2022 11:34:08 +0200 Subject: [PATCH 01/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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/14] 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