easyblock = "ConfigureMake"

name = 'magma'
version = '2.0.0'

homepage = 'http://icl.cs.utk.edu/magma/'
description = """The MAGMA project aims to develop a dense linear algebra library similar to 
LAPACK but for heterogeneous/hybrid architectures, starting with current Multicore+GPU systems."""

toolchain = {'name': 'CrayGNU', 'version': '2015.11'}
toolchainopts = {'pic': True}

sources = [SOURCE_TAR_GZ]
source_urls = ['http://icl.cs.utk.edu/projectsfiles/magma/downloads/']

patches = [('magma-2.0.0.patch')]

builddependencies = [ ('cudatoolkit/7.0.28-1.0502.10742.5.1', EXTERNAL_MODULE) ]

skipsteps = ['configure']

preinstallopts = "export EBINSTALLPREFIX=%(installdir)s && "

sanity_check_paths={
    'files': ['lib/libmagma.so', 'lib/libmagma.a'],
    'dirs': ['include'],
}

moduleclass = 'math'
