# IT4Innovations 2017

easyblock = 'ConfigureMake'

name = 'libxsmm'
version = '1.7.1'

homepage = 'https://github.com/hfp/libxsmm'
description = """LIBXSMM is a library for small dense and small sparse matrix-matrix multiplications
targeting Intel Architecture (x86)."""

toolchain = {'name': 'GCC', 'version': '6.3.0-2.27'}

sources = [SOURCE_TAR_GZ]
source_urls = ['https://www.cp2k.org/static/downloads']

buildopts = 'MNK="1 4 5 6 8 9 13 16 17 22 23 24 26 32" PREFIX=%(installdir)s'

installopts = 'MNK="1 4 5 6 8 9 13 16 17 22 23 24 26 32" PREFIX=%(installdir)s'

skipsteps = ['configure']

modextravars = {
    'LIBXSMM_LIBS': '-lxsmmf -lxsmm -ldl -lpthread',
    'LIBXSMM_CFLAGS': '-I\'%(installdir)s/include\'',
    'LIBXSMM_LDFLAGS': '-L\'%(installdir)s/lib\' -Wl,-rpath=\'%(installdir)s/lib\'',
}

sanity_check_paths = {
    'files': [
        'bin/libxsmm_gemm_generator',
        'include/libxsmm.h',
        'lib/libxsmm.a'],
    'dirs': ['share']}

moduleclass = 'math'
