# IT4Innovations 
#LK 2021

name = 'Siesta'
version = '4.1-b5'
versionsuffix = '-test'

homepage = 'http://departments.icmab.es/leem/siesta'
description = """SIESTA is both a method and its computer program implementation, to perform efficient electronic
 structure calculations and ab initio molecular dynamics simulations of molecules and solids."""

# AMD/intel cpu
toolchain = {'name': 'intel', 'version': '2020b'}
#toolchainopts = {'usempi': True}
import os
if os.environ.get("CLUSTERNAME") in ["KAROLINA"]:
  toolchainopts = {'usempi': True, 'optarch': 'march=core-avx2', 'opt': '03'}
else:
  toolchainopts = {'usempi': True}

source_urls = ['https://gitlab.com/siesta-project/siesta/-/archive/v4.1.5/']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['4a93b31e58ba036f33333ef88ff4df31']

dependencies = [('netCDF-Fortran', '4.5.3')]

#runtest = 'check'

#preconfigopts = 'export CXXFLAGS="-O3 -fPIC -march=core-avx2" && '
#preconfigopts += 'export CFLAGS="-O3 -fPIC -march=core-avx2" && '
#preconfigopts += 'export OPTFLAGS="-O3 -march=core-avx2 -ip" && '
#preconfigopts += 'export FCFLAGS="-O3 -fPIC -march=core-avx2" && '

parallel=24

moduleclass = 'phys'
