quantum-espresso: Enable EPW installation (#10637)

This commit is contained in:
fcannini 2019-03-26 15:33:10 -03:00 committed by Peter Scheibel
parent 763549fe7c
commit f08c9aa601

View File

@ -42,6 +42,11 @@ class QuantumEspresso(Package):
values=('parallel', 'serial', 'none'), multi=False 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 # Dependencies
depends_on('blas') depends_on('blas')
depends_on('lapack') 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=parallel')
depends_on('hdf5@1.8.16:+fortran+hl~mpi', when='hdf5=serial') 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.004')
patch('dspev_drv_elpa.patch', when='@6.1.0:+elpa ^elpa@2016.05.003') 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. # folder QE expects as a link, we issue a conflict here.
conflicts('+elpa', when='@:5.4.0') 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 # Spurious problems running in parallel the Makefile
# generated by the configure # generated by the configure
parallel = False parallel = False
@ -230,7 +259,10 @@ def install(self, spec, prefix):
'MANUAL_DFLAGS = -D__HDF5_SERIAL', 'MANUAL_DFLAGS = -D__HDF5_SERIAL',
make_inc) make_inc)
make('all') if '+epw' in spec:
make('all', 'epw')
else:
make('all')
if 'platform=darwin' in spec: if 'platform=darwin' in spec:
mkdirp(prefix.bin) mkdirp(prefix.bin)