espresso : current working tree
This commit is contained in:
parent
157ec210a7
commit
ca3cdb4458
@ -1,53 +1,44 @@
|
|||||||
# FIXME:
|
import llnl.util.tty as tty
|
||||||
# This is a template package file for Spack. We've conveniently
|
|
||||||
# put "FIXME" labels next to all the things you'll want to change.
|
|
||||||
#
|
|
||||||
# Once you've edited all the FIXME's, delete this whole message,
|
|
||||||
# save this file, and test out your package like this:
|
|
||||||
#
|
|
||||||
# spack install espresso
|
|
||||||
#
|
|
||||||
# You can always get back here to change things with:
|
|
||||||
#
|
|
||||||
# spack edit espresso
|
|
||||||
#
|
|
||||||
# See the spack documentation for more information on building
|
|
||||||
# packages.
|
|
||||||
#
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class Espresso(Package):
|
class Espresso(Package):
|
||||||
"""FIXME: put a proper description of your package here."""
|
"""
|
||||||
# FIXME: add a proper url for your package's homepage here.
|
QE is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials
|
||||||
homepage = "http://quantum-espresso.org"
|
modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.
|
||||||
url = "http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz"
|
"""
|
||||||
|
homepage = 'http://quantum-espresso.org'
|
||||||
|
url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz'
|
||||||
|
|
||||||
version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3')
|
version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3')
|
||||||
|
|
||||||
variant('mpi', default=True, description='Build Quantum-ESPRESSO with mpi support')
|
variant('mpi', default=True, description='Build Quantum-ESPRESSO with mpi support')
|
||||||
variant('openmp', default=False, description='Build Quantum-ESPRESSO with mpi openmp')
|
variant('openmp', default=False, description='Enables openMP support')
|
||||||
variant('scalapack', default=False, description='Build Quantum-ESPRESSO with mpi openmp')
|
variant('scalapack', default=False, description='Enables scalapack support')
|
||||||
|
variant('elpa', default=True, description='Use elpa as an eigenvalue solver')
|
||||||
|
|
||||||
|
depends_on('blas')
|
||||||
|
depends_on('lapack')
|
||||||
|
|
||||||
# FIXME: Add dependencies if this package requires them.
|
|
||||||
# depends_on("foo")
|
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
|
depends_on('elpa', when='+elpa')
|
||||||
|
depends_on('scalapack', when='+scalapack')
|
||||||
|
|
||||||
|
def check_variants(self, spec):
|
||||||
# def install(self, spec, prefix):
|
error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active'
|
||||||
# FIXME: Modify the configure line to suit your build system here.
|
if '+scalapack' in spec and '~mpi' in spec:
|
||||||
# configure('--prefix=%s' % prefix)
|
raise RuntimeError(error.format(variant='scalapack'))
|
||||||
|
if '+elpa' in spec and '~mpi' in spec:
|
||||||
# FIXME: Add logic to build and install here
|
raise RuntimeError(error.format(variant='elpa'))
|
||||||
# make()
|
|
||||||
# make("install")
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# TAU isn't happy with directories that have '@' in the path. Sigh.
|
self.check_variants(spec)
|
||||||
|
|
||||||
# TAU configure, despite the name , seems to be a manually written script (nothing related to autotools).
|
options = ['-prefix=%s' % prefix]
|
||||||
# As such it has a few #peculiarities# that make this build quite hackish.
|
|
||||||
options = ["-prefix=%s" % prefix,
|
if '+mpi' in spec:
|
||||||
"--enable-parallel"]
|
options.append('--enable-parallel')
|
||||||
|
|
||||||
if '+openmp' in spec:
|
if '+openmp' in spec:
|
||||||
options.append('--enable-openmp')
|
options.append('--enable-openmp')
|
||||||
@ -55,7 +46,9 @@ def install(self, spec, prefix):
|
|||||||
if '+scalapack' in spec:
|
if '+scalapack' in spec:
|
||||||
options.append('--with-scalapack=yes')
|
options.append('--with-scalapack=yes')
|
||||||
|
|
||||||
configure(*options)
|
if '+elpa' in spec:
|
||||||
make("all")
|
options.append('--with-elpa=%s' % spec['elpa'].prefix)
|
||||||
make("install")
|
|
||||||
|
|
||||||
|
configure(*options)
|
||||||
|
make('all')
|
||||||
|
make('install')
|
||||||
|
Loading…
Reference in New Issue
Block a user