petsc: fix compilation with intel (#9198)

* mpiifort doesn't automatically link all run-time libraries
* scalapack was being picked up accidentaly if intel-mkl was in the spec
This commit is contained in:
Ricardo Silva 2018-09-12 20:18:41 +02:00 committed by scheibelp
parent ff13f3953e
commit 62977662e9

View file

@ -186,8 +186,12 @@ def mpi_dependent_options(self):
compiler_opts = [
'--with-cc=%s' % self.spec['mpi'].mpicc,
'--with-cxx=%s' % self.spec['mpi'].mpicxx,
'--with-fc=%s' % self.spec['mpi'].mpifc
'--with-fc=%s' % self.spec['mpi'].mpifc,
]
if self.spec.satisfies('%intel'):
# mpiifort needs some help to automatically link
# all necessary run-time libraries
compiler_opts.append('--FC_LINKER_FLAGS=-lintlc')
return compiler_opts
def install(self, spec, prefix):
@ -226,8 +230,9 @@ def install(self, spec, prefix):
else:
options.append('--with-clanguage=C')
# Help PETSc pick up Scalapack from MKL:
if 'scalapack' in spec:
# PETSc depends on scalapack when '+mumps+mpi~int64' (see depends())
# help PETSc pick up Scalapack from MKL
if spec.satisfies('+mumps+mpi~int64'):
scalapack = spec['scalapack'].libs
options.extend([
'--with-scalapack-lib=%s' % scalapack.joined(),