Skip to content

[package list]

OpenFOAM

License information

The OpenFOAM.com versions are licensed under the GNU General Public License version 3.0. See also the "Open Source Licensing" page on the OpenFOAM.com web site.

The OpenFOAM.org versions are also licensed under the GNU General Public License version 3.0. See also the "Free Software Licence" page on the OpenFOAM.org web site.

User documentation

OpenFOAM is a toolbox to develop CFD codes with lots of examples included. It is not very well suited to an installation in a software stack as users may want to work in the code tree.

We cannot support each and every version and each and every subsequent bug fix release for those versions. However, if you want a newer version or a bugfix version, the EasyConfigs offered here may be a nice start, though it would be easy to just extract the proper build instructions from them and do a manual build if needed.

Note that we also cannot keep supporting older versions of codes. Computers evolve, the software environment of those computers evolve, and older versions may simply not compile anymore. OpenFOAM is notorious for such problems, sometimes requiring rather old versions of libraries also that can conflict with newers ones on the system.

Use OpenFOAM with care on LUMI. Some file access strategies of OpenFOAM (basically using one or more files per MPI rank) do not scale to thousands of MPI ranks but can take down a supercomputer filesystem as these are optimised to work with large files and parallel I/O and not for simultaneously writing to thousands of files.

User-installable modules (and EasyConfigs)

Install with the EasyBuild-user module:

eb <easyconfig> -r
To access module help after installation and get reminded for which stacks and partitions the module is installed, use module spider OpenFOAM/<version>.

EasyConfig:

Technical documentation

This easyconfig is based on the public CSCS version using Binary easyblock.

Rewritten to use recent configuration layers built-in the OpenFOAM.

OpenFOAM in two flavours (branches) from: openfoam.com (YYMM release numbering) and openfoam.org (N release numbering).

Links:

Configuring

openfoam.com

Instructions in the OpenFOAM.com Wiki.

openfoam.org

Follows approach for ".com" version.

Build Issues

openfoam.com

Subsequent compilation with Allwmake will now run largely without any problems, except that the components linking against CGAL (foamyMesh and surfaceBooleanFeatures) will also try to link against a nonexistent mpfr library. As a workaround, the link-dependency can be removed in wmake/rules/General/CGAL :

CGAL_LIBS = \
    -L$(BOOST_ARCH_PATH)/lib \
    -L$(BOOST_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
    -L$(CGAL_ARCH_PATH)/lib \
    -L$(CGAL_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
    -lCGAL

Fixed overwriting wmake/rules/General/cgal with wmake/rules/General/cgal-no-mpfr

openfoam.org

Missing linux64Cray rules files are in the patch file consisting options from Esko Järvinen (CSC).

Issues reported in the EasyBuild community

  • easybuild-easyconfigs issue #20297 mentions that OpenFOAM with recent versions of the GNU compilers can sometimes produce wrong results when compiling with -O2 -ftree-vectorize which are the default options for the EasyBuild GNU toolchains.

    The issue has also been reported to openfoam.org as issue #004076 where it was reported that the OpenFOAM developers could not reproduce the error. This is because when trying to reproduce, I assume the standard compiler options were used, which is -O3 instead of -O2 -ftree-vectorize.

    There is also an older easybuild-easyconfigs issue #15495 on the same topic.

    It got fixed in EasyBuild by using a toolchainopts to turn off -ftree-vectorize and just compile with -O2.

    The fix is irrelevant to the LUMI setup as we simply use the very reasonable options that the OpenFOAM build process choses by default and don't overwrite those with EasyBuild-generated flags.

Building with EasyBuild

https://develop.openfoam.com/Development/openfoam/-/wikis/building#easybuild

Notes on CPE

  • This easyconfig produces linux64Cray platform binaries using Cray compiler option which is in fact CPE GNU.

Note that the compiler flags set by EasyBuild are completely neglected during the build, so that we effectively build with the GNU compiler options that the developers likely tested with.

Issues with OpenFOAM v2106 and GCC 11

  • Linking fails for OpenFOAM v2106 and GCC 11. We run into issue 2147

    The fix proposed there is to compile with -D_GLIBCXX_USE_CXX11_ABI=0. However, as OpenFOAM does not honour the pretty standard CXXFLAGS environment variable, the only solution is to inject this option using FOAM_EXTRA_CXXFLAGS and this has to be done after calling the etc/bashrc script as that script unsets the variable to avoid accidentally using settings from a previous compile in the same shell.

OpenFoam v2212

  • Trivial port of the EasyConfig

OpenFOAM v2312

  • For now a trivial port of the 2212 EasyConfig

OpenFOAM.org 10

  • Needed some patching compared to the very old version 9 EasyConfigs.

Archived EasyConfigs

The EasyConfigs below are additonal easyconfigs that are not directly available on the system for installation. Users are advised to use the newer ones and these archived ones are unsupported. They are still provided as a source of information should you need this, e.g., to understand the configuration that was used for earlier work on the system.