easyblock = 'ConfigureMake'

name = 'SDPA'
version = '7.3.8'

homepage = 'http://sdpa.sourceforge.net'
description = """SDPA is one of the most efficient and stable software packages
for solving SDPs based on the primal-dual interior-point method."""

toolchain = {'name': 'ictce', 'version': '6.2.5'}
toolchainopts = {'optarch': True, 'pic': True, 'usempi': True}

sources = ['%(namelower)s_%(version)s.tar.gz']
source_urls = [SOURCEFORGE_SOURCE]

dependencies = [('MUMPS', '4.10.0', '-parmetis')]

configopts = ' --with-blas="$LIBBLAS_MT" --with-lapack="$LIBLAPACK_MT"'
configopts += ' --with-mumps-libs="-ldmumps -lmumps_common -lpord -lparmetis -lmetis'
configopts += ' -lesmumps -lptscotch -lscotcherr -lscotch -lifcore $LIBSCALAPACK"'

sanity_check_paths = {
    'files': ['bin/sdpa', 'lib/libsdpa.a'],
    'dirs': []
}

# seems to fail if not build serially
parallel = 1

moduleclass = 'math'
