OpenFOAM® on MUSICA¶
Introduction¶
Pre-compiled OpenFOAM® versions are distributed via EESSI at MUSICA sites Vienna, Linz and Innsbruck. Recent and ready to use OpenFOAM® versions for both the "org" and the "com" flavour are loaded (activated) through the module system (based on Lmod).
OpenFOAM-extend versions and other setups (like external coupling of different solvers, Docker images, ...) are available upon request. For specific OpenFOAM® needs not covered in this user documentation please open a request in the ticket system.
Pre-compiled versions available via EESSI¶
EESSI provides pre-built, ready to use installations of OpenFOAM®.
EESSI/2025.06¶
- OpenFOAM-v2506-foss-2025b
- OpenFOAM-13-foss-2025a
EESSI/2023.06¶
- OpenFOAM-v2406-foss-2023b
- OpenFOAM-v2312-foss-2023a
- OpenFOAM-12-foss-2023a
- OpenFOAM-11-foss-2023a
- OpenFOAM-10-foss-2023a
Note: -vYYMM is the naming scheme of the "com" releases, -n of the "org" versions. The -foss-YYYY[a-z] extension in the module's name indicates the (free and open source software) toolchain used for compilation.
Versions available via EasyBuild¶
Following versions of OpenFOAM® have to be compiled by users on demand via EasyBuild (a system for automated software compilation). The build procedures were tested by ASC staff and the software packages are installed to fully user controlled paths. Instructions for EasyBuild usage and sample scripts are shown below at advanced topics.
EasyBuild + EESSI/2023.06 user modules¶
- OpenFOAM-v2206-foss-2023a
- OpenFOAM-v2112-foss-2023a
- OpenFOAM-9-foss-2023a
- OpenFOAM-8-foss-2023a
Controlling the environment¶
Following EESSI trees containing OpenFOAM® are available on MUSICA: EESSI/2025.06 + ASC/2025.06, EESSI/2023.06 + ASC/2023.06. Software from one tree can not be combined or used at the same time with software from another EESSI tree. Either 2023.06 or 2025.06 can be used. When using EESSI it is recommended to stay within the currently activated system and use EESSI provided tools only. Mixing EESSI software with binaries from other tool chains (e.g. user compiled binaries) might result in incompatibility or unexpected behaviour.
EESSI/2025.06 + ASC/2025.06¶
This is the default environment on MUSICA. At login $HOME/.bashrc.d/asc-samrc is sourced and if the file is missing an interactive prompt will ask whether to install it. On the next login EESSI/2025.06 + ASC/2025.06 will be active by default.
EESSI/2023.06 + ASC/2023.06¶
To use the 2023.06 trees put this in $HOME/.bashrc.d/asc-samrc :
unset EESSI_VERSION
unset EESSI_DEFAULT_MODULES_APPEND
. /cvmfs/software.eessi.io/versions/2023.06/init/lmod/sh
module load ASC/2023.06
On the next login EESSI/2023.06 + ASC/2023.06 will be active.
Tip
Ensuring a clean user environment is paramount to reproducible results when using EESSI and EasyBuild. Avoid mixing up and combining EESSI versions and their respective environment variables. Aim to implement all work flows within the EESSI provided environment.
Activating OpenFOAM® environments¶
Example: loading OpenFOAM-v2506 (from ASC/2025.06 tree):
module load OpenFOAM/v2506-foss-2025a
Example: loading OpenFOAM-12 (from EESSI/2023.06 tree):
module load OpenFOAM/12-foss-2023a
Note: loading a specific OpenFOAM® module will also pull in all its dependencies. This can be checked by listing all currently loaded modules:
module list
The actual OpenFOAM® environment needs to be sourced after the modules were loaded, e.g. for OpenFOAM-12 (in EESSI/2023.06 path):
. /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/software/OpenFOAM/12-foss-2023a/OpenFOAM-12/etc/bashrc
e.g. for OpenFOAM-v2506 (in ASC/2025.06 path):
. /cvmfs/software.asc.ac.at/versions/2025.06/software/linux/x86_64/amd/zen4/software/OpenFOAM/v2506-foss-2025a/OpenFOAM-v2506/etc/bashrc
After loading the module and sourcing OpenFOAM's bashrc OpenFOAM® is ready and can be used as usual.
Advanced topics¶
This section describes how to use EasyBuild to automatically compile OpenFOAM® versions that are not available on MUSICA. These versions were tested and are supported:
- OpenFOAM-v2206-foss-2023a
- OpenFOAM-v2112-foss-2023a
- OpenFOAM-9-foss-2023a
- OpenFOAM-8-foss-2023a
Compiling OpenFOAM® with EasyBuild¶
Submit the example script below via sbatch to compile OpenFOAM-9 and install it in the user's home directory. Adjust as needed.
#!/bin/bash
#
# Make sure the user environment is completely clean. Only the pre-requisite
# modules (2) should be loaded. Nothing else. In doubt log out and log in
# again before job submission.
#
# 1 8
#SBATCH -J OF-comp
### convenience / mixed mode
#SBATCH --ntasks-per-core=1
#SBATCH -n 16
#SBATCH --mem=32G
# 2025.06
# pre-requisite modules: EESSI/2025.06 ASC/2025.06
# loaded e.g. via : . /cvmfs/software.eessi.io/versions/2025.06/init/lmod/sh
# auto loaded modules : EasyBuild/5.3.1
#module load EESSI-extend/2025.06-easybuild
# 2023.06
# pre-requisite modules: EESSI/2023.06 ASC/2023.06
# loaded e.g. via : . /cvmfs/software.eessi.io/versions/2023.06/init/lmod/sh
# auto loaded modules : EasyBuild/5.3.1
module load EESSI-extend/2023.06-easybuild
# use "eb --search=PATTERN" to determine correct EasyConfig name
conf="OpenFOAM-9-foss-2023a.eb"
cd $PWD
export EASYBUILD_SOURCEPATH=$HOME/easybuild/src
export WORKING_DIR=$HOME/easybuild/workdir
eb -l \
--max-parallel=16 \
--prefix=$HOME/easybuild \
--tmpdir=$HOME/eb/tmpdir \
--robot \
"$conf"
Tip
Reserve 2GB per build process (16 in case of the example above) for successful compilation.
After successful compilation¶
The walk-through below is valid for OpenFOAM-9-foss-2023a, please adjust as needed.
- Check for availability within user's EESSI tree. The newly built OpenFOAM® version should show up in the section "USER CPU Modules".
- Load the module
- Check successful loading
- Source OpenFOAM's bashrc
The steps above translate to these four lines in the shell:
module avail # 1.
module load cae/OpenFOAM/9-foss-2023a # 2.
module list # 3.
. ~/eessi/versions/2023.06/software/linux/x86_64/amd/zen4/software/OpenFOAM/9-foss-2023a/OpenFOAM-9/etc/bashrc # 4.
OpenFOAM® is ready to use now.
Warning
The idempotency of the commands wmSet, wmUnset, "module load", "module unload" and "module purge" is not guaranteed. Best to start with a fresh and clean environment for jobs with a different environment by logging out and logging in again.