easyblock = "Toolchain"

name = 'cgmvolf'
version = '1.2.7'

homepage = '(none)'
description = """Clang and GFortran based compiler toolchain,
 MVAPICH2 for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK."""

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

comp = ('GCC', '4.8.1')

blaslib = 'OpenBLAS'
blasver = '0.2.6'
blas = '%s-%s' % (blaslib, blasver)
blassuff = '-LAPACK-3.4.2'

# toolchain used to build cgmvolf dependencies
comp_mpi_tc = ('cgmvapich2', version)

# Compiler toolchain dependencies
# We need ClangGCC and MVAPICH2 as explicit dependencies instead of cgmvapich2 toolchain
# because of toolchain definition being verified against list of modules.
dependencies = [
    comp,  # part of cgmvapich2
    ('Clang', '3.3', '', comp),  # part of cgmvapich2
    ('MVAPICH2', '1.9', '', ('ClangGCC', '1.2.3')),  # part of cgmvapich2
    (blaslib, blasver, blassuff, comp_mpi_tc),
    ('FFTW', '3.3.3', '', comp_mpi_tc),
    ('ScaLAPACK', '2.0.2', '-%s%s' % (blas, blassuff), comp_mpi_tc),
]

moduleclass = 'toolchain'
