diff --git a/README.md b/README.md index 1af6fee..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 @@ -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 diff --git a/Vagrantfile b/Vagrantfile index 4960a2e..c53b138 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,13 +32,16 @@ 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 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 @@ -54,10 +57,9 @@ 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 - # 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 @@ -69,11 +71,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 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 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 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-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 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..b97b595 100755 --- a/provisioning/install-su2.sh +++ b/provisioning/install-su2.sh @@ -8,15 +8,13 @@ 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 -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 +# 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. # 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,18 @@ 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 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 ) # 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