Skip to content

[OpenFOAM] [package list]

OpenFOAM/9-cpeGNU-22.06 (OpenFOAM-9-cpeGNU-22.06.eb)

This software is archived in the LUMI-EasyBuild-contrib GitHub repository as easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-9-cpeGNU-22.06.eb. The corresponding module would be OpenFOAM/9-cpeGNU-22.06.

# Based on instructions from Esko Järvinen, CSC

easyblock = 'Binary'

name =          'OpenFOAM'
version =       '9'
versionprefix = 'OpenFOAM-'

homepage = 'http://www.openfoam.org/'

whatis = [
    'Description: The OpenFOAM (CFD software) distribution from the OpenFOAM Foundation'
]

description = """
OpenFOAM is the leading free, open source software for computational fluid dynamics (CFD),
owned by the OpenFOAM Foundation and distributed exclusively under the General Public Licence (GPL).
The GPL gives users the freedom to modify and redistribute the software and a guarantee of continued
free use, within the terms of the licence.
"""

usage = """
Initialize the OpenFOAM environment with following command:

 source $EBROOTOPENFOAM/etc/bashrc WM_COMPILER=Cray WM_MPLIB=CRAY-MPICH

To run OpenFOAM solvers on compute nodes use srun command:

 srun foamSolverName -parallel

in either job script for sbatch or directly within salloc session.

Allrun scripts require some additional tweaking.
"""

toolchain =     {'name': 'cpeGNU', 'version': '22.06'}
toolchainopts = {'cstd': 'c++11'}

sources = [
    {
        'download_filename': 'version-%(version)s.tar.gz',
        'filename':          '%(name)s-%(version)s.tar.gz',
        'source_urls':       ['https://github.com/OpenFOAM/OpenFOAM-%(version_major)s/archive'],
    }
]
checksums =   ['0c48fb56e2fbb4dd534112811364d3b2dc12106e670a6486b361e4f864b435ee']

patches = [('wmake-rules-linux64Cray.patch',1),]

builddependencies = [
    ('buildtools', '%(toolchain_version)s', '', True),
    ('Boost',      '1.79.0', ''),
]

dependencies = [
    ('cray-fftw', EXTERNAL_MODULE),
    ('SCOTCH',    '6.1.3'),
    ('CGAL',      '4.12.2',        '-OpenFOAM'),
]

unpack_options = '--strip-components=1'
extract_sources = 'True'
buildininstalldir = 'True'

install_cmd  = "./bin/tools/foamConfigurePaths --scotchArchPath ${EBROOTSCOTCH} --projectName %(name)s-%(version_major)s-%(toolchain_name)s-%(toolchain_version)s "
install_cmd += "&& source etc/bashrc WM_COMPILER=Cray WM_MPLIB=CRAY-MPICH MPICH_DIR=${CRAY_MPICH_PREFIX} "
install_cmd += "&& ./Allwmake -j 32"

sanity_check_paths = {
    'files': [],
    'dirs':  ['platforms/linux64CrayDPInt32Opt/bin', 'platforms/linux64CrayDPInt32Opt/lib'],
}

modextravars = {
    'FOAM_BASH': '%(installdir)s/bashrc',
}

moduleclass = 'cae'

[OpenFOAM] [package list]