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
This commit is contained in:

committed by
Massimiliano Culpo

parent
13911f1b46
commit
eaefaaba5b
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
from glob import glob
|
||||
|
||||
|
||||
class Espresso(Package):
|
||||
@@ -36,6 +37,12 @@ class Espresso(Package):
|
||||
homepage = 'http://quantum-espresso.org'
|
||||
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',
|
||||
@@ -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 @@ def check_variants(self, spec):
|
||||
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 @@ def install(self, spec, prefix):
|
||||
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 = []
|
||||
|
Reference in New Issue
Block a user