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

name = 'imkl'
version = '2017.0.098'

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': '2017.00-GCC-5.4.0-2.26'}

sources = ['l_mkl_%(version)s.tgz']
checksums = ['3cdcb739ab5ab1e047eb130b9ffdd8d0']
dontcreateinstalldir = 'True'

license_file = HOME + '/licenses/intel/license.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/',
    'tar xvzf %(installdir)s/mkl/examples/examples_mic_f.tgz -C %(installdir)s/mkl/examples/',
    'tar xvzf %(installdir)s/mkl/examples/examples_mic_c.tgz -C %(installdir)s/mkl/examples/',
]

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

moduleclass = 'numlib'
