diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/visit/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/visit/package.py | 85 |
1 files changed, 57 insertions, 28 deletions
diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index cf023cb705..a95b9943b4 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -58,6 +58,12 @@ class Visit(CMakePackage): executables = ["^visit$"] version("develop", branch="develop") + version("3.4.1", sha256="942108cb294f4c9584a1628225b0be39c114c7e9e01805fb335d9c0b507689f5") + version( + "3.4.0", + sha256="6cfb8b190045439e39fa6014dfa797de189bd40bbb9aa6facf711ebd908229e3", + deprecated=True, + ) version("3.3.3", sha256="cc67abb7585e23b51ad576e797df4108641ae6c8c5e80e5359a279c729769187") version("3.3.2", sha256="0ae7c38287598e8d7d238cf284ea8be1096dcf13f58a7e9e444a28a32c085b56") version("3.3.1", sha256="2e969d3146b559fb833e4cdfaefa72f303d8ad368ef325f68506003f7bc317b9") @@ -71,11 +77,16 @@ class Visit(CMakePackage): version("3.1.1", sha256="0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0") version("3.0.1", sha256="a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated + root_cmakelists_dir = "src" - generator("ninja") + generator("ninja", "make") + # Temporary fix for now due to issue installing with ninja generator + conflicts("generator=ninja", when="+python") variant("gui", default=True, description="Enable VisIt's GUI") - variant("osmesa", default=False, description="Use OSMesa for off-screen CPU rendering") variant("adios2", default=True, description="Enable ADIOS2 file format") variant("hdf5", default=True, description="Enable HDF5 file format") variant("netcdf", default=True, description="Enable NetCDF file format") @@ -91,7 +102,7 @@ class Visit(CMakePackage): patch("spack-changes-3.0.1.patch", when="@3.0.1") patch("nonframework-qwt.patch", when="^qt~framework platform=darwin") patch("parallel-hdf5.patch", when="@3.0.1:3.2.2+hdf5+mpi") - patch("parallel-hdf5-3.3.patch", when="@3.3.0:+hdf5+mpi") + patch("parallel-hdf5-3.3.patch", when="@3.3.0:3.3+hdf5+mpi") patch("cmake-findvtkh-3.3.patch", when="@3.3.0:3.3.2+vtkm") patch("cmake-findjpeg.patch", when="@3.1.0:3.2.2") patch("cmake-findjpeg-3.3.patch", when="@3.3.0") @@ -105,16 +116,22 @@ class Visit(CMakePackage): # Fix const-correctness in VTK interface patch("vtk-8.2-constcorrect.patch", when="@3.3.3 ^vtk@8.2.1a") - # Exactly one of 'gui' or 'osmesa' has to be enabled - conflicts("+gui", when="+osmesa") + # Add dectection for py-pip and enable python extensions with building with GUI + patch("19958-enable-python-and-check-pip.patch", when="@3.4:3.4.1 +python") - depends_on("cmake@3.14.7:", type="build") + conflicts( + "+gui", when="^[virtuals=gl] osmesa", msg="GUI cannot be activated with OSMesa front-end" + ) + depends_on("cmake@3.14.7:", type="build") + depends_on("cmake@3.24:", type="build", when="@3.4:") depends_on("mpi", when="+mpi") + conflicts("mpi", when="~mpi") # VTK flavors - depends_on("vtk@8.1:8 +opengl2") - depends_on("vtk +osmesa", when="+osmesa") + depends_on("vtk +opengl2") + depends_on("vtk@8.1:8", when="@:3.3") + depends_on("vtk@9.2.6", when="@3.4:") depends_on("vtk +qt", when="+gui") depends_on("vtk +python", when="+python") depends_on("vtk +mpi", when="+mpi") @@ -125,19 +142,22 @@ class Visit(CMakePackage): depends_on( "vtk", patches=[patch("vtk_rendering_opengl2_x11.patch")], - when="~osmesa platform=linux ^vtk@8", + when="platform=linux ^[virtuals=gl] glx ^vtk@8", ) depends_on("vtk", patches=[patch("vtk_wrapping_python_x11.patch")], when="+python ^vtk@8") depends_on("glu") + depends_on("gl") # VisIt doesn't work with later versions of qt. - depends_on("qt+gui+opengl@5:5.14", when="+gui") + depends_on("qt+gui+opengl", when="+gui") + depends_on("qt@5:5.14", when="+gui") depends_on("qwt+opengl", when="+gui") - # python@3.8 doesn't work with VisIt. + # python@3.8 doesn't work with older VisIt. depends_on("python@3.2:3.7,3.9:", when="@:3.2 +python") depends_on("python@3.2:", when="@3.3: +python") + depends_on("py-pip", when="+python") extends("python", when="+python") # VisIt uses the hdf5 1.8 api @@ -153,7 +173,8 @@ class Visit(CMakePackage): # VisIt uses Silo's 'ghost zone' data structures, which are only available # in v4.10+ releases: https://wci.llnl.gov/simulation/computer-codes/silo/releases/release-notes-4.10 - depends_on("silo@4.10: +shared", when="+silo") + # Silo versions < 4.11 do not build successfully with Spack + depends_on("silo@4.11: +shared", when="+silo") depends_on("silo+hdf5", when="+silo+hdf5") depends_on("silo~hdf5", when="+silo~hdf5") depends_on("silo+mpi", when="+silo+mpi") @@ -170,13 +191,16 @@ class Visit(CMakePackage): depends_on("mfem+shared+exceptions+fms+conduit", when="+mfem") depends_on("libfms@0.2:", when="+mfem") - depends_on("adios2@2.7.1", when="+adios2") - depends_on("adios2+hdf5", when="+adios2+hdf5") - depends_on("adios2~hdf5", when="+adios2~hdf5") - depends_on("adios2+mpi", when="+adios2+mpi") - depends_on("adios2~mpi", when="+adios2~mpi") - depends_on("adios2+python", when="+adios2+python") - depends_on("adios2~python", when="+adios2~python") + with when("+adios2"): + depends_on("adios2") + # adios 2.8 removed adios2_taustubs (https://github.com/visit-dav/visit/issues/19209) + # Fixed in 3.4.1 + depends_on("adios2@:2.7.1", when="@:3.4.0") + depends_on("adios2+hdf5", when="+hdf5") + depends_on("adios2~hdf5", when="~hdf5") + depends_on("adios2+mpi", when="+mpi") + depends_on("adios2~mpi", when="~mpi") + depends_on("adios2+python", when="+python") # For version 3.3.0 through 3.3.2, we used vtk-h to utilize vtk-m. # For version starting with 3.3.3 we use vtk-m directly. @@ -236,6 +260,12 @@ class Visit(CMakePackage): self.define("VISIT_CONFIG_SITE", "NONE"), ] + # TODO: Remove this hack when VTK 8.2.1a is removed + if spec["vtk"].satisfies("@8.2.1a"): + args.append(self.define("VISIT_VTK_VERSION", "8.2.1")) + else: + args.append(self.define("VISIT_VTK_VERSION", str(spec["vtk"].version))) + # Provide the plugin compilation environment so as to extend VisIt args.append(self.define_from_variant("VISIT_INSTALL_THIRD_PARTY", "plugins")) @@ -287,10 +317,11 @@ class Visit(CMakePackage): self.define("VISIT_OSMESA_DIR", "IGNORE"), self.define("OpenGL_GL_PREFERENCE", "LEGACY"), self.define("OPENGL_INCLUDE_DIR", spec["gl"].headers.directories[0]), + self.define("OPENGL_gl_LIBRARY", spec["gl"].libs[0]), self.define("OPENGL_glu_LIBRARY", spec["glu"].libs[0]), ] ) - if "+osmesa" in spec: + if spec.satisfies("^[virtuals=gl] osmesa"): args.extend( [ self.define("HAVE_OSMESA", True), @@ -298,8 +329,6 @@ class Visit(CMakePackage): self.define("OPENGL_gl_LIBRARY", spec["osmesa"].libs[0]), ] ) - else: - args.append(self.define("OPENGL_gl_LIBRARY", spec["gl"].libs[0])) if "+hdf5" in spec: args.append(self.define("HDF5_DIR", spec["hdf5"].prefix)) @@ -352,23 +381,23 @@ class Visit(CMakePackage): args.append(self.define("VISIT_VTKH_DIR", spec["vtk-h"].prefix)) if "@3.3.3: +vtkm" in spec: + lib_dirs = [spec["libx11"].prefix.lib] + if self.spec.satisfies("^vtkm+rocm"): + lib_dirs.append(spec["hip"].prefix.lib) args.append(self.define("VISIT_VTKM_DIR", spec["vtk-m"].prefix)) args.append( self.define( - "CMAKE_EXE_LINKER_FLAGS", - "-L%s/lib -L%s/lib" % (spec["hip"].prefix, spec["libx11"].prefix), + "CMAKE_EXE_LINKER_FLAGS", "".join("-L%s " % s for s in lib_dirs).strip() ) ) args.append( self.define( - "CMAKE_MODULE_LINKER_FLAGS", - "-L%s/lib -L%s/lib" % (spec["hip"].prefix, spec["libx11"].prefix), + "CMAKE_MODULE_LINKER_FLAGS", "".join("-L%s " % s for s in lib_dirs).strip() ) ) args.append( self.define( - "CMAKE_SHARED_LINKER_FLAGS", - "-L%s/lib -L%s/lib" % (spec["hip"].prefix, spec["libx11"].prefix), + "CMAKE_SHARED_LINKER_FLAGS", "".join("-L%s " % s for s in lib_dirs).strip() ) ) |