Skip to content

[ESMF] [package list]

ESMF/8.6.0-cpeCray-24.03-MPI-PIO (ESMF-8.6.0-cpeCray-24.03-MPI-PIO.eb)

To access module help and find out for which stacks and partitions the module is installed, use module spider ESMF/8.6.0-cpeCray-24.03-MPI-PIO.

EasyConfig:

# contributed by Luca Marsella (CSCS), Theofilos Manitaras (CSCS)
# Adapted by Kurt Lust (kurt.lust@uantwerpen.be) for the LUMI consortium
#DOC ESMF compiled with support for MPICH and PIO. 
#DOC It also uses netCDF with the parallel HDF5 back-end.
easyblock = 'esmfcray'

local_ESMF_version =         '8.6.0'         # https://github.com/esmf-org/esmf/releases - Candidate for version bump if time left

name =          'ESMF'
version =       local_ESMF_version
versionsuffix = '-MPI-PIO'

homepage = 'http://sourceforge.net/projects/esmf'

whatis = [
    'Description: ESMF is the Earth System Modeling Framework, software for coupling weather, climate and related models'
]

description = """
The Earth System Modeling Framework (ESMF) is software for building and coupling weather,
climate, and related models.

This module provides the parallel (MPI) version. PIO support is also enabled but this 
required some dirty tricks, so no guarantee for future support.
"""

software_license_urls = [
    f'https://github.com/esmf-org/esmf/blob/v{version}/LICENSE',
]

toolchain = {'name': 'cpeCray', 'version': '24.03'}
toolchainopts = {'usempi': True, 'openmp': True}

# https://github.com/esmf-org/esmf/archive/refs/tags/v8.3.0.tar.gz
sources = [
    {
        'download_filename': 'v%(version)s.tar.gz',
        'filename':          SOURCE_TAR_GZ,
        'source_urls':       ['https://github.com/esmf-org/esmf/archive/refs/tags']
    }
]
patches = ['ESMF-6.1.1_libopts.patch']
checksums = [
    'ed057eaddb158a3cce2afc0712b49353b7038b45b29aee86180f381457c0ebe7',  # ESMF-8.6.0.tar.gz
    '3851627f07c32a7da55d99072d619942bd3a1d9dd002e1557716158e7aacdaf4',  # ESMF-6.1.1_libopts.patch
]

builddependencies = [ # Create a reproducible build environment.
    ('buildtools', '%(toolchain_version)s', '', True),
]

dependencies = [
    ('cray-hdf5-parallel',       EXTERNAL_MODULE),
    ('cray-netcdf-hdf5parallel', EXTERNAL_MODULE),
]

import os as local_os
local_LUMI_partition = local_os.getenv('LUMI_STACK_PARTITION')

mpicomm  = 'mpi'     # System mpi, see build_config/Unicos.gfortran.default
usepio   = 'internal'
optlevel = '2'       # Has to be a string

if local_LUMI_partition == 'G': 
    preconfigopts  = 'module unload craype-accel-amd-gfx90a && '
    prebuildopts   = 'module unload craype-accel-amd-gfx90a && '
    preinstallopts = 'module unload craype-accel-amd-gfx90a && '

postinstallcmds = [
    'mkdir -p %(installdir)s/share/licenses/%(name)s',
    'cd %(start_dir)s && cp LICENSE README.md %(installdir)s/share/licenses/%(name)s',   
]

# Just a single sanity check command as the other commands generate output files even when simply using
# -h or --version. It should be enough though to check if the executable can find all necessary 
# shared libraries.
sanity_check_commands = [ 
    'ESMF_PrintInfoC --version',
]

moduleclass = 'geo'

[ESMF] [package list]