easyblock = "Toolchain"

name = 'foss'
version = '2015e'

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': ''}

comp_name = 'GCC'
comp_version = '4.4.7-system'
comp = (comp_name, comp_version)

blaslib = 'OpenBLAS'
blasver = '0.2.14'
blas = '%s-%s' % (blaslib, blasver)
blas_suff = '-LAPACK-3.5.0'

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

# compiler toolchain dependencies
# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain
# because of toolchain preperation functions
dependencies = [
    comp,
    ('OpenMPI', '1.8.6', '', comp),  # part of gompi-2015e
    (blaslib, blasver, blas_suff, comp_mpi_tc),
    ('FFTW', '3.3.4', '', comp_mpi_tc),
    ('ScaLAPACK', '2.0.2', '-%s%s' % (blas, blas_suff), comp_mpi_tc)
]

moduleclass = 'toolchain'
