diff options
-rw-r--r-- | var/spack/repos/builtin/packages/quantum-espresso/package.py | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index d1e1b4e100..4793f2e1de 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -42,6 +42,11 @@ class QuantumEspresso(Package): values=('parallel', 'serial', 'none'), multi=False ) + # Enables building Electron-phonon Wannier 'epw.x' executable + # http://epw.org.uk/Main/About + variant('epw', default=False, + description='Builds Electron-phonon Wannier executable') + # Dependencies depends_on('blas') depends_on('lapack') @@ -54,6 +59,9 @@ class QuantumEspresso(Package): depends_on('hdf5@1.8.16:+fortran+hl+mpi', when='hdf5=parallel') depends_on('hdf5@1.8.16:+fortran+hl~mpi', when='hdf5=serial') + # TODO: enable building EPW when ~mpi + depends_on('mpi', when='+epw') + patch('dspev_drv_elpa.patch', when='@6.1.0:+elpa ^elpa@2016.05.004') patch('dspev_drv_elpa.patch', when='@6.1.0:+elpa ^elpa@2016.05.003') @@ -100,6 +108,27 @@ class QuantumEspresso(Package): # folder QE expects as a link, we issue a conflict here. conflicts('+elpa', when='@:5.4.0') + # The first version of Q-E to feature integrated EPW is 6.0.0, + # as per http://epw.org.uk/Main/DownloadAndInstall . + # Complain if trying to install a version older than this. + conflicts('+epw', when='@:5', + msg='EPW only available from version 6.0.0 and on') + + # Below goes some constraints as shown in the link above. + # Constraints may be relaxed as successful reports + # of different compiler+mpi combinations arrive + + # TODO: enable building EPW when ~mpi + conflicts('+epw', when='~mpi', msg='EPW needs MPI') + + # EPW doesn't gets along well with OpenMPI 2.x.x + conflicts('+epw', when='^openmpi@2.0.0:2.999.999', + msg='OpenMPI version incompatible with EPW') + + # EPW also doesn't gets along well with PGI 17.x + OpenMPI 1.10.7 + conflicts('+epw', when='^openmpi@1.10.7%pgi@17.0:17.12', + msg='PGI+OpenMPI version combo incompatible with EPW') + # Spurious problems running in parallel the Makefile # generated by the configure parallel = False @@ -230,7 +259,10 @@ class QuantumEspresso(Package): 'MANUAL_DFLAGS = -D__HDF5_SERIAL', make_inc) - make('all') + if '+epw' in spec: + make('all', 'epw') + else: + make('all') if 'platform=darwin' in spec: mkdirp(prefix.bin) |