summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Prokopenko <aprokop@users.noreply.github.com>2016-12-16 18:39:55 -0500
committerbecker33 <becker33@llnl.gov>2016-12-16 15:39:55 -0800
commit394f0109523f8ff254ac6eb8ac1b0097e3c8c34b (patch)
tree0869a688a65713651e491ea6b94fccaa85f4a148
parent5f88bea442939b952cca48ed881940b4c6d43b7d (diff)
downloadspack-394f0109523f8ff254ac6eb8ac1b0097e3c8c34b.tar.gz
spack-394f0109523f8ff254ac6eb8ac1b0097e3c8c34b.tar.bz2
spack-394f0109523f8ff254ac6eb8ac1b0097e3c8c34b.tar.xz
spack-394f0109523f8ff254ac6eb8ac1b0097e3c8c34b.zip
libmesh: added mpi variant (#2584)
-rw-r--r--var/spack/repos/builtin/packages/libmesh/package.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libmesh/package.py b/var/spack/repos/builtin/packages/libmesh/package.py
index ea81f5da73..6ceef8dbf6 100644
--- a/var/spack/repos/builtin/packages/libmesh/package.py
+++ b/var/spack/repos/builtin/packages/libmesh/package.py
@@ -35,8 +35,22 @@ class Libmesh(Package):
version('1.0.0', 'cb464fc63ea0b71b1e69fa3f5d4f93a4')
+ variant('mpi', default=True, description='Enables MPI parallelism')
+
+ depends_on('mpi', when='+mpi')
+
+ # Parallel version of libmesh needs parallel solvers
+ depends_on('petsc+mpi', when='+mpi')
+
def install(self, spec, prefix):
- configure('--prefix={0}'.format(prefix))
+ config_args = ["--prefix=%s" % prefix]
+
+ if '+mpi' in spec:
+ config_args.append('CC=%s' % spec['mpi'].mpicc)
+ config_args.append('CXX=%s' % spec['mpi'].mpicxx)
+ config_args.append('PETSC_DIR=%s' % spec['petsc'].prefix)
+
+ configure(*config_args)
make()
make('install')