update ascent package with recent ver dep logic, and dray support (#17502)

* update ascent package with recent ver dep logic, and dray support

* update pmt name, make babelflow logic dep on mpi
This commit is contained in:
Cyrus Harrison 2020-07-18 06:53:48 -07:00 committed by GitHub
parent ef814b7a32
commit bab1852340
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,22 +35,21 @@ class Ascent(Package, CudaPackage):
homepage = "https://github.com/Alpine-DAV/ascent" homepage = "https://github.com/Alpine-DAV/ascent"
git = "https://github.com/Alpine-DAV/ascent.git" git = "https://github.com/Alpine-DAV/ascent.git"
url = "https://github.com/Alpine-DAV/ascent/releases/download/v0.5.0/ascent-v0.5.0-src-with-blt.tar.gz" url = "https://github.com/Alpine-DAV/ascent/releases/download/v0.5.1/ascent-v0.5.1-src-with-blt.tar.gz"
maintainers = ['cyrush'] maintainers = ['cyrush']
version('develop', version('develop',
branch='develop', branch='develop',
submodules=True) submodules=True,
preferred=True)
version('0.5.0', sha256='2837b7371db3ac1bcc31a479d7cf0eb62a503cacadfa4187061502b3c4a89fa0')
########################################################################### ###########################################################################
# package variants # package variants
########################################################################### ###########################################################################
variant("shared", default=True, description="Build Ascent as shared libs") variant("shared", default=True, description="Build Ascent as shared libs")
variant("test", default=True, description='Enable Ascent unit tests') variant('test', default=True, description='Enable Ascent unit tests')
variant("mpi", default=True, description="Build Ascent MPI Support") variant("mpi", default=True, description="Build Ascent MPI Support")
variant("serial", default=True, description="build serial (non-mpi) libraries") variant("serial", default=True, description="build serial (non-mpi) libraries")
@ -68,11 +67,15 @@ class Ascent(Package, CudaPackage):
variant("cuda", default=False, description="Build cuda support") variant("cuda", default=False, description="Build cuda support")
variant("mfem", default=False, description="Build MFEM filter support") variant("mfem", default=False, description="Build MFEM filter support")
variant("adios", default=False, description="Build Adios filter support") variant("adios", default=False, description="Build Adios filter support")
variant("dray", default=False, description="Build with Devil Ray support")
# variants for dev-tools (docs, etc) # variants for dev-tools (docs, etc)
variant("doc", default=False, description="Build Conduit's documentation") variant("doc", default=False, description="Build Ascent's documentation")
########################################################################### # variant for BabelFlow runtime
variant("babelflow", default=False, description="Build with BabelFlow")
##########################################################################
# package dependencies # package dependencies
########################################################################### ###########################################################################
@ -102,29 +105,54 @@ class Ascent(Package, CudaPackage):
depends_on("mpi", when="+mpi") depends_on("mpi", when="+mpi")
depends_on("py-mpi4py", when="+mpi+python+shared") depends_on("py-mpi4py", when="+mpi+python+shared")
#######################
# BabelFlow
#######################
depends_on('babelflow@develop', when='+babelflow+mpi')
depends_on('parallelmergetree@develop', when='+babelflow+mpi')
############################# #############################
# TPLs for Runtime Features # TPLs for Runtime Features
############################# #############################
depends_on("vtk-h@0.5.0", when="+vtkh") depends_on("vtk-h", when="+vtkh")
depends_on("vtk-h@0.5.0~openmp", when="+vtkh~openmp") depends_on("vtk-h~openmp", when="+vtkh~openmp")
depends_on("vtk-h@0.5.0+cuda+openmp", when="+vtkh+cuda+openmp") depends_on("vtk-h+cuda+openmp", when="+vtkh+cuda+openmp")
depends_on("vtk-h@0.5.0+cuda~openmp", when="+vtkh+cuda~openmp") depends_on("vtk-h+cuda~openmp", when="+vtkh+cuda~openmp")
depends_on("vtk-h@0.5.0~shared", when="~shared+vtkh") depends_on("vtk-h~shared", when="~shared+vtkh")
depends_on("vtk-h@0.5.0~shared~openmp", when="~shared+vtkh~openmp") depends_on("vtk-h~shared~openmp", when="~shared+vtkh~openmp")
depends_on("vtk-h@0.5.0~shared+cuda", when="~shared+vtkh+cuda") depends_on("vtk-h~shared+cuda", when="~shared+vtkh+cuda")
depends_on("vtk-h@0.5.0~shared+cuda~openmp", when="~shared+vtkh+cuda~openmp") depends_on("vtk-h~shared+cuda~openmp", when="~shared+vtkh+cuda~openmp")
# mfem # mfem
depends_on("mfem+threadsafe+shared+mpi+conduit", when="+shared+mfem+mpi") depends_on("mfem~threadsafe~openmp+shared+mpi+conduit", when="+shared+mfem+mpi")
depends_on("mfem+threadsafe~shared+mpi+conduit", when="~shared+mfem+mpi") depends_on("mfem~threadsafe~openmp~shared+mpi+conduit", when="~shared+mfem+mpi")
depends_on("mfem+threadsafe+shared~mpi+conduit", when="+shared+mfem~mpi") depends_on("mfem~threadsafe~openmp+shared~mpi+conduit", when="+shared+mfem~mpi")
depends_on("mfem+threadsafe~shared~mpi+conduit", when="~shared+mfem~mpi") depends_on("mfem~threadsafe~openmp~shared~mpi+conduit", when="~shared+mfem~mpi")
depends_on("adios", when="+adios") depends_on("adios", when="+adios")
# devil ray variants with mpi
# we have to specify both because mfem makes us
depends_on("dray@develop+mpi~test~utils+shared+cuda", when="+dray+mpi+cuda+shared")
depends_on("dray@develop+mpi~test~utils+shared+openmp", when="+dray+mpi+openmp+shared")
depends_on("dray@develop+mpi~test~utils+shared~openmp~cuda", when="+dray+mpi~openmp~cuda+shared")
depends_on("dray@develop+mpi~test~utils~shared+cuda", when="+dray+mpi+cuda~shared")
depends_on("dray@develop+mpi~test~utils~shared+openmp", when="+dray+mpi+openmp~shared")
depends_on("dray@develop+mpi~test~utils~shared~openmp~cuda", when="+dray+mpi~openmp~cuda~shared")
# devil ray variants without mpi
depends_on("dray@develop~mpi~test~utils+shared+cuda", when="+dray~mpi+cuda+shared")
depends_on("dray@develop~mpi~test~utils+shared+openmp", when="+dray~mpi+openmp+shared")
depends_on("dray@develop~mpi~test~utils+shared~openmp~cuda", when="+dray~mpi~openmp~cuda+shared")
depends_on("dray@develop~mpi~test~utils~shared+cuda", when="+dray~mpi+cuda~shared")
depends_on("dray@develop~mpi~test~utils~shared+openmp", when="+dray~mpi+openmp~shared")
depends_on("dray@develop~mpi~test~utils~shared~openmp~cuda", when="+dray~mpi~openmp~cuda~shared")
####################### #######################
# Documentation related # Documentation related
####################### #######################
@ -398,6 +426,16 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
else: else:
cfg.write(cmake_cache_entry("MPIEXEC", cfg.write(cmake_cache_entry("MPIEXEC",
mpiexe_bin)) mpiexe_bin))
###################################
# BABELFLOW (also depends on mpi)
###################################
if "+babelflow" in spec:
cfg.write(cmake_cache_entry("ENABLE_BABELFLOW", "ON"))
cfg.write(cmake_cache_entry("BabelFlow_DIR",
spec['babelflow'].prefix))
cfg.write(cmake_cache_entry("PMT_DIR",
spec['parallelmergetree'].prefix))
else: else:
cfg.write(cmake_cache_entry("ENABLE_MPI", "OFF")) cfg.write(cmake_cache_entry("ENABLE_MPI", "OFF"))
@ -449,6 +487,15 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
else: else:
cfg.write("# mfem not built by spack \n") cfg.write("# mfem not built by spack \n")
#######################
# Devil Ray
#######################
if "+dray" in spec:
cfg.write("# devil ray from spack \n")
cfg.write(cmake_cache_entry("DRAY_DIR", spec['dray'].prefix))
else:
cfg.write("# devil ray not built by spack \n")
####################### #######################
# Adios # Adios
####################### #######################