From a6502b290009664b326344cfc551c483719ea723 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 12:16:34 +0200 Subject: [PATCH 1/8] Upgrade to Ubuntu 26.04 --- Vagrantfile | 13 ++++++------- provisioning/install-fenics.sh | 5 +---- provisioning/install-precice.sh | 7 ++++--- provisioning/install-su2.sh | 27 +++++++++++++++++++++------ provisioning/install-training-fsi.sh | 2 +- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 4960a2e..6427284 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-24.04" + config.vm.box = "bento/ubuntu-26.04" # We don't want the box to automatically update every time it starts. # We can instead handle updates internally, without destroying the machine. @@ -18,9 +18,9 @@ Vagrant.configure("2") do |config| # Display the VirtualBox GUI when booting the machine vb.gui = true # Number of cores - vb.cpus = 2 + vb.cpus = 4 # Customize the amount of memory on the VM: - vb.memory = "2048" + vb.memory = "4096" # Video memory (the default may be too low for some applications) vb.customize ["modifyvm", :id, "--vram", "64"] # The default graphics controller is VboxSVGA. This seems to cause issues with auto-scaling. @@ -32,8 +32,8 @@ Vagrant.configure("2") do |config| config.vm.provider :libvirt do |lv| lv.forward_ssh_port = true lv.title = "preCICE-VM" - lv.cpus = 2 - lv.memory = 2048 + lv.cpus = 4 + lv.memory = 4096 end # Install a desktop environment and basic tools @@ -56,8 +56,7 @@ Vagrant.configure("2") do |config| # NOTE: In Ubuntu 24.04, building ASTE will succeed, but running the aste-turbine tutorial, for example, will break. # See the documentation: https://precice.org/tooling-aste.html#dependencies - # Disabling until the upgrade to Ubuntu 26.04 - # config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false + config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false # Install additional packages for training config.vm.provision "shell", path: "provisioning/install-training-python.sh", privileged: false diff --git a/provisioning/install-fenics.sh b/provisioning/install-fenics.sh index e4ec5e5..3d1e916 100755 --- a/provisioning/install-fenics.sh +++ b/provisioning/install-fenics.sh @@ -1,11 +1,8 @@ #!/usr/bin/env bash set -ex -# Install FEniCS from APT -sudo apt-get install -y software-properties-common -sudo add-apt-repository -y ppa:fenics-packages/fenics sudo apt-get -y update -sudo apt-get -y install --no-install-recommends fenics +sudo apt-get -y install fenics # Install the FEniCS-preCICE adapter from PIP # python -m venv ~/python-venvs/fenicsprecice diff --git a/provisioning/install-precice.sh b/provisioning/install-precice.sh index 434e5d0..a6bf9e2 100755 --- a/provisioning/install-precice.sh +++ b/provisioning/install-precice.sh @@ -13,6 +13,10 @@ fi ( cd precice git pull + + # Patch for Ubuntu 26.04, see https://github.com/precice/precice/commit/6a0be7aa64087f21740c566921e83e97e03e1067 + sed -i 's/libxml2/libxml2-dev/g' cmake/CPackConfig.cmake + mkdir -p build && cd build/ 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)" @@ -43,9 +47,6 @@ fi ( cd tutorials/quickstart/solid-cpp/ && cmake . && make ) -( - cd tutorials/heat-exchanger && ./download-meshes.sh -) sudo apt-get -y install gnuplot # needed for watchpoint scripts of tutorials diff --git a/provisioning/install-su2.sh b/provisioning/install-su2.sh index fd65b96..5700516 100755 --- a/provisioning/install-su2.sh +++ b/provisioning/install-su2.sh @@ -9,14 +9,12 @@ python -m pip install mpi4py setuptools # pyprecice is installed by the tutorial 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 -tar -xzf v7.5.1.tar.gz -rm -fv v7.5.1.tar.gz +git clone --depth=1 --branch=v7.5.1 --recurse-submodules https://github.com/su2code/SU2.git # 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_HOME=\"\${HOME}/SU2\"" 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}\"" @@ -42,12 +40,29 @@ fi # Add a previously implied header (compatibility with Ubuntu 24.04) sed -i '1s/^/#include \n/' SU2_CFD/src/output/filewriter/CParaviewXMLFileWriter.cpp + sed -i '1s/^/#include \n/' SU2_CFD/src/SU2_CFD.cpp - ./meson.py build -Denable-pywrapper=true --prefix="${SU2_RUN}" &&\ + # Replace pipes with shlex in Ninja configure (compatibility with Ubuntu 26.04 and Python >= 3.13) + # See https://github.com/ninja-build/ninja/commit/9cf13cd1ecb7ae649394f4133d121a01e191560b + sed -i 's/pipes/shlex/g' externals/ninja/configure.py + + # Disable CGNS with -Denable-cgns=false. Workaround for: + # default: FAILED: externals/cgns/libcgns.a.p/adf_ADF_internals.c.o + # default: cc -Iexternals/cgns/libcgns.a.p -Iexternals/cgns -I../externals/cgns -Iexternals/cgns/hdf5 -I../externals/cgns/hdf5 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -std=c99 -O3 -fPIC -Wno-unused-result -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-sign-compare -Wno-error=unused-function -Wno-pedantic -Wno-error=stringop-truncation -Wno-stringop-truncation -Wno-error=absolute-value -Wno-error=class-memaccess -MD -MQ externals/cgns/libcgns.a.p/adf_ADF_internals.c.o -MF externals/cgns/libcgns.a.p/adf_ADF_internals.c.o.d -o externals/cgns/libcgns.a.p/adf_ADF_internals.c.o -c ../externals/cgns/adf/ADF_internals.c + # default: ../externals/cgns/adf/ADF_internals.c: In function ‘ADFI_open_file’: + # default: ../externals/cgns/adf/ADF_internals.c:194:17: error: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration] + # default: 194 | # define FILENO fileno + # default: | ^~~~~~ + # default: ../externals/cgns/adf/ADF_internals.c:5531:32: note: in expansion of macro ‘FILENO’ + # default: 5531 | f_ret = ftmp == NULL ? -1 : FILENO(ftmp); + # default: | ^~~~~~ + # + # Also set -Denable-tecio=false, as it is not needed, to save space. + ./meson.py build -Denable-pywrapper=true -Denable-cgns=false -Denable-tecio=false --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 +rm -fv ~/SU2/SU2_CFD/obj/libSU2Core.a deactivate diff --git a/provisioning/install-training-fsi.sh b/provisioning/install-training-fsi.sh index 238e66d..ef2e72c 100755 --- a/provisioning/install-training-fsi.sh +++ b/provisioning/install-training-fsi.sh @@ -11,7 +11,7 @@ pipx install ccx2paraview # FreeCAD AppImage from https://www.freecad.org/downloads.php (~780MB) ( cd ~/Desktop - wget https://github.com/FreeCAD/FreeCAD/releases/download/1.1.1/FreeCAD_1.1.1-Linux-x86_64-py311.AppImage + wget --quiet https://github.com/FreeCAD/FreeCAD/releases/download/1.1.1/FreeCAD_1.1.1-Linux-x86_64-py311.AppImage mv FreeCAD_1.1.1-Linux-x86_64-py311.AppImage FreeCAD.AppImage chmod +x FreeCAD.AppImage ) \ No newline at end of file From 5ca6ed44de8f7353c0cae5a40c457a1ab25e9853 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 12:19:01 +0200 Subject: [PATCH 2/8] Update comments in install-su2.sh --- provisioning/install-su2.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/provisioning/install-su2.sh b/provisioning/install-su2.sh index 5700516..b97b595 100755 --- a/provisioning/install-su2.sh +++ b/provisioning/install-su2.sh @@ -8,7 +8,7 @@ source ~/python-venvs/su2precice/bin/activate python -m pip install mpi4py setuptools # pyprecice is installed by the tutorials sudo apt-get -y install swig -# Get SU2 7.5.1 from GitHub +# Get SU2 from GitHub git clone --depth=1 --branch=v7.5.1 --recurse-submodules https://github.com/su2code/SU2.git # Add SU2 and the SU2 adapter to PATH and apply. @@ -46,18 +46,7 @@ fi # See https://github.com/ninja-build/ninja/commit/9cf13cd1ecb7ae649394f4133d121a01e191560b sed -i 's/pipes/shlex/g' externals/ninja/configure.py - # Disable CGNS with -Denable-cgns=false. Workaround for: - # default: FAILED: externals/cgns/libcgns.a.p/adf_ADF_internals.c.o - # default: cc -Iexternals/cgns/libcgns.a.p -Iexternals/cgns -I../externals/cgns -Iexternals/cgns/hdf5 -I../externals/cgns/hdf5 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -std=c99 -O3 -fPIC -Wno-unused-result -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-sign-compare -Wno-error=unused-function -Wno-pedantic -Wno-error=stringop-truncation -Wno-stringop-truncation -Wno-error=absolute-value -Wno-error=class-memaccess -MD -MQ externals/cgns/libcgns.a.p/adf_ADF_internals.c.o -MF externals/cgns/libcgns.a.p/adf_ADF_internals.c.o.d -o externals/cgns/libcgns.a.p/adf_ADF_internals.c.o -c ../externals/cgns/adf/ADF_internals.c - # default: ../externals/cgns/adf/ADF_internals.c: In function ‘ADFI_open_file’: - # default: ../externals/cgns/adf/ADF_internals.c:194:17: error: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration] - # default: 194 | # define FILENO fileno - # default: | ^~~~~~ - # default: ../externals/cgns/adf/ADF_internals.c:5531:32: note: in expansion of macro ‘FILENO’ - # default: 5531 | f_ret = ftmp == NULL ? -1 : FILENO(ftmp); - # default: | ^~~~~~ - # - # Also set -Denable-tecio=false, as it is not needed, to save space. + # Disable unnecessary dependencies to save space and to workaround an issue that CGNS does not build. ./meson.py build -Denable-pywrapper=true -Denable-cgns=false -Denable-tecio=false --prefix="${SU2_RUN}" &&\ ./ninja -C build install ) From 1b8c9732999e41ffbaad10be697eee477ed0f242 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 12:22:40 +0200 Subject: [PATCH 3/8] Refine comments --- Vagrantfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 6427284..ca69503 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -54,7 +54,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", path: "provisioning/install-micro-manager.sh", privileged: false config.vm.provision "shell", path: "provisioning/install-paraview.sh", privileged: false - # NOTE: In Ubuntu 24.04, building ASTE will succeed, but running the aste-turbine tutorial, for example, will break. + # NOTE: On Ubuntu 24.04, building ASTE will succeed, but running the aste-turbine tutorial, for example, will break. # See the documentation: https://precice.org/tooling-aste.html#dependencies config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false @@ -68,11 +68,10 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", path: "provisioning/install-dune.sh", privileged: false config.vm.provision "shell", path: "provisioning/install-su2.sh", privileged: false - # Rust tutorials incompatible with cargo 1.75.0, shipped with Ubuntu 24.04 - # Error: The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.75.0). - # config.vm.provision "shell", path: "provisioning/install-rust-bindings.sh", privileged: false + # NOTE: On Ubuntu 24.04, the Rust cargo installation is too old. + config.vm.provision "shell", path: "provisioning/install-rust-bindings.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 + # code_aster does not build on Ubuntu 22.04 or later 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 # Post-installation steps From 0b271c0a5e9f144c5b034b0a96af04f9c35afdd9 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 18:46:07 +0200 Subject: [PATCH 4/8] Install file-roller (archive manager) --- 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 74d429c..43df04e 100755 --- 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 atril 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 file-roller sudo apt-get install -y python3-dev pipx python-is-python3 python3-venv python3-pip python3-pybind11 # Setup auto-login for the graphical session From 872a0a7a545624fb9a1f4114cda9c0b4712d978c Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 18:47:12 +0200 Subject: [PATCH 5/8] Patch dune-elastodynamics --- provisioning/install-dune.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/provisioning/install-dune.sh b/provisioning/install-dune.sh index 7dc6e35..c1dfbc4 100755 --- a/provisioning/install-dune.sh +++ b/provisioning/install-dune.sh @@ -51,6 +51,8 @@ fi ( cd dune-elastodynamics git pull + # Apply patch https://github.com/maxfirmbach/dune-elastodynamics/pull/2 + sed -i 's/VERSION 3.1/VERSION 3.13/g' CMakeLists.txt ) # Get the plain DUNE-preCICE adapter From c49995f0b078d3d1e84d8f1245b942378e4470c5 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 19:02:13 +0200 Subject: [PATCH 6/8] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1af6fee..03dd8da 100644 --- a/README.md +++ b/README.md @@ -51,9 +51,11 @@ This box is based on the [bento/ubuntu-24.04](https://github.com/chef/bento) bas - preCICE latest from the master branch (built in release-with-debug-info mode) - preCICE config visualizer with its GUI (PyPI, latest) - preCICE Python bindings (PyPI, latest), under `~/python-venvs/pyprecice`. +- preCICE Rust bindings (Cargo, latest) - preCICE Julia bindings (Pkg, latest) - preCICE FMI Runner (PyPI, latest) - preCICE Micro Manager (PyPI, latest) +- ASTE (Git, develop branch) - OpenFOAM v2512 and the OpenFOAM-preCICE adapter (Git, develop branch) - deal.II 9.5 from the official PPA and the deal.II-preCICE adapter (Git, develop branch) - CalculiX 2.20 from source and the CalculiX-preCICE adapter (Git, develop branch) @@ -75,8 +77,6 @@ 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 (Git, develop branch) -> Cannot build using the VTK packages bundled in Ubuntu 24.04. Will enable again in the next upgrade. -- preCICE Rust bindings (Cargo, latest) -> Cargo too old in Ubuntu 24.04. - code_aster 14.6 and the code_aster-preCICE adapter -> Adapter currently unmaintained. ## Troubleshooting From afe0fbb465f1b9d9b1e8a8bb2ce919c9f925bb5f Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 20:54:46 +0200 Subject: [PATCH 7/8] Reload the VM during provisioning --- README.md | 2 +- Vagrantfile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 03dd8da..f412c75 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Ready-to-use boxes are available on [Vagrant Cloud](https://app.vagrantup.com/pr **Note:** If you only want to directly get a pre-built box, look at the [documentation](https://www.precice.org/installation-vm.html). 1. Get a Virtual Machine provider, such as [VirtualBox](https://www.virtualbox.org/) -2. Get [Vagrant](https://www.vagrantup.com/) +2. Get [Vagrant](https://www.vagrantup.com/) and the [vagrant-reload plugin](https://github.com/aidanns/vagrant-reload) 3. Go to the root folder of this repository and start with `vagrant up`. 4. Be patient. Vagrant will now setup your virtual machine. You don't have to do anything and your terminal will be very busy. 5. After the provisioning finishes, restart the machine with `vagrant reload` to get a full GUI diff --git a/Vagrantfile b/Vagrantfile index ca69503..c53b138 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -39,6 +39,9 @@ Vagrant.configure("2") do |config| # Install a desktop environment and basic tools config.vm.provision "shell", path: "provisioning/install-basics.sh", privileged: false + # Reload the VM (requires https://github.com/aidanns/vagrant-reload) + config.vm.provision :reload + # Install common development tools config.vm.provision "shell", path: "provisioning/install-devel.sh", privileged: false From 94713e005e7ea0c1e721445cd0e073c2770c61dc Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 2 Jun 2026 21:58:10 +0200 Subject: [PATCH 8/8] Fix paraview icons --- provisioning/install-paraview.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/provisioning/install-paraview.sh b/provisioning/install-paraview.sh index 46df4c6..c7c0d8e 100755 --- a/provisioning/install-paraview.sh +++ b/provisioning/install-paraview.sh @@ -2,3 +2,6 @@ set -ex sudo apt-get install -y --no-install-recommends paraview + +# Workaround for https://bugs.launchpad.net/ubuntu/+source/paraview/+bug/2155064 +sudo apt-get install -y qt6-svg-plugins \ No newline at end of file