summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2017-04-05 21:55:28 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2017-04-05 14:55:28 -0500
commitbccc73c6c9c9e64fea4ffc72bf81b69543cdf331 (patch)
treeb2c377cc8675127401ce1bf08250263a7fa425be /var
parentaa63bc6f34eaa2f1329bb28ce6a312ee6a6313ea (diff)
downloadspack-bccc73c6c9c9e64fea4ffc72bf81b69543cdf331.tar.gz
spack-bccc73c6c9c9e64fea4ffc72bf81b69543cdf331.tar.bz2
spack-bccc73c6c9c9e64fea4ffc72bf81b69543cdf331.tar.xz
spack-bccc73c6c9c9e64fea4ffc72bf81b69543cdf331.zip
petsc trilinos: fix Scalapack via MKL (#3702)
* petsc trilinos: fix Scalapack via MKL * indentation
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py14
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py5
2 files changed, 16 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index b63172135e..69a01d44e0 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -173,9 +173,21 @@ class Petsc(Package):
'--with-blas-lapack-lib=%s' % lapack_blas.joined()
])
+ # Help PETSc pick up Scalapack from MKL:
+ if 'scalapack' in spec:
+ scalapack = spec['scalapack'].libs
+ options.extend([
+ '--with-scalapack-lib=%s' % scalapack.joined(),
+ '--with-scalapack=1'
+ ])
+ else:
+ options.extend([
+ '--with-scalapack=0'
+ ])
+
# Activates library support if needed
for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis',
- 'mumps', 'scalapack'):
+ 'mumps'):
options.append(
'--with-{library}={value}'.format(
library=library, value=('1' if library in spec else '0'))
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 0e0d86fa3c..3c13dc68f8 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -292,14 +292,15 @@ class Trilinos(CMakePackage):
# mumps / scalapack
if '+mumps' in spec:
+ scalapack = spec['scalapack'].libs
options.extend([
'-DTPL_ENABLE_MUMPS:BOOL=ON',
'-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib,
# order is important!
'-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord',
'-DTPL_ENABLE_SCALAPACK:BOOL=ON',
- # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64
- '-DSCALAPACK_LIBRARY_NAMES=scalapack'
+ '-DSCALAPACK_LIBRARY_NAMES=%s' % ';'.join(scalapack.names),
+ '-DSCALAPACK_LIBRARY_DIRS=%s' % ';'.join(scalapack.directories)
])
# see
# https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS