ECP-SDK: enable hdf5-vfd-gds when +cuda (#33300)

- hdf5-vfd-gds:
    - Add new version 1.0.2 compatible with hdf5@1.13.
    - CMake is a build dependency.
    - Set `HDF5_PLUGIN_PATH` in the runtime environment, this plugin
      is loaded dynamically.
- SDK:
    - The VFD GDS driver only has utility when CUDA is enabled.
    - Require hdf5-vfd-gds@1.0.2+ (1.0.1 and earlier do not compile).
This commit is contained in:
Stephen McDowell 2022-10-27 14:51:19 -04:00 committed by GitHub
parent 13636a2094
commit 4be67facdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 8 deletions

View file

@ -15,17 +15,22 @@ def dav_sdk_depends_on(spec, when=None, propagate=None):
# ie. A +c ~b -> A # ie. A +c ~b -> A
spec = Spec(spec).name spec = Spec(spec).name
if "+" in when and len(when.split()) == 1: # If the package is in the spec tree then it must be enabled in the SDK.
when_not = when.replace("+", "~") if "+" in when:
# If the package is in the spec tree then it must _when_variants = when.strip("+").split("+")
# be enabled in the SDK. if any(tok in when for tok in ["~", "="]):
conflicts(when_not, "^" + spec) tty.error("Bad token in when clause, only positive boolean tokens allowed")
for variant in _when_variants:
conflicts("~" + variant, when="^" + spec)
# Skip if there is nothing to propagate # Skip if there is nothing to propagate
if not propagate: if not propagate:
return return
# Map the propagated variants to the dependency variant # Map the propagated variants to the dependency variant. Some packages may need
# overrides to propagate a dependency as something else, e.g., {"visit": "libsim"}.
# Most call-sites will just use a list.
if not type(propagate) is dict: if not type(propagate) is dict:
propagate = dict([(v, v) for v in propagate]) propagate = dict([(v, v) for v in propagate])
@ -108,6 +113,7 @@ class EcpDataVisSdk(BundlePackage, CudaPackage, ROCmPackage):
dav_sdk_depends_on("faodel+shared+mpi network=libfabric", when="+faodel", propagate=["hdf5"]) dav_sdk_depends_on("faodel+shared+mpi network=libfabric", when="+faodel", propagate=["hdf5"])
dav_sdk_depends_on("hdf5@1.12: +shared+mpi", when="+hdf5", propagate=["fortran"]) dav_sdk_depends_on("hdf5@1.12: +shared+mpi", when="+hdf5", propagate=["fortran"])
dav_sdk_depends_on("hdf5-vfd-gds@1.0.2:", when="+cuda+hdf5", propagate=cuda_arch_variants)
dav_sdk_depends_on("parallel-netcdf+shared", when="+pnetcdf", propagate=["fortran"]) dav_sdk_depends_on("parallel-netcdf+shared", when="+pnetcdf", propagate=["fortran"])

View file

@ -17,19 +17,22 @@ class Hdf5VfdGds(CMakePackage, CudaPackage):
# Versions # Versions
version("master", branch="master") version("master", branch="master")
version("1.0.2", sha256="f7df64ff62e057b525bc30ed6534f9c0752e52bd58b65f7c147878d6c68105ae")
version("1.0.1", sha256="00e125fd149561be991f41e883824de826d8add604aebccf103a4fb82d5faac2") version("1.0.1", sha256="00e125fd149561be991f41e883824de826d8add604aebccf103a4fb82d5faac2")
version("1.0.0", sha256="6b16105c7c49f13fc05784ee69b78d45fb159270c78d760689f9cd21e230ddd2") version("1.0.0", sha256="6b16105c7c49f13fc05784ee69b78d45fb159270c78d760689f9cd21e230ddd2")
# Dependencies # Dependencies
conflicts("~cuda") conflicts("~cuda")
depends_on("cmake@3.12:") depends_on("cmake@3.12:", type="build")
depends_on("hdf5@1.13.0:") depends_on("hdf5@1.13.0:")
def cmake_args(self): def cmake_args(self):
# CMake options # CMake options
args = [ args = [
self.define("BUILD_TESTING", self.run_tests), self.define("BUILD_TESTING", self.run_tests),
] ]
return args return args
def setup_run_environment(self, env):
env.prepend_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)