diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-23 01:53:32 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-23 01:53:32 -0700 |
commit | 091fcc3aa93c704fc5303dbc9f11ac3f214a8962 (patch) | |
tree | 4f563707538fd66cd8cd1a7ca613eb6f561f5dd9 | |
parent | a4f5084589e70648782a9c4fa73057bfd1b5bfb3 (diff) | |
parent | 24264eb00e4f4e3661ea1a28e9cbe3a97cd69580 (diff) | |
download | spack-091fcc3aa93c704fc5303dbc9f11ac3f214a8962.tar.gz spack-091fcc3aa93c704fc5303dbc9f11ac3f214a8962.tar.bz2 spack-091fcc3aa93c704fc5303dbc9f11ac3f214a8962.tar.xz spack-091fcc3aa93c704fc5303dbc9f11ac3f214a8962.zip |
Merge pull request #599 from davydden/slepc
add Slepc package
-rw-r--r-- | var/spack/repos/builtin/packages/petsc/package.py | 4 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/slepc/package.py | 49 |
2 files changed, 53 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 7239baaf7f..3dd117eed1 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -100,3 +100,7 @@ class Petsc(Package): # PETSc has its own way of doing parallel make. make('MAKE_NP=%s' % make_jobs, parallel=False) make("install") + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + # set up PETSC_DIR for everyone using PETSc package + spack_env.set('PETSC_DIR', self.prefix) diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py new file mode 100644 index 0000000000..8b5f24394f --- /dev/null +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -0,0 +1,49 @@ +import os +from spack import * + + +class Slepc(Package): + """ + Scalable Library for Eigenvalue Computations. + """ + + homepage = "http://www.grycap.upv.es/slepc" + url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz" + + version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df') + + variant('arpack', default=False, description='Enables Arpack wrappers') + + depends_on('petsc') + depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi') + depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi') + + def install(self, spec, prefix): + # set SLEPC_DIR for installation + os.environ['SLEPC_DIR'] = self.stage.source_path + + options = [] + + if '+arpack' in spec: + options.extend([ + '--with-arpack-dir=%s' % spec['arpack-ng'].prefix.lib, + ]) + if 'arpack-ng~mpi' in spec: + options.extend([ + '--with-arpack-flags=-larpack' + ]) + else: + options.extend([ + '--with-arpack-flags=-lparpack,-larpack' + ]) + + configure('--prefix=%s' % prefix, *options) + + make('MAKE_NP=%s' % make_jobs, parallel=False) + #FIXME: + # make('test') + make('install') + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + # set up SLEPC_DIR for everyone using SLEPc package + spack_env.set('SLEPC_DIR', self.prefix) |