petsc trilinos: fix Scalapack via MKL (#3702)
* petsc trilinos: fix Scalapack via MKL * indentation
This commit is contained in:
parent
aa63bc6f34
commit
bccc73c6c9
@ -173,9 +173,21 @@ def install(self, spec, prefix):
|
||||
'--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'))
|
||||
|
@ -292,14 +292,15 @@ def cmake_args(self):
|
||||
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user