diff options
author | Denis Davydov <davydden@gmail.com> | 2016-03-21 07:48:17 +0100 |
---|---|---|
committer | Denis Davydov <davydden@gmail.com> | 2016-03-21 07:50:10 +0100 |
commit | 7b283bfaffa5509915d91392878203bba8a8d2cb (patch) | |
tree | 53567c2f8b64efa0ef69dff017e01a264db2c90b /var/spack | |
parent | c0f03506345199c71cc38f5fece3181ba32adad8 (diff) | |
download | spack-7b283bfaffa5509915d91392878203bba8a8d2cb.tar.gz spack-7b283bfaffa5509915d91392878203bba8a8d2cb.tar.bz2 spack-7b283bfaffa5509915d91392878203bba8a8d2cb.tar.xz spack-7b283bfaffa5509915d91392878203bba8a8d2cb.zip |
fix petsc on osx
Diffstat (limited to 'var/spack')
-rw-r--r-- | var/spack/repos/builtin/packages/petsc/package.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index efe172fc08..7239baaf7f 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -61,14 +61,24 @@ class Petsc(Package): errors = ['incompatible variants given'] + errors raise RuntimeError('\n'.join(errors)) else: - compiler_opts = [ - '--with-mpi=1', - '--with-mpi-dir=%s' % self.spec['mpi'].prefix, - ] + if self.compiler.name == "clang": + compiler_opts = [ + '--with-mpi=1', + '--with-cc=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # Avoid confusing PETSc config by clang: warning: argument unused during compilation + '--with-cxx=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), + '--with-fc=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + '--with-f77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'), + ] + else: + compiler_opts = [ + '--with-mpi=1', + '--with-mpi-dir=%s' % self.spec['mpi'].prefix, + ] return compiler_opts def install(self, spec, prefix): - options = [] + options = ['--with-debugging=0', + '--with-ssl=0'] options.extend(self.mpi_dependent_options()) options.extend([ '--with-precision=%s' % ('double' if '+double' in spec else 'single'), |