Skip to content

Commit a6502b2

Browse files
committed
Upgrade to Ubuntu 26.04
1 parent 8b68e81 commit a6502b2

5 files changed

Lines changed: 33 additions & 21 deletions

File tree

Vagrantfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Vagrant.configure("2") do |config|
66
# This allows us to create performance oriented images for Linux (libvirt) and Windows (hyperv).
77
# However, it does not build: https://github.com/precice/vm/issues/83
88
# config.vm.box = "generic/ubuntu2004"
9-
config.vm.box = "bento/ubuntu-24.04"
9+
config.vm.box = "bento/ubuntu-26.04"
1010

1111
# We don't want the box to automatically update every time it starts.
1212
# We can instead handle updates internally, without destroying the machine.
@@ -18,9 +18,9 @@ Vagrant.configure("2") do |config|
1818
# Display the VirtualBox GUI when booting the machine
1919
vb.gui = true
2020
# Number of cores
21-
vb.cpus = 2
21+
vb.cpus = 4
2222
# Customize the amount of memory on the VM:
23-
vb.memory = "2048"
23+
vb.memory = "4096"
2424
# Video memory (the default may be too low for some applications)
2525
vb.customize ["modifyvm", :id, "--vram", "64"]
2626
# The default graphics controller is VboxSVGA. This seems to cause issues with auto-scaling.
@@ -32,8 +32,8 @@ Vagrant.configure("2") do |config|
3232
config.vm.provider :libvirt do |lv|
3333
lv.forward_ssh_port = true
3434
lv.title = "preCICE-VM"
35-
lv.cpus = 2
36-
lv.memory = 2048
35+
lv.cpus = 4
36+
lv.memory = 4096
3737
end
3838

3939
# Install a desktop environment and basic tools
@@ -56,8 +56,7 @@ Vagrant.configure("2") do |config|
5656

5757
# NOTE: In Ubuntu 24.04, building ASTE will succeed, but running the aste-turbine tutorial, for example, will break.
5858
# See the documentation: https://precice.org/tooling-aste.html#dependencies
59-
# Disabling until the upgrade to Ubuntu 26.04
60-
# config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false
59+
config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false
6160

6261
# Install additional packages for training
6362
config.vm.provision "shell", path: "provisioning/install-training-python.sh", privileged: false

provisioning/install-fenics.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
# Install FEniCS from APT
5-
sudo apt-get install -y software-properties-common
6-
sudo add-apt-repository -y ppa:fenics-packages/fenics
74
sudo apt-get -y update
8-
sudo apt-get -y install --no-install-recommends fenics
5+
sudo apt-get -y install fenics
96

107
# Install the FEniCS-preCICE adapter from PIP
118
# python -m venv ~/python-venvs/fenicsprecice

provisioning/install-precice.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ fi
1313
(
1414
cd precice
1515
git pull
16+
17+
# Patch for Ubuntu 26.04, see https://github.com/precice/precice/commit/6a0be7aa64087f21740c566921e83e97e03e1067
18+
sed -i 's/libxml2/libxml2-dev/g' cmake/CPackConfig.cmake
19+
1620
mkdir -p build && cd build/
1721
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRECICE_RELEASE_WITH_DEBUG_LOG=ON -DBUILD_TESTING=OFF -Wno-dev ..
1822
make -j "$(nproc)"
@@ -43,9 +47,6 @@ fi
4347
(
4448
cd tutorials/quickstart/solid-cpp/ && cmake . && make
4549
)
46-
(
47-
cd tutorials/heat-exchanger && ./download-meshes.sh
48-
)
4950
sudo apt-get -y install gnuplot # needed for watchpoint scripts of tutorials
5051

5152

provisioning/install-su2.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ python -m pip install mpi4py setuptools # pyprecice is installed by the tutorial
99
sudo apt-get -y install swig
1010

1111
# Get SU2 7.5.1 from GitHub
12-
wget --quiet https://github.com/su2code/SU2/archive/refs/tags/v7.5.1.tar.gz
13-
tar -xzf v7.5.1.tar.gz
14-
rm -fv v7.5.1.tar.gz
12+
git clone --depth=1 --branch=v7.5.1 --recurse-submodules https://github.com/su2code/SU2.git
1513

1614
# Add SU2 and the SU2 adapter to PATH and apply.
1715
# We first export to a separate script, so that we can load it here (non-interactive shell).
1816
{
19-
echo "export SU2_HOME=\"\${HOME}/SU2-7.5.1\""
17+
echo "export SU2_HOME=\"\${HOME}/SU2\""
2018
echo "export SU2_RUN=\"\${SU2_HOME}/SU2_CFD\""
2119
echo "export PATH=\"\${SU2_RUN}/bin/:\${HOME}/su2-adapter/run/:\${PATH}\""
2220
echo "export PYTHONPATH=\"\${SU2_RUN}/bin/:\${PYTHONPATH}\""
@@ -42,12 +40,29 @@ fi
4240

4341
# Add a previously implied header (compatibility with Ubuntu 24.04)
4442
sed -i '1s/^/#include <cstdint>\n/' SU2_CFD/src/output/filewriter/CParaviewXMLFileWriter.cpp
43+
sed -i '1s/^/#include <cstdint>\n/' SU2_CFD/src/SU2_CFD.cpp
4544

46-
./meson.py build -Denable-pywrapper=true --prefix="${SU2_RUN}" &&\
45+
# Replace pipes with shlex in Ninja configure (compatibility with Ubuntu 26.04 and Python >= 3.13)
46+
# See https://github.com/ninja-build/ninja/commit/9cf13cd1ecb7ae649394f4133d121a01e191560b
47+
sed -i 's/pipes/shlex/g' externals/ninja/configure.py
48+
49+
# Disable CGNS with -Denable-cgns=false. Workaround for:
50+
# default: FAILED: externals/cgns/libcgns.a.p/adf_ADF_internals.c.o
51+
# 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
52+
# default: ../externals/cgns/adf/ADF_internals.c: In function ‘ADFI_open_file’:
53+
# default: ../externals/cgns/adf/ADF_internals.c:194:17: error: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
54+
# default: 194 | # define FILENO fileno
55+
# default: | ^~~~~~
56+
# default: ../externals/cgns/adf/ADF_internals.c:5531:32: note: in expansion of macro ‘FILENO’
57+
# default: 5531 | f_ret = ftmp == NULL ? -1 : FILENO(ftmp);
58+
# default: | ^~~~~~
59+
#
60+
# Also set -Denable-tecio=false, as it is not needed, to save space.
61+
./meson.py build -Denable-pywrapper=true -Denable-cgns=false -Denable-tecio=false --prefix="${SU2_RUN}" &&\
4762
./ninja -C build install
4863
)
4964

5065
# Remove the libSU2Core.a library to save space (approx. 500MB)
51-
rm -fv ~/SU2-7.5.1/SU2_CFD/obj/libSU2Core.a
66+
rm -fv ~/SU2/SU2_CFD/obj/libSU2Core.a
5267

5368
deactivate

provisioning/install-training-fsi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pipx install ccx2paraview
1111
# FreeCAD AppImage from https://www.freecad.org/downloads.php (~780MB)
1212
(
1313
cd ~/Desktop
14-
wget https://github.com/FreeCAD/FreeCAD/releases/download/1.1.1/FreeCAD_1.1.1-Linux-x86_64-py311.AppImage
14+
wget --quiet https://github.com/FreeCAD/FreeCAD/releases/download/1.1.1/FreeCAD_1.1.1-Linux-x86_64-py311.AppImage
1515
mv FreeCAD_1.1.1-Linux-x86_64-py311.AppImage FreeCAD.AppImage
1616
chmod +x FreeCAD.AppImage
1717
)

0 commit comments

Comments
 (0)