easyblock = 'ConfigureMake'

name = 'GlobalArrays'
version = '5.3'
versionsuffix = '-openib'

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

toolchain = {'name': 'intel', 'version': '2015a'}
toolchainopts = {'usempi': True}

source_urls = ['http://hpc.pnl.gov/globalarrays/download/']
sources = ['ga-%(version_major)s-%(version_minor)s.tgz']

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

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'
