From e98bcaf3f58d71b4356c6925ade3817cba15c99f Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 9 Feb 2018 12:27:13 +0100 Subject: [PATCH] libSplash: 1.7.0 (#7199) Adds the latest release of libSplash (1.7.0) and newly learned CMake flags for explicit dependency control. Modifies HDF5 dependency: non-MPI splash does (and did) never run with a parallel HDF5, due to it's internal cross-dependencies on MPI. --- .../builtin/packages/libsplash/package.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libsplash/package.py b/var/spack/repos/builtin/packages/libsplash/package.py index 283de4f954..0388b31a3f 100644 --- a/var/spack/repos/builtin/packages/libsplash/package.py +++ b/var/spack/repos/builtin/packages/libsplash/package.py @@ -42,6 +42,7 @@ class Libsplash(CMakePackage): git='https://github.com/ComputationalRadiationPhysics/libSplash.git') version('master', branch='master', git='https://github.com/ComputationalRadiationPhysics/libSplash.git') + version('1.7.0', '22dea94734fe4f4c5f4e875ce70900d3') version('1.6.0', 'c05bce95abfe1ae4cd9d9817acf58d94') version('1.5.0', 'c1efec4c20334242c8a3b6bfdc0207e3') version('1.4.0', '2de37bcef6fafa1960391bf44b1b50e0') @@ -51,6 +52,21 @@ class Libsplash(CMakePackage): variant('mpi', default=True, description='Enable parallel I/O (one-file aggregation) support') - depends_on('hdf5@1.8.6:') - depends_on('hdf5+mpi', when='+mpi') + depends_on('cmake@3.10.0:', type='build', when='@1.7.0:') + depends_on('hdf5@1.8.6: ~mpi', when='~mpi') + depends_on('hdf5@1.8.6: +mpi', when='+mpi') depends_on('mpi', when='+mpi') + + def cmake_args(self): + spec = self.spec + args = [] + + if spec.satisfies('@1.7.0:'): + args += [ + '-DSplash_USE_MPI:BOOL={0}'.format( + 'ON' if '+mpi' in spec else 'OFF'), + '-DSplash_USE_PARALLEL:BOOL={0}'.format( + 'ON' if '+mpi' in spec else 'OFF') + ] + + return args