# This is an easyconfig file for EasyBuild, see https://easybuilders.github.io/easybuild/

name = 'imkl'
version = '2018.0.128'

homepage = 'http://software.intel.com/en-us/intel-mkl/'
description = """Intel Math Kernel Library is a library of highly optimized,
 extensively threaded math routines for science, engineering, and financial
 applications that require maximum performance. Core math functions include
 BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more."""

toolchain = {'name': 'iimpi', 'version': '2018-GCC-6.4.0-2.28'}

sources = ['l_mkl_%(version)s.tgz']
checksums = ['c368baa40ca88057292512534d7fad59fa24aef06da038ea0248e7cd1e280cec']

dontcreateinstalldir = 'True'

#license_file = '/opt/easybuild/licenses/intel/license_2018.lic'

interfaces = True

postinstallcmds = [
    # extract the examples
    'tar xvzf %(installdir)s/mkl/examples/examples_cluster_c.tgz -C %(installdir)s/mkl/examples/',
    'tar xvzf %(installdir)s/mkl/examples/examples_cluster_f.tgz -C %(installdir)s/mkl/examples/',
    'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/',
    'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/',
    'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/',
]

modextravars = {
    'MKL_EXAMPLES': '%(installdir)s/mkl/examples/',
}

moduleclass = 'numlib'