summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorEric Brugger <brugger1@llnl.gov>2021-11-19 00:05:13 -0800
committerGitHub <noreply@github.com>2021-11-19 09:05:13 +0100
commit4cf71b2c7f56061c91ff4077e8d1742c66120d8d (patch)
tree1f3293237d5e098520559638599bafdbebd415cd /var
parent57d3b0280039228061c56c5505307b109d234a9d (diff)
downloadspack-4cf71b2c7f56061c91ff4077e8d1742c66120d8d.tar.gz
spack-4cf71b2c7f56061c91ff4077e8d1742c66120d8d.tar.bz2
spack-4cf71b2c7f56061c91ff4077e8d1742c66120d8d.tar.xz
spack-4cf71b2c7f56061c91ff4077e8d1742c66120d8d.zip
VisIt: update for building with 3.2.1. (#27036)
Include several several patches to vtk 8.1 for building on a system with no system install X11 libraries or include files. Specify specific versions of dependent packages that are known to work with 3.2.1. Tested on spock.olcf.ornl.gov. The GUI came up and rendered images and an image was successfully saved using off screen rendering from data from curv2d.silo.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/visit/package.py61
-rw-r--r--var/spack/repos/builtin/packages/visit/vtk_compiler_visibility.patch12
-rw-r--r--var/spack/repos/builtin/packages/visit/vtk_rendering_opengl2_x11.patch12
-rw-r--r--var/spack/repos/builtin/packages/visit/vtk_wrapping_python_x11.patch14
4 files changed, 84 insertions, 15 deletions
diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py
index 68276b9831..e4974f4870 100644
--- a/var/spack/repos/builtin/packages/visit/package.py
+++ b/var/spack/repos/builtin/packages/visit/package.py
@@ -56,7 +56,7 @@ class Visit(CMakePackage):
############################
homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/"
git = "https://github.com/visit-dav/visit.git"
- url = "https://github.com/visit-dav/visit/releases/download/v3.1.1/visit3.1.1.tar.gz"
+ url = "https://github.com/visit-dav/visit/releases/download/v3.2.1/visit3.2.1.tar.gz"
tags = ['radiuss']
@@ -67,6 +67,7 @@ class Visit(CMakePackage):
executables = ['^visit$']
version('develop', branch='develop')
+ version('3.2.1', sha256='779d59564c63f31fcbfeff24b14ddd6ac941b3bb7d671d31765a770d193f02e8')
version('3.1.1', sha256='0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0')
version('3.0.1', sha256='a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd')
version('2.13.3', sha256='cf0b3d2e39e1cd102dd886d3ef6da892733445e362fc28f24d9682012cccf2e5')
@@ -82,7 +83,7 @@ class Visit(CMakePackage):
variant('hdf5', default=True, description='Enable HDF5 file format')
variant('silo', default=True, description='Enable Silo file format')
variant('python', default=True, description='Enable Python support')
- variant('mpi', default=True, description='Enable parallel engine')
+ variant('mpi', default=False, description='Enable parallel engine')
patch('spack-changes-3.1.patch', when="@3.1.0:,develop")
patch('spack-changes-3.0.1.patch', when="@3.0.1")
@@ -177,19 +178,46 @@ class Visit(CMakePackage):
#
# =====================================
- depends_on('cmake@3.0:', type='build')
+ depends_on('cmake@3.14.7', type='build')
# https://github.com/visit-dav/visit/issues/3498
- depends_on('vtk@8.1.0:8.1+opengl2~python', when='~python @3.0:3,develop')
- depends_on('vtk@8.1.0:8.1+opengl2+python', when='+python @3.0:3,develop')
+ # The vtk_compiler_visibility patch fixes a bug where
+ # VTKGenerateExportHeader.cmake fails to recognize gcc versions 10.0
+ # or greater.
+ # The vtk_rendering_opengl2_x11 patch adds include directories to
+ # Rendering/OpenGL2/CMakeLists.txt for systems that don't have the
+ # system X libraries and include files installed.
+ # The vtk_wrapping_python_x11 patch adds include directories to
+ # Wrapping/Python/CMakelists.txt for systems that don't have the
+ # system X libraries and include files installed.
+ depends_on('vtk@8.1.0+opengl2+osmesa~python',
+ patches=[patch('vtk_compiler_visibility.patch'),
+ patch('vtk_rendering_opengl2_x11.patch'),
+ patch('vtk_wrapping_python_x11.patch'),
+ ],
+ when='~python @3.2:,develop')
+ depends_on('vtk@8.1.0+opengl2+osmesa+python',
+ patches=[patch('vtk_compiler_visibility.patch'),
+ patch('vtk_rendering_opengl2_x11.patch'),
+ patch('vtk_wrapping_python_x11.patch'),
+ ],
+ when='+python @3.2:,develop')
depends_on('glu', when='platform=linux')
- depends_on('vtk@6.1.0~opengl2', when='@:2')
- depends_on('vtk+python', when='+python @3.0:,develop')
+ depends_on('vtk+python', when='+python @3.2:,develop')
depends_on('vtk~mpi', when='~mpi')
depends_on('vtk+qt', when='+gui')
- depends_on('qt+gui@4.8.6:4', when='+gui @:2')
- depends_on('qt+gui@5.10:', when='+gui @3.0:,develop')
+ # VisIt doesn't work with later versions of qt.
+ depends_on('qt+gui@5.14.2:', when='+gui @3.2:,develop')
depends_on('qwt', when='+gui')
- depends_on('python@2.6:2.8', when='+python')
+ # python@3.8 doesn't work with VisIt.
+ depends_on('python@3.7', when='+python')
+ # llvm@12.0.1, @11.1.0, @10.0.1 fail in build phase with gcc 6.1.0.
+ # llvm@9.0.1 fails in cmake phase with gcc 6.1.0.
+ depends_on('llvm@6:8', when='^mesa')
+ depends_on('mesa+glx', when='^mesa')
+ depends_on('mesa-glu', when='^mesa')
+ # VisIt doesn't build with hdf5@1.12 and hdf5@1.10 produces files that
+ # are incompatible with hdf5@1.8.
+ depends_on('hdf5@1.8', when='+hdf5')
# 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')
@@ -200,13 +228,9 @@ class Visit(CMakePackage):
depends_on('mpi', when='+mpi')
depends_on('adios2', when='+adios2')
- conflicts('+adios2', when='@:2')
- conflicts('+hdf5', when='~gui @:2')
- conflicts('+silo', when='~gui @:2')
-
root_cmakelists_dir = 'src'
- @when('@3.0.0:3,develop')
+ @when('@3.0.0:,develop')
def patch(self):
# Some of VTK's targets don't create explicit libraries, so there is no
# 'vtktiff'. Instead, replace with the library variable defined from
@@ -235,6 +259,7 @@ class Visit(CMakePackage):
'-DVISIT_USE_GLEW=OFF',
'-DCMAKE_CXX_FLAGS=' + ' '.join(cxx_flags),
'-DCMAKE_C_FLAGS=' + ' '.join(cc_flags),
+ '-DVISIT_CONFIG_SITE=NONE',
]
# Provide the plugin compilation environment so as to extend VisIt
@@ -266,6 +291,12 @@ class Visit(CMakePackage):
args.append('-DVISIT_SERVER_COMPONENTS_ONLY=ON')
args.append('-DVISIT_ENGINE_ONLY=ON')
+ if '^mesa' in spec:
+ args.append(
+ '-DVISIT_LLVM_DIR:PATH={0}'.format(spec['llvm'].prefix))
+ args.append(
+ '-DVISIT_MESAGL_DIR:PATH={0}'.format(spec['mesa'].prefix))
+
if '+hdf5' in spec:
args.append(
'-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix))
diff --git a/var/spack/repos/builtin/packages/visit/vtk_compiler_visibility.patch b/var/spack/repos/builtin/packages/visit/vtk_compiler_visibility.patch
new file mode 100644
index 0000000000..51c153440e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/visit/vtk_compiler_visibility.patch
@@ -0,0 +1,12 @@
+diff -u ./CMake/VTKGenerateExportHeader.cmake.orig ./CMake/VTKGenerateExportHeader.cmake
+--- ./CMake/VTKGenerateExportHeader.cmake.orig 2021-11-03 14:32:17.607243000 -0700
++++ ./CMake/VTKGenerateExportHeader.cmake 2021-11-03 14:35:54.896214000 -0700
+@@ -174,7 +174,7 @@
+ execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+ OUTPUT_VARIABLE _gcc_version_info
+ ERROR_VARIABLE _gcc_version_info)
+- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
++ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]*"
+ _gcc_version "${_gcc_version_info}")
+ # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+ # patch level, handle this here:
diff --git a/var/spack/repos/builtin/packages/visit/vtk_rendering_opengl2_x11.patch b/var/spack/repos/builtin/packages/visit/vtk_rendering_opengl2_x11.patch
new file mode 100644
index 0000000000..dd5b2db86d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/visit/vtk_rendering_opengl2_x11.patch
@@ -0,0 +1,12 @@
+diff -u ./Rendering/OpenGL2/CMakeLists.txt.orig ./Rendering/OpenGL2/CMakeLists.txt
+--- ./Rendering/OpenGL2/CMakeLists.txt.orig 2021-11-03 14:33:11.582334000 -0700
++++ ./Rendering/OpenGL2/CMakeLists.txt 2021-11-03 14:36:50.263234000 -0700
+@@ -194,7 +194,7 @@
+ if(NOT X11_Xt_FOUND)
+ message(FATAL_ERROR "X11_Xt_LIB could not be found. Required for VTK X lib.")
+ endif()
+- include_directories(${X11_INCLUDE_DIR} ${X11_Xt_INCLUDE_PATH})
++ include_directories(${X11_INCLUDE_DIR} ${X11_SM_INCLUDE_PATH} ${X11_ICE_INCLUDE_PATH} ${X11_Xt_INCLUDE_PATH})
+ endif()
+
+ # setup factory overrides
diff --git a/var/spack/repos/builtin/packages/visit/vtk_wrapping_python_x11.patch b/var/spack/repos/builtin/packages/visit/vtk_wrapping_python_x11.patch
new file mode 100644
index 0000000000..93ca157281
--- /dev/null
+++ b/var/spack/repos/builtin/packages/visit/vtk_wrapping_python_x11.patch
@@ -0,0 +1,14 @@
+diff -u ./Wrapping/Python/CMakeLists.txt.orig ./Wrapping/Python/CMakeLists.txt
+--- ./Wrapping/Python/CMakeLists.txt.orig 2021-11-03 14:33:41.413950000 -0700
++++ ./Wrapping/Python/CMakeLists.txt 2021-11-03 14:37:03.634738000 -0700
+@@ -23,6 +23,10 @@
+
+ get_property(VTK_PYTHON_MODULES GLOBAL PROPERTY VTK_PYTHON_WRAPPED)
+
++include_directories(${X11_Xlib_INCLUDE_PATH})
++include_directories(${X11_X11_INCLUDE_PATH})
++include_directories(${X11_Xt_INCLUDE_PATH})
++
+ # Get the include directories for the module and all its dependencies.
+ macro(vtk_include_recurse module)
+ _vtk_module_config_recurse("${module}_PYTHON" ${module})