summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNichols A. Romero <naromero77@users.noreply.github.com>2019-11-27 16:37:51 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2019-11-27 16:37:51 -0600
commitd7db42e2013fa97e04788a8e6f297c7ea1c0fdb1 (patch)
treef24faff422a396802932f9473002389c27545abb
parent85ce22a0b848d03f066137d2efd6a65d3f6c632c (diff)
downloadspack-d7db42e2013fa97e04788a8e6f297c7ea1c0fdb1.tar.gz
spack-d7db42e2013fa97e04788a8e6f297c7ea1c0fdb1.tar.bz2
spack-d7db42e2013fa97e04788a8e6f297c7ea1c0fdb1.tar.xz
spack-d7db42e2013fa97e04788a8e6f297c7ea1c0fdb1.zip
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
-rw-r--r--var/spack/repos/builtin/packages/qmcpack/package.py65
1 files changed, 34 insertions, 31 deletions
diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py
index 67041e455a..06eaf10996 100644
--- a/var/spack/repos/builtin/packages/qmcpack/package.py
+++ b/var/spack/repos/builtin/packages/qmcpack/package.py
@@ -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 @@ class Qmcpack(CMakePackage, CudaPackage):
# 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)