easyblock = "Toolchain"

name = 'goolf'
version = '1.5.12'

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.8.1'
local_comp = (local_local_comp_name, local_local_comp_version)

local_blaslib = 'OpenBLAS'
local_blasver = '0.2.8'
local_blas = '%s-%s' % (local_blaslib, local_blasver)
local_blaslocal_suff = '-LAPACK-3.5.0'

# toolchain used to build goolf 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 depencies
# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain
# because of toolchain preperation functions
dependencies = [
    ('GCC', '4.8.1'),
    ('OpenMPI', '1.6.5', '', local_comp),  # part of gompi
    (local_blaslib, local_blasver, local_blaslocal_suff, local_comp_mpi_tc),
    ('FFTW', '3.3.3', '', local_comp_mpi_tc),
    ('ScaLAPACK', '2.0.2', '-%s%s' % (local_blas, local_blaslocal_suff), local_comp_mpi_tc),
]

moduleclass = 'toolchain'
