easyblock = 'Toolchain'

name = 'foss'
version = '2021b'
versionsuffix = '-o'

homepage = 'https://easybuild.readthedocs.io/en/master/Common-toolchains.html#foss-toolchain'
description = """GNU Compiler Collection (GCC) based compiler toolchain, including
 OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK."""

toolchain = SYSTEM

local_gccver = '11.2.0'

# toolchain used to build foss dependencies
local_comp_mpi_tc = ('gompi', version)

# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain
# because of toolchain preparation functions
dependencies = [
    ('GCC', local_gccver),
    ('OpenMPI', '4.1.1', '', ('GCC', local_gccver)),
    ('FlexiBLAS', '3.0.3', '', ('GCC', local_gccver)),
    ('FFTW', '3.3.9', '', local_comp_mpi_tc),
    ('ScaLAPACK', '2.1.0', '-fbo', local_comp_mpi_tc),
]

moduleclass = 'toolchain'
