easyblock = "Toolchain"

name = 'foss'
version = '2015e'

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

toolchain = SYSTEM

local_local_comp_name = 'GCC'
local_local_comp_version = '4.4.7-system'
local_comp = (local_local_comp_name, local_local_comp_version)

local_blaslib = 'OpenBLAS'
local_blasver = '0.2.14'
local_blas = '%s-%s' % (local_blaslib, local_blasver)
local_blas_local_suff = '-LAPACK-3.5.0'

# toolchain used to build foss dependencies
local_comp_mpi_tc_name = 'gompi'
local_comp_mpi_tc_ver = "%s" % version
local_comp_mpi_tc = (local_comp_mpi_tc_name, local_comp_mpi_tc_ver)

# local_compiler toolchain dependencies
# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain
# because of toolchain preperation functions
dependencies = [
    local_comp,
    ('OpenMPI', '1.8.6', '', local_comp),  # part of gompi-2015e
    (local_blaslib, local_blasver, local_blas_local_suff, local_comp_mpi_tc),
    ('FFTW', '3.3.4', '', local_comp_mpi_tc),
    ('ScaLAPACK', '2.0.2', '-%s%s' % (local_blas, local_blas_local_suff), local_comp_mpi_tc)
]

moduleclass = 'toolchain'
