easyblock = "Toolchain"

name = 'goolfc'
version = '2017.02'

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

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

comp_name = 'GCC'
comp_ver = '5.4.0-2.26'
comp = (comp_name, comp_ver)

# toolchain used to build goolfc dependencies
comp_mpi_tc_name = 'gompic'
comp_mpi_tc_ver = version
comp_mpi_tc = (comp_mpi_tc_name, comp_mpi_tc_ver)

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

# compiler toolchain dependencies
# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain
# because of toolchain preperation functions
dependencies = [
    comp,  # part of gompic
    ('CUDA', '8.0.61_375.26', '', comp),  # part of gompic
    ('OpenMPI', '2.1.1', '', ('gcccuda', version)),  # part of gompic
    (blaslib, blasver, '', comp),
    ('FFTW', '3.3.6', '', comp_mpi_tc),
    ('ScaLAPACK', '2.0.2', blas, comp_mpi_tc),
]

moduleclass = 'toolchain'
