Paraview rocm (#34790)
* paraview: add `rocm` variant This conflicts with CUDA and requires at least ParaView 5.11.0. More dependencies are also needed. * E4S: Add ParaView for ROCm and CUDA stacks * DAV SDK: Update ParaView version and GPU variants * Verify using hipcc vs amdclang++ for newer hip Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
This commit is contained in:
parent
85e2fb0c4d
commit
229ee7cad9
@ -42,6 +42,9 @@ spack:
|
||||
variants: +termlib
|
||||
openblas:
|
||||
variants: threads=openmp
|
||||
paraview:
|
||||
# Don't build GUI support or GLX rendering for HPC/container deployments
|
||||
require: "@5.11 ~qt+osmesa"
|
||||
python:
|
||||
version: [3.8.13]
|
||||
trilinos:
|
||||
@ -160,8 +163,8 @@ spack:
|
||||
- caliper +cuda
|
||||
- chai ~benchmarks ~tests +cuda ^umpire@6.0.0 ~shared
|
||||
- dealii +cuda
|
||||
- ecp-data-vis-sdk +cuda
|
||||
+adios2 +hdf5 +vtkm +zfp
|
||||
- ecp-data-vis-sdk +cuda cuda_arch=80
|
||||
+adios2 +hdf5 +paraview +vtkm +zfp
|
||||
# Removing ascent because Dray is hung in CI.
|
||||
# +ascent
|
||||
- flecsi +cuda
|
||||
@ -196,8 +199,8 @@ spack:
|
||||
- cabana +rocm
|
||||
- caliper +rocm
|
||||
- chai ~benchmarks +rocm
|
||||
- ecp-data-vis-sdk +rocm
|
||||
+vtkm
|
||||
- ecp-data-vis-sdk +rocm amdgpu_target=gfx90a
|
||||
+paraview +vtkm
|
||||
- gasnet +rocm
|
||||
- ginkgo +rocm
|
||||
- heffte +rocm
|
||||
|
@ -155,22 +155,14 @@ class EcpDataVisSdk(BundlePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
depends_on("py-cinemasci", when="+cinema")
|
||||
|
||||
# ParaView needs @5.11: in order to use CUDA/ROCM, therefore it is the minimum
|
||||
# required version since GPU capability is desired for ECP
|
||||
dav_sdk_depends_on(
|
||||
"paraview@5.10:+mpi+openpmd+python+kits+shared+catalyst+libcatalyst",
|
||||
"paraview@5.11:+mpi+openpmd+python+kits+shared+catalyst+libcatalyst",
|
||||
when="+paraview",
|
||||
propagate=["hdf5", "adios2"],
|
||||
propagate=["adios2", "cuda", "hdf5", "rocm"] + amdgpu_target_variants + cuda_arch_variants,
|
||||
)
|
||||
dav_sdk_depends_on("libcatalyst+mpi", when="+paraview")
|
||||
|
||||
# ParaView needs @5.11: in order to use cuda and be compatible with other
|
||||
# SDK packages.
|
||||
depends_on("paraview +cuda", when="+paraview +cuda ^paraview@5.11:")
|
||||
for cuda_arch in cuda_arch_variants:
|
||||
depends_on(
|
||||
"paraview {0}".format(cuda_arch),
|
||||
when="+paraview {0} ^paraview@5.11:".format(cuda_arch),
|
||||
)
|
||||
depends_on("paraview ~cuda", when="+paraview ~cuda")
|
||||
dav_sdk_depends_on("libcatalyst@2:+mpi", when="+paraview")
|
||||
conflicts("paraview@master", when="+paraview")
|
||||
|
||||
dav_sdk_depends_on("visit+mpi+python+silo", when="+visit", propagate=["hdf5", "adios2"])
|
||||
|
@ -9,7 +9,7 @@
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Paraview(CMakePackage, CudaPackage):
|
||||
class Paraview(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"""ParaView is an open-source, multi-platform data analysis and
|
||||
visualization application. This package includes the Catalyst
|
||||
in-situ library for versions 5.7 and greater, otherwise use the
|
||||
@ -113,6 +113,9 @@ class Paraview(CMakePackage, CudaPackage):
|
||||
conflicts("+openpmd", when="~adios2 ~hdf5", msg="openPMD needs ADIOS2 and/or HDF5")
|
||||
conflicts("~shared", when="+cuda")
|
||||
conflicts("+cuda", when="@5.8:5.10")
|
||||
conflicts("+rocm", when="+cuda")
|
||||
conflicts("+rocm", when="use_vtkm=off")
|
||||
conflicts("paraview@:5.10", when="+rocm")
|
||||
# Legacy rendering dropped in 5.5
|
||||
# See commit: https://gitlab.kitware.com/paraview/paraview/-/commit/798d328c
|
||||
conflicts("~opengl2", when="@5.5:")
|
||||
@ -143,6 +146,7 @@ class Paraview(CMakePackage, CudaPackage):
|
||||
conflicts("cuda_arch=%d" % _arch, when="+cuda", msg="ParaView requires cuda_arch >= 20")
|
||||
|
||||
depends_on("cmake@3.3:", type="build")
|
||||
depends_on("cmake@3.21:", type="build", when="+rocm")
|
||||
|
||||
depends_on("ninja", type="build")
|
||||
|
||||
@ -209,6 +213,12 @@ class Paraview(CMakePackage, CudaPackage):
|
||||
depends_on("xz")
|
||||
depends_on("zlib")
|
||||
depends_on("libcatalyst@2:", when="+libcatalyst")
|
||||
depends_on("hip@5.2:", when="+rocm")
|
||||
for target in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"kokkos +rocm amdgpu_target={0}".format(target),
|
||||
when="+rocm amdgpu_target={0}".format(target),
|
||||
)
|
||||
|
||||
# Older builds of pugi export their symbols differently,
|
||||
# and pre-5.9 is unable to handle that.
|
||||
@ -587,6 +597,15 @@ def nvariant_bool(feature):
|
||||
if "+advanced_debug" in spec:
|
||||
cmake_args.append("-DVTK_DEBUG_LEAKS:BOOL=ON")
|
||||
|
||||
if spec.satisfies("@5.11:"):
|
||||
cmake_args.append("-DPARAVIEW_USE_HIP:BOOL=%s" % variant_bool("+rocm"))
|
||||
if "+rocm" in spec:
|
||||
archs = spec.variants["amdgpu_target"].value
|
||||
if archs != "none":
|
||||
arch_str = ",".join(archs)
|
||||
cmake_args.append("-DCMAKE_HIP_ARCHITECTURES=%s" % arch_str)
|
||||
cmake_args.append("-DKokkos_CXX_COMPILER=%s" % spec["hip"].hipcc)
|
||||
|
||||
if "+catalyst" in spec:
|
||||
cmake_args.append("-DVTK_MODULE_ENABLE_ParaView_Catalyst=YES")
|
||||
if "+python" in spec:
|
||||
|
Loading…
Reference in New Issue
Block a user