# IT4Innovations 2019

easyblock = 'ConfigureMake'

name = 'GlobalArrays'
version = '5.7'

homepage = 'http://hpc.pnl.gov/globalarrays'
description = "Global Arrays (GA) is a Partitioned Global Address Space (PGAS) programming model"

toolchain = {'name': 'foss', 'version': '2018a'}
toolchainopts = {'usempi': True}

source_urls = ['https://github.com/GlobalArrays/ga/archive/']
sources = ["v%(version)s.tar.gz"]

#osdependencies = [('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel')]

builddependencies = [
    ('Autotools', '20180311', '', True),
]

preconfigopts= './autogen.sh && '

configopts = '--with-openib'
configopts += ' --with-blas8="-L$BLAS_LIB_DIR $LIBBLAS" --with-lapack="-L$LAPACK_LIB_DIR $LIBLAPACK"'
configopts += ' --with-scalapack8="-L$SCALAPACK_LIB_DIR $LIBSCALAPACK"'

sanity_check_paths = {
    'files': ['bin/adjust.x', 'bin/collisions.x', 'bin/ga-config', 'lib/libarmci.a', 'lib/libga.a'],
    'dirs': ['include'],
}

moduleclass = 'lib'
