QMCPACK Update Nov2019 (#13832)
* Bump up QE version number to 6.4.1. * Fix QMCPACK conflicts. * HDF5 dependencies where over specified which could cause unnecessary installs of HDF5. * Update QMCPACK testing option. * Remove support for serial QE 6.4.1 converter. Add support for parallel QE 6.4.1. converter with serial HDF5. * Switch to setup_run_environment. * Fix setup_run_environment call arguements. * Fix typo. * switch run_env to env
This commit is contained in:
parent
85ce22a0b8
commit
d7db42e201
1 changed files with 34 additions and 31 deletions
|
@ -54,22 +54,29 @@ class Qmcpack(CMakePackage, CudaPackage):
|
|||
variant('gui', default=False,
|
||||
description='Install with Matplotlib (long installation time)')
|
||||
variant('qe', default=True,
|
||||
description='Install with patched Quantum Espresso 6.4.0')
|
||||
description='Install with patched Quantum Espresso 6.4.1')
|
||||
|
||||
# cuda variant implies mixed precision variant by default, but there is
|
||||
# no way to express this in variant syntax, need something like
|
||||
# variant('+mixed', default=True, when='+cuda', description="...")
|
||||
|
||||
# conflicts
|
||||
# high-level variant conflicts
|
||||
conflicts(
|
||||
'+phdf5',
|
||||
when='~mpi',
|
||||
msg='Parallel collective I/O requires MPI-enabled QMCPACK. '
|
||||
'Please add "~phdf5" to the Spack install line for serial QMCPACK.')
|
||||
|
||||
conflicts('+soa',
|
||||
when='+cuda',
|
||||
msg='QMCPACK SOA variant does not exist for CUDA')
|
||||
conflicts(
|
||||
'+soa',
|
||||
when='+cuda@:3.4.0',
|
||||
msg='QMCPACK CUDA+SOA variant does not exist prior to v. 3.5.0.')
|
||||
|
||||
conflicts(
|
||||
'+qe',
|
||||
when='~mpi',
|
||||
msg='Serial QMCPACK with serial QE converter not supported. '
|
||||
'Configure in serial QE + serial HDF5 will not run correctly.')
|
||||
|
||||
conflicts('^openblas+ilp64',
|
||||
msg='QMCPACK does not support OpenBLAS 64-bit integer variant')
|
||||
|
@ -110,12 +117,11 @@ class Qmcpack(CMakePackage, CudaPackage):
|
|||
depends_on('mpi', when='+mpi')
|
||||
|
||||
# HDF5
|
||||
depends_on('hdf5+hl+fortran', when='+qe')
|
||||
depends_on('hdf5+hl+fortran+mpi', when='+qe+mpi')
|
||||
depends_on('hdf5+hl+fortran~mpi', when='+qe~mpi')
|
||||
depends_on('hdf5~hl~fortran', when='~qe')
|
||||
depends_on('hdf5~hl~fortran+mpi', when='~qe+mpi')
|
||||
depends_on('hdf5~hl~fortran~mpi', when='~qe~mpi')
|
||||
depends_on('hdf5~mpi', when='~phdf5')
|
||||
depends_on('hdf5+mpi', when='+phdf5')
|
||||
depends_on('hdf5+hl+fortran~mpi', when='+qe~phdf5')
|
||||
depends_on('hdf5+hl+fortran+mpi', when='+qe+phdf5')
|
||||
|
||||
# Math libraries
|
||||
depends_on('blas')
|
||||
depends_on('lapack')
|
||||
|
@ -138,11 +144,11 @@ class Qmcpack(CMakePackage, CudaPackage):
|
|||
patch_checksum = '57cb1b06ee2653a87c3acc0dd4f09032fcf6ce6b8cbb9677ae9ceeb6a78f85e2'
|
||||
depends_on('quantum-espresso@6.4.1+mpi hdf5=parallel',
|
||||
patches=patch(patch_url, sha256=patch_checksum),
|
||||
when='+qe+mpi', type='run')
|
||||
when='+qe+phdf5', type='run')
|
||||
|
||||
depends_on('quantum-espresso@6.4.1~scalapack~mpi hdf5=serial',
|
||||
depends_on('quantum-espresso@6.4.1+mpi hdf5=serial',
|
||||
patches=patch(patch_url, sha256=patch_checksum),
|
||||
when='+qe~mpi', type='run')
|
||||
when='+qe~phdf5', type='run')
|
||||
|
||||
# Backport several patches from recent versions of QMCPACK
|
||||
# The test_numerics unit test is broken prior to QMCPACK 3.3.0
|
||||
|
@ -349,38 +355,35 @@ def install(self, spec, prefix):
|
|||
# QMCPACK 3.6.0 install directory structure changed, thus there
|
||||
# thus are two version of the setup_environment method
|
||||
@when('@:3.5.0')
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
def setup_run_environment(self, env):
|
||||
"""Set-up runtime environment for QMCPACK.
|
||||
Set PYTHONPATH for basic analysis scripts and for Nexus."""
|
||||
run_env.prepend_path('PYTHONPATH', self.prefix.nexus)
|
||||
env.prepend_path('PYTHONPATH', self.prefix.nexus)
|
||||
|
||||
@when('@3.6.0:')
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
def setup_run_environment(self, env):
|
||||
"""Set-up runtime environment for QMCPACK.
|
||||
Set PYTHONPATH for basic analysis scripts and for Nexus. Binaries
|
||||
are in the 'prefix' directory instead of 'prefix.bin' which is
|
||||
not set by the default module environment"""
|
||||
run_env.prepend_path('PATH', self.prefix)
|
||||
run_env.prepend_path('PYTHONPATH', self.prefix)
|
||||
env.prepend_path('PATH', self.prefix)
|
||||
env.prepend_path('PYTHONPATH', self.prefix)
|
||||
|
||||
@run_after('build')
|
||||
@on_package_attributes(run_tests=True)
|
||||
def check(self):
|
||||
def check_install(self):
|
||||
"""Run ctest after building binary.
|
||||
It can take over 24 hours to run all the regression tests, here we
|
||||
only run the unit tests and short tests. If the unit tests fail,
|
||||
the QMCPACK installation aborts. On the other hand, the short tests
|
||||
are too strict and often fail, but are still useful to run. In the
|
||||
future, the short tests will be more reasonable in terms of quality
|
||||
assurance (i.e. they will not be so strict), but will be sufficient to
|
||||
validate QMCPACK in production."""
|
||||
only run the unit tests and deterministic tests. If the unit tests
|
||||
fail, the QMCPACK installation aborts. If the deterministic tests
|
||||
fails, QMCPACK will still install and emit a warning message."""
|
||||
|
||||
with working_dir(self.build_directory):
|
||||
ctest('-L', 'unit')
|
||||
ctest('-R', 'unit')
|
||||
try:
|
||||
ctest('-R', 'short')
|
||||
ctest('-R', 'deterministic', '-LE', 'unstable')
|
||||
except ProcessError:
|
||||
warn = 'Unit tests passed, but short tests have failed.\n'
|
||||
warn += 'Please review failed tests before proceeding\n'
|
||||
warn += 'with production calculations.\n'
|
||||
warn = 'Unit tests passed, but deterministic tests failed.\n'
|
||||
warn += 'Please report this failure to:\n'
|
||||
warn += 'https://github.com/QMCPACK/qmcpack/issues'
|
||||
tty.msg(warn)
|
||||
|
|
Loading…
Reference in a new issue