From 08e5baccef2a6381bfe6c6e19e499735abf15d90 Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Thu, 14 Jan 2021 08:24:27 -0500 Subject: [PATCH] ecp-data-vis-sdk: Combine the vis and io SDK packages (#20737) This better enables the collective set to be deployed togethor satisfying eachothers dependencies --- .../packages/ecp-data-vis-sdk/package.py | 111 ++++++++++++++++++ .../builtin/packages/ecp-io-sdk/package.py | 34 ------ .../builtin/packages/ecp-viz-sdk/package.py | 39 ------ 3 files changed, 111 insertions(+), 73 deletions(-) create mode 100644 var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py delete mode 100644 var/spack/repos/builtin/packages/ecp-io-sdk/package.py delete mode 100644 var/spack/repos/builtin/packages/ecp-viz-sdk/package.py diff --git a/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py new file mode 100644 index 0000000000..cc9135dde3 --- /dev/null +++ b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py @@ -0,0 +1,111 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class EcpDataVisSdk(BundlePackage): + """ECP Data & Vis SDK""" + + homepage = "https://github.com/chuckatkins/ecp-data-viz-sdk" + + tags = ['ecp'] + maintainers = ['chuckatkins'] + + version('1.0') + + ############################################################ + # Variants + ############################################################ + + # I/O + variant('adios2', default=True, description="Enable ADIOS2") + variant('darshan', default=True, description="Enable Darshan") + variant('faodel', default=False, description="Enable FAODEL") + variant('hdf5', default=True, description="Enable HDF5") + variant('pnetcdf', default=True, description="Enable PNetCDF") + variant('unifyfs', default=True, description="Enable UnifyFS") + variant('veloc', default=True, description="Enable VeloC") + + # Vis + variant('ascent', default=False, description="Enable Ascent") + variant('cinema', default=True, description="Enable Cinema") + variant('paraview', default=False, description="Enable ParaView") + variant('sz', default=True, description="Enable SZ") + variant('vtkm', default=False, description="Enable VTK-m") + variant('zfp', default=True, description="Enable ZFP") + + # Outstanding build issues + # variant('catalyst', default=False, description="Enable Catalyst") + # variant('visit', default=False, description="Enable VisIt") + + ############################################################ + # This is a messy workaround until the clingo concretizer can be required. + # The intent is to map package variants to dependency variants: + # Package variants a, and b, mapping to dependency variants A and B + # produce the following set of dependencies: + # depends_on('foo+A+B', when='+a+b') + # depends_on('foo+A~B', when='+a~b') + # depends_on('foo~A+B', when='~a+b') + # depends_on('foo~A~B', when='~a~b') + # The clingo concretizer will allow that to be expressed much simpler by + # only considering defaults once everything else is resolved: + # depends_on('foo') + # depends_on('foo+A', when='+a') + # depends_on('foo+B', when='+b') + ############################################################ + + # Helper function to generate dependencies on the Cartesian product of + # variants. If a dictionary is passed then it provides a mapping of + # package variant name to dependency variant name. Otherwise assume they + # are the same variant name in both the package and dependency + def variants2deps(dep_spec, pkg_spec, variants): + if not type(variants) is dict: + variants = dict([(v, v) for v in variants]) + n = len(variants) + for i in range(0, pow(2, n)): + state = ['+' if d == '1' else '~' for d in format(i, '0' + str(n) + 'b')] + [pkg_vars, dep_vars] = [''.join(v) for v in zip( + *[(s + pv, s + dv) for s, (pv, dv) in zip(state, variants.items())])] + depends_on(dep_spec + dep_vars, when=(pkg_spec + pkg_vars)) + + ############################################################ + # Dependencies + ############################################################ + variants2deps('adios2+shared+mpi+fortran+python+blosc+sst+ssc+dataman', + '+adios2', ['hdf5', 'sz', 'zfp']) + + depends_on('darshan-runtime+mpi', when='+darshan') + depends_on('darshan-util', when='+darshan') + + variants2deps('faodel+shared+mpi network=libfabric', '+faodel', ['hdf5']) + + depends_on('hdf5 +shared+mpi', when='+hdf5') + # +fortran breaks the concretizer... Needs new concretizer + # depends_on('hdf5 +shared+mpi+fortran', when='+hdf5') + + depends_on('parallel-netcdf+shared+fortran', when='+pnetcdf') + + variants2deps('unifyfs+fortran', '+unifyfs', ['hdf5']) + + depends_on('veloc', when='+veloc') + + depends_on('ascent+shared+mpi+fortran+openmp+python+vtkh+dray', when='+ascent') + depends_on('catalyst', when='+catalyst') + + depends_on('py-cinema-lib', when='+cienma') + depends_on('py-cinemasci', when='+cienma') + + variants2deps('paraview+shared+mpi+python3+kits', '+paraview', ['hdf5']) + # +adios2 is not yet enabled in the paraview package + # depends_on('paraview+adios2', when='+paraview +adios2') + + depends_on('visit', when='+visit') + + depends_on('vtk-m+shared+mpi+openmp+rendering', when='+vtkm') + + variants2deps('sz+shared+fortran+python+random_access', '+sz', ['hdf5']) + + depends_on('zfp', when='+zfp') diff --git a/var/spack/repos/builtin/packages/ecp-io-sdk/package.py b/var/spack/repos/builtin/packages/ecp-io-sdk/package.py deleted file mode 100644 index c50fe8e513..0000000000 --- a/var/spack/repos/builtin/packages/ecp-io-sdk/package.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack import * - - -class EcpIoSdk(BundlePackage): - """ECP I/O Services SDK""" - - homepage = "https://github.com/chuckatkins/ecp-data-viz-sdk" - git = "https://github.com/chuckatkins/ecp-data-viz-sdk.git" - - maintainers = ['chuckatkins'] - - version('1.0', branch='master') - - variant('adios2', default=True, description="Enable ADIOS2") - variant('darshan', default=True, description="Enable Darshan") - variant('faodel', default=False, description="Enable FAODEL") - variant('hdf5', default=True, description="Enable HDF5") - variant('pnetcdf', default=True, description="Enable PNetCDF") - variant('unifyfs', default=True, description="Enable UnifyFS") - variant('veloc', default=True, description="Enable VeloC") - - depends_on('adios2+shared+mpi+fortran+python+zfp+sz+blosc+hdf5+sst+ssc+dataman', when='+adios2') - depends_on('darshan-runtime+mpi', when='+darshan') - depends_on('darshan-util', when='+darshan') - depends_on('faodel+shared+mpi+hdf5 network=libfabric', when='+faodel') - depends_on('hdf5+shared+mpi+fortran', when='+hdf5') - depends_on('parallel-netcdf+shared+fortran', when='+pnetcdf') - depends_on('unifyfs+fortran+hdf5', when='+unifyfs') - depends_on('veloc', when='+veloc') diff --git a/var/spack/repos/builtin/packages/ecp-viz-sdk/package.py b/var/spack/repos/builtin/packages/ecp-viz-sdk/package.py deleted file mode 100644 index 6ff47cfc56..0000000000 --- a/var/spack/repos/builtin/packages/ecp-viz-sdk/package.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack import * - - -class EcpVizSdk(BundlePackage): - """ECP Viz & Analysis SDK""" - - homepage = "https://github.com/chuckatkins/ecp-data-viz-sdk" - git = "https://github.com/chuckatkins/ecp-data-viz-sdk.git" - - maintainers = ['chuckatkins'] - - version('1.0', branch='master') - - variant('ascent', default=False, description="Enable Ascent") - # variant('catalyst', default=False, description="Enable Catalyst") - variant('paraview', default=False, description="Enable ParaView") - variant('sz', default=False, description="Enable SZ") - variant('vtkm', default=False, description="Enable VTK-m") - variant('zfp', default=False, description="Enable ZFP") - - # Outstanding build issues - # variant('visit', default=False, description="Enable VisIt") - - # Missing spack package - # variant('cinema', default=False, description="Enable Cinema") - # variant('rover', default=False, description="Enable ROVER") - - depends_on('ascent+shared+mpi+fortran+openmp+python+vtkh+dray', when='+ascent') - depends_on('catalyst', when='+catalyst') - depends_on('paraview+shared+mpi+python3+hdf5+kits', when='+paraview') - depends_on('visit', when='+visit') - depends_on('vtk-m+shared+mpi+openmp+rendering', when='+vtkm') - depends_on('sz+shared+fortran+hdf5+python+random_access', when='+sz') - depends_on('zfp', when='+zfp')