easyblock = 'Toolchain'

name = 'foss'
version = '2017b'

homepage = '(none)'
description = """GNU Compiler Collection (GCC) based compiler toolchain, including
 OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK."""

toolchain = {'name': 'system', 'version': ''}

gccver = '6.3.0-2.27'

blaslib = 'OpenBLAS'
blasver = '0.2.20'
blas = '%s-%s' % (blaslib, blasver)

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

# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain
# because of toolchain preparation functions
# For binutils, stick to http://wiki.osdev.org/Cross-Compiler_Successful_Builds
dependencies = [
    ('GCC', gccver),
    ('OpenMPI', '2.1.1', '', ('GCC', gccver)),
    (blaslib, blasver, '', ('GCC', gccver)),
    ('FFTW', '3.3.6', '', comp_mpi_tc),
    ('ScaLAPACK', '2.0.2', '-%s' % blas, comp_mpi_tc),
]

moduleclass = 'toolchain'
