# IT4Innovations 2019

easyblock = 'Toolchain'

name = 'foss'
version = '2017b'

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_gccver = '6.3.0-2.27'

local_blaslib = 'OpenBLAS'
local_blasver = '0.2.20'
local_blas = '%s-%s' % (local_blaslib, local_blasver)

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

# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain
# because of toolchain preparation functions
# For local_binutils, stick to http://wiki.osdev.org/Cross-Compiler_Successful_Builds
dependencies = [
    ('GCC', local_gccver),
    ('OpenMPI', '2.1.5', '', ('GCC', local_gccver)),
    (local_blaslib, local_blasver, '', ('GCC', local_gccver)),
    ('FFTW', '3.3.6', '', local_comp_mpi_tc),
    ('ScaLAPACK', '2.0.2', '-%s' % local_blas, local_comp_mpi_tc),
]

moduleclass = 'toolchain'
