diff --git a/README.md b/README.md index a52559f..34617ae 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## What does this do? -Vagrant pulls an Ubuntu 20.04 "base box" and asks e.g. VirtualBox to start a virtual machine. +Vagrant pulls an Ubuntu 24.04 "base box" and asks e.g. VirtualBox to start a virtual machine. It then installs basic tools (such as a desktop environment), a preCICE release, several solvers and adapters, as well as example and tutorial files. @@ -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)~~ [bento/ubuntu-20.04](https://github.com/chef/bento) base box and installs: +This box is based on the [bento/ubuntu-24.04](https://github.com/chef/bento) base box and installs: - Xubuntu-core (Xfce desktop environment) and related tools - VirtualBox guest additions @@ -58,12 +58,9 @@ This box is based on the ~~[generic/ubuntu2004](https://github.com/lavabit/robox - 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.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) - 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 @@ -76,6 +73,12 @@ The adapter repositories remain in `/home/vagrant/`. It also adds a few shortcuts on the Desktop (see `post-install.sh`). At the end, it cleans up all object files and the APT cache (see `cleanup.sh`). +## What should be there but is currently not included? + +- ASTE (master) +- code_aster 14.6 and the code_aster-preCICE adapter (master) +- FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter (PIP) + ## Troubleshooting ### This does not seem to work on my machine diff --git a/Vagrantfile b/Vagrantfile index a2878d3..32c519e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,7 +6,7 @@ Vagrant.configure("2") do |config| # This allows us to create performance oriented images for Linux (libvirt) and Windows (hyperv). # However, it does not build: https://github.com/precice/vm/issues/83 # config.vm.box = "generic/ubuntu2004" - config.vm.box = "bento/ubuntu-20.04" + config.vm.box = "bento/ubuntu-24.04" # We don't want the box to automatically update every time it starts. # We can instead handle updates internally, without destroying the machine. @@ -50,15 +50,18 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", path: "provisioning/install-openfoam.sh", privileged: false 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 + # FEniCS is not yet available for Ubuntu 24.04: https://launchpad.net/~fenics-packages/+archive/ubuntu/fenics + # 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 + # code_aster does not build on Ubuntu 22.04/24.04 due to multiple issues: https://github.com/precice/code_aster-adapter/issues/26 + # 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 + # VTK dependency conflicts with ParaView + # 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 index 1dbae5a..0ea4c8a 100644 --- a/provisioning/install-aste.sh +++ b/provisioning/install-aste.sh @@ -2,9 +2,16 @@ set -ex # Install the C++ vtk library -sudo apt-get -y install libvtk7-dev + +# The following packages have unmet dependencies: +# python3-paraview : Conflicts: python3-vtk9 but 9.1.0+really9.1.0+dfsg2-7.1build3 is to be installed +# sudo apt-get -y install libvtk9-dev + sudo apt-get -y install libmetis-dev +python -m venv ~/python-venvs/aste +source ~/python-venvs/aste/bin/activate + python3 -m pip install sympy scipy jinja2 # Get aste @@ -21,3 +28,5 @@ fi # Add aste to PATH and libmetis to the library path echo "export PATH=\"\${HOME}/aste/build:\${PATH}\"" >>~/.bashrc echo "export LD_LIBRARY_PATH=\"\${HOME}/aste/build:\${LD_LIBRARY_PATH}\"" >>~/.bashrc + +deactivate diff --git a/provisioning/install-basics.sh b/provisioning/install-basics.sh index d3939b8..0898a80 100644 --- a/provisioning/install-basics.sh +++ b/provisioning/install-basics.sh @@ -10,7 +10,7 @@ sudo apt-get update 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 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 python3-venv @@ -19,7 +19,7 @@ sudo apt-get install -y python3-dev pipx python-is-python3 python3-venv # echo "autologin-user=vagrant" | sudo tee --append /usr/share/lightdm/lightdm.conf.d/60-xubuntu.conf # Install the VirtualBox guest additions -sudo apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 +sudo apt-get install -y virtualbox-guest-utils virtualbox-guest-x11 # Create Desktop mkdir -p ~/Desktop diff --git a/provisioning/install-calculix.sh b/provisioning/install-calculix.sh index 613b803..7a4d824 100644 --- a/provisioning/install-calculix.sh +++ b/provisioning/install-calculix.sh @@ -16,7 +16,7 @@ fi ( cd calculix-adapter git pull - make -j "$(nproc)" + ADDITIONAL_FFLAGS=-fallow-argument-mismatch make -j "$(nproc)" ) # Add the CalculiX adapter to PATH diff --git a/provisioning/install-config-visualizer.sh b/provisioning/install-config-visualizer.sh index 2e2bde0..e20bb7c 100644 --- a/provisioning/install-config-visualizer.sh +++ b/provisioning/install-config-visualizer.sh @@ -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==${PRECICE_CONFIG_VISUALIZER_GUI_VERSION}/share +CV_LOC_SHARE=~/.local/share/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/ diff --git a/provisioning/install-dealii.sh b/provisioning/install-dealii.sh index c0efc13..6fc1a31 100644 --- a/provisioning/install-dealii.sh +++ b/provisioning/install-dealii.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash set -ex -# 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 diff --git a/provisioning/install-fenics.sh b/provisioning/install-fenics.sh index 8348604..0efa159 100644 --- a/provisioning/install-fenics.sh +++ b/provisioning/install-fenics.sh @@ -8,4 +8,7 @@ sudo apt-get -y update sudo apt-get -y install --no-install-recommends fenics # Install the FEniCS-preCICE adapter from PIP -pip3 install --user fenicsprecice +python -m venv ~/python-venvs/fenicsprecice +source ~/python-venvs/fenicsprecice/bin/activate +python -m pip install fenicsprecice +deactivate diff --git a/provisioning/install-fmiprecice.sh b/provisioning/install-fmiprecice.sh index 3a59461..58209dd 100644 --- a/provisioning/install-fmiprecice.sh +++ b/provisioning/install-fmiprecice.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash set -ex +python -m venv ~/python-venvs/fmiprecice +source ~/python-venvs/fmiprecice/bin/activate + # Install the FMI runner from PIP -pip3 install --user fmiprecice +python -m pip install fmiprecice + +deactivate diff --git a/provisioning/install-julia-bindings.sh b/provisioning/install-julia-bindings.sh index 00d8d07..04d4888 100644 --- a/provisioning/install-julia-bindings.sh +++ b/provisioning/install-julia-bindings.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash +python -m venv ~/python-venvs/julia +source ~/python-venvs/julia/bin/activate + # install latest julia -pip3 install jill +python -m pip install jill jill install --confirm # install preCICE bindings @@ -9,3 +12,5 @@ julia -e 'using Pkg; Pkg.add("PreCICE")' # to test the installation, run the following command: # julia -e 'using Pkg; Pkg.test("PreCICE")' + +deactivate diff --git a/provisioning/install-micro-manager.sh b/provisioning/install-micro-manager.sh index bf0ea3b..f5e8451 100644 --- a/provisioning/install-micro-manager.sh +++ b/provisioning/install-micro-manager.sh @@ -1,4 +1,9 @@ #!/usr/bin/env bash set -ex -pip install --user micro-manager-precice +python -m venv ~/python-venvs/micro-manager +source ~/python-venvs/micro-manager/bin/activate + +python -m pip install micro-manager-precice + +deactivate diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index cda6d35..4f8a72c 100644 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -58,11 +58,16 @@ sudo apt-get -y install gnuplot # needed for watchpoint scripts of tutorials ### OPTIONAL - preCICE Python bindings and Python example # Get PIP and the preCICE Python bindings sudo apt-get install -y python3-pip -pip3 install --upgrade pip -pip3 install --user pyprecice -# Additional python packages -pip3 install --user pandas matplotlib polars # Needed for the post-processing scripts +python -m venv ~/python-venvs/pyprecice +source ~/python-venvs/pyprecice/bin/activate + +python -m pip install pyprecice + +# Additional python packages -> Should go into tutorials venvs +# pip3 install --user pandas matplotlib polars # Needed for the post-processing scripts + +deactivate # Get the Python solverdummy into the examples if [ ! -d "python-bindings/" ]; then diff --git a/provisioning/install-su2.sh b/provisioning/install-su2.sh index 35eb466..e0578bb 100644 --- a/provisioning/install-su2.sh +++ b/provisioning/install-su2.sh @@ -2,7 +2,10 @@ set -ex # Install dependencies -pip3 install --user mpi4py +python -m venv ~/python-venvs/su2precice +source ~/python-venvs/su2precice/bin/activate +python -m pip install mpi4py setuptools +sudo apt-get -y install swig # Get SU2 7.5.1 from GitHub wget --quiet https://github.com/su2code/SU2/archive/refs/tags/v7.5.1.tar.gz @@ -35,9 +38,15 @@ fi # Configure and build the SU2 adapter ( cd "${SU2_HOME}" + + # Add a previously implied header (compatibility with Ubuntu 24.04) + sed -i '1s/^/#include \n/' SU2_CFD/src/output/filewriter/CParaviewXMLFileWriter.cpp + ./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-7.5.1/SU2_CFD/obj/libSU2Core.a + +deactivate diff --git a/provisioning/post-install.sh b/provisioning/post-install.sh index 6f082c2..583b2a3 100644 --- a/provisioning/post-install.sh +++ b/provisioning/post-install.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash set -ex -# 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