# IT4Innovations 2021
# LK

name = 'ELPA'
version = '2019.11.001'

homepage = 'http://elpa.rzg.mpg.de'
description = """Eigenvalue SoLvers for Petaflop-Applications ."""

toolchain = {'name': 'intel', 'version': '2020b'}
toolchainopts = {'openmp': True, 'usempi': True}

source_urls = ['http://elpa.mpcdf.mpg.de/html/Releases/%(version)s/']
sources = [SOURCELOWER_TAR_GZ]

preconfigopts = "export FC='mpiifort' && "
preconfigopts += "export CC='mpicc' && "
preconfigopts += 'export FCFLAGS="-O3 -xAVX2" && '
preconfigopts += 'export CFLAGS="-O3 -march=native -mavx2 -mfma -funsafe-loop-optimizations -funsafe-math-optimizations -ftree-vect-loop-version -ftree-vectorize" && '
preconfigopts += 'export SCALAPACK_LDFLAG=S"-L$MKLROOT/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 -lpthread " && '
preconfigopts += 'export SCALAPACK_FCFLAGS="-I$MKL_HOME/include/intel64/lp64" && '
configopts = '--enable-option-checking=fatal'

builddependencies = [
    ('Autotools', '20200321'),
]

moduleclass = 'math'
