summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/elpa/package.py15
-rw-r--r--var/spack/repos/builtin/packages/espresso/package.py29
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 = []