diff options
author | Denis Davydov <davydden@gmail.com> | 2017-04-19 12:34:42 +0200 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@googlemail.com> | 2017-04-19 12:34:42 +0200 |
commit | eaefaaba5bf7cc8475179604e2c1f9e583f0c16d (patch) | |
tree | 388d0c84defda4e50739336e1452881200d0e6c5 /var | |
parent | 13911f1b464939c50fb45f6eb3786ab1a8db3035 (diff) | |
download | spack-eaefaaba5bf7cc8475179604e2c1f9e583f0c16d.tar.gz spack-eaefaaba5bf7cc8475179604e2c1f9e583f0c16d.tar.bz2 spack-eaefaaba5bf7cc8475179604e2c1f9e583f0c16d.tar.xz spack-eaefaaba5bf7cc8475179604e2c1f9e583f0c16d.zip |
espresso: add 6.1.0 (#3881)
* espresso: fix missing dependency on elpa, add 6.1.0
* override default libs of elpa to get shared always
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/elpa/package.py | 15 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/espresso/package.py | 29 |
2 files changed, 38 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index 033cb1e36c..5f9a86956b 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -32,7 +32,8 @@ class Elpa(AutotoolsPackage): homepage = 'http://elpa.mpcdf.mpg.de/' url = 'http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz' - version('2016.05.004', 'c0dd3a53055536fc3a2a221e78d8b376') + version('2016.11.001.pre', '5656fd066cf0dcd071dbcaf20a639b37') + version('2016.05.004', 'c0dd3a53055536fc3a2a221e78d8b376', preferred=True) version('2016.05.003', '88a9f3f3bfb63e16509dd1be089dcf2c') version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6') @@ -49,8 +50,18 @@ class Elpa(AutotoolsPackage): t = 'http://elpa.mpcdf.mpg.de/elpa-{0}.tar.gz' return t.format(str(version)) - def setup_environment(self, spack_env, run_env): + # override default implementation which returns static lib + @property + def libs(self): + return find_libraries( + ['libelpa'], root=self.prefix, shared=True, recurse=True + ) + + build_directory = 'spack-build' + def setup_environment(self, spack_env, run_env): + # TODO: set optimum flags for platform+compiler combo, see + # https://github.com/hfp/xconfigure/tree/master/elpa spec = self.spec spack_env.set('CC', spec['mpi'].mpicc) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index d2c825513c..097049370a 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * import os +from glob import glob class Espresso(Package): @@ -37,6 +38,12 @@ class Espresso(Package): url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz' version( + '6.1.0', + 'db398edcad76e085f8c8a3f6ecb7aaab', + url='http://www.qe-forge.org/gf/download/frsrelease/240/1075/qe-6.1.tar.gz' + ) + + version( '5.4.0', '8bb78181b39bd084ae5cb7a512c1cfe7', url='http://www.qe-forge.org/gf/download/frsrelease/211/968/espresso-5.4.0.tar.gz' @@ -56,9 +63,10 @@ class Espresso(Package): depends_on('fftw+mpi', when='+mpi') # TODO : + mpi needed to avoid false dependencies installation depends_on('scalapack', when='+scalapack+mpi') + depends_on('elpa@2016.11.001.pre', when='@6.1.0+elpa') # Spurious problems running in parallel the Makefile - # generated by qe configure + # generated by the configure parallel = False def check_variants(self, spec): @@ -69,10 +77,12 @@ class Espresso(Package): raise RuntimeError(error.format(variant='elpa')) def install(self, spec, prefix): - from glob import glob self.check_variants(spec) - options = ['-prefix=%s' % prefix.bin] + options = [ + '-prefix=%s' % (prefix.bin if spec.satisfies('@:5.4.0') else + prefix) + ] if '+mpi' in spec: options.append('--enable-parallel') @@ -84,7 +94,18 @@ class Espresso(Package): options.append('--with-scalapack=yes') if '+elpa' in spec: - options.append('--with-elpa=yes') + if spec.satisfies('@:5.4.0'): + options.append('--with-elpa=yes') + else: + options.extend([ + '--with-elpa-include={0}'.format( + join_path(spec['elpa'].prefix, + 'include', + 'elpa-{0}'.format(str(spec['elpa'].version)), + 'modules') + ), + '--with-elpa-lib={0}'.format(spec['elpa'].libs.joined()) + ]) # Add a list of directories to search search_list = [] |