diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/elpa/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/elpa/package.py | 63 |
1 files changed, 25 insertions, 38 deletions
diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index fe249269c7..033cb1e36c 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -26,24 +26,15 @@ from spack import * -class Elpa(Package): - """ - Eigenvalue solvers for Petaflop-Applications (ELPA) - """ +class Elpa(AutotoolsPackage): + """Eigenvalue solvers for Petaflop-Applications (ELPA)""" homepage = 'http://elpa.mpcdf.mpg.de/' url = 'http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz' - version( - '2016.05.003', - '88a9f3f3bfb63e16509dd1be089dcf2c', - url='http://elpa.mpcdf.mpg.de/html/Releases/2016.05.003/elpa-2016.05.003.tar.gz' - ) - version( - '2015.11.001', - 'de0f35b7ee7c971fd0dca35c900b87e6', - url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz' - ) + version('2016.05.004', 'c0dd3a53055536fc3a2a221e78d8b376') + version('2016.05.003', '88a9f3f3bfb63e16509dd1be089dcf2c') + version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6') variant('openmp', default=False, description='Activates OpenMP support') @@ -52,30 +43,26 @@ class Elpa(Package): depends_on('lapack') depends_on('scalapack') - def install(self, spec, prefix): + def url_for_version(self, version): + t = 'http://elpa.mpcdf.mpg.de/html/Releases/{0}/elpa-{0}.tar.gz' + if version < Version('2016.05.003'): + t = 'http://elpa.mpcdf.mpg.de/elpa-{0}.tar.gz' + return t.format(str(version)) - options = [ - 'CC={0}'.format(self.spec['mpi'].mpicc), - 'FC={0}'.format(self.spec['mpi'].mpifc), - 'CXX={0}'.format(self.spec['mpi'].mpicxx), - 'FCFLAGS={0}'.format( - spec['lapack'].libs.joined() - ), - 'LDFLAGS={0}'.format( - spec['lapack'].libs.joined() - ), - 'SCALAPACK_FCFLAGS={0}'.format( - spec['scalapack'].libs.joined() - ), - 'SCALAPACK_LDFLAGS={0}'.format( - spec['scalapack'].libs.joined() - ), - '--prefix={0}'.format(self.prefix) - ] + def setup_environment(self, spack_env, run_env): - if '+openmp' in spec: - options.append("--enable-openmp") + spec = self.spec + + spack_env.set('CC', spec['mpi'].mpicc) + spack_env.set('FC', spec['mpi'].mpifc) + spack_env.set('CXX', spec['mpi'].mpicxx) - configure(*options) - make() - make("install") + spack_env.set('LDFLAGS', spec['lapack'].libs.search_flags) + spack_env.set('LIBS', spec['lapack'].libs.link_flags) + spack_env.set('SCALAPACK_LDFLAGS', spec['scalapack'].libs.joined()) + + def configure_args(self): + options = [] + if '+openmp' in self.spec: + options.append("--enable-openmp") + return options |