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.
This commit is contained in:
parent
57d3b02800
commit
4cf71b2c7f
4 changed files with 84 additions and 15 deletions
|
@ -56,7 +56,7 @@ class Visit(CMakePackage):
|
||||||
############################
|
############################
|
||||||
homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/"
|
homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/"
|
||||||
git = "https://github.com/visit-dav/visit.git"
|
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']
|
tags = ['radiuss']
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ class Visit(CMakePackage):
|
||||||
executables = ['^visit$']
|
executables = ['^visit$']
|
||||||
|
|
||||||
version('develop', branch='develop')
|
version('develop', branch='develop')
|
||||||
|
version('3.2.1', sha256='779d59564c63f31fcbfeff24b14ddd6ac941b3bb7d671d31765a770d193f02e8')
|
||||||
version('3.1.1', sha256='0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0')
|
version('3.1.1', sha256='0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0')
|
||||||
version('3.0.1', sha256='a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd')
|
version('3.0.1', sha256='a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd')
|
||||||
version('2.13.3', sha256='cf0b3d2e39e1cd102dd886d3ef6da892733445e362fc28f24d9682012cccf2e5')
|
version('2.13.3', sha256='cf0b3d2e39e1cd102dd886d3ef6da892733445e362fc28f24d9682012cccf2e5')
|
||||||
|
@ -82,7 +83,7 @@ class Visit(CMakePackage):
|
||||||
variant('hdf5', default=True, description='Enable HDF5 file format')
|
variant('hdf5', default=True, description='Enable HDF5 file format')
|
||||||
variant('silo', default=True, description='Enable Silo file format')
|
variant('silo', default=True, description='Enable Silo file format')
|
||||||
variant('python', default=True, description='Enable Python support')
|
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.1.patch', when="@3.1.0:,develop")
|
||||||
patch('spack-changes-3.0.1.patch', when="@3.0.1")
|
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
|
# https://github.com/visit-dav/visit/issues/3498
|
||||||
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
|
||||||
depends_on('vtk@8.1.0:8.1+opengl2+python', when='+python @3.0:3,develop')
|
# 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('glu', when='platform=linux')
|
||||||
depends_on('vtk@6.1.0~opengl2', when='@:2')
|
depends_on('vtk+python', when='+python @3.2:,develop')
|
||||||
depends_on('vtk+python', when='+python @3.0:,develop')
|
|
||||||
depends_on('vtk~mpi', when='~mpi')
|
depends_on('vtk~mpi', when='~mpi')
|
||||||
depends_on('vtk+qt', when='+gui')
|
depends_on('vtk+qt', when='+gui')
|
||||||
depends_on('qt+gui@4.8.6:4', when='+gui @:2')
|
# VisIt doesn't work with later versions of qt.
|
||||||
depends_on('qt+gui@5.10:', when='+gui @3.0:,develop')
|
depends_on('qt+gui@5.14.2:', when='+gui @3.2:,develop')
|
||||||
depends_on('qwt', when='+gui')
|
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
|
# 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
|
# 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')
|
depends_on('silo@4.10:+shared', when='+silo')
|
||||||
|
@ -200,13 +228,9 @@ class Visit(CMakePackage):
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
depends_on('adios2', when='+adios2')
|
depends_on('adios2', when='+adios2')
|
||||||
|
|
||||||
conflicts('+adios2', when='@:2')
|
|
||||||
conflicts('+hdf5', when='~gui @:2')
|
|
||||||
conflicts('+silo', when='~gui @:2')
|
|
||||||
|
|
||||||
root_cmakelists_dir = 'src'
|
root_cmakelists_dir = 'src'
|
||||||
|
|
||||||
@when('@3.0.0:3,develop')
|
@when('@3.0.0:,develop')
|
||||||
def patch(self):
|
def patch(self):
|
||||||
# Some of VTK's targets don't create explicit libraries, so there is no
|
# Some of VTK's targets don't create explicit libraries, so there is no
|
||||||
# 'vtktiff'. Instead, replace with the library variable defined from
|
# 'vtktiff'. Instead, replace with the library variable defined from
|
||||||
|
@ -235,6 +259,7 @@ def cmake_args(self):
|
||||||
'-DVISIT_USE_GLEW=OFF',
|
'-DVISIT_USE_GLEW=OFF',
|
||||||
'-DCMAKE_CXX_FLAGS=' + ' '.join(cxx_flags),
|
'-DCMAKE_CXX_FLAGS=' + ' '.join(cxx_flags),
|
||||||
'-DCMAKE_C_FLAGS=' + ' '.join(cc_flags),
|
'-DCMAKE_C_FLAGS=' + ' '.join(cc_flags),
|
||||||
|
'-DVISIT_CONFIG_SITE=NONE',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Provide the plugin compilation environment so as to extend VisIt
|
# Provide the plugin compilation environment so as to extend VisIt
|
||||||
|
@ -266,6 +291,12 @@ def cmake_args(self):
|
||||||
args.append('-DVISIT_SERVER_COMPONENTS_ONLY=ON')
|
args.append('-DVISIT_SERVER_COMPONENTS_ONLY=ON')
|
||||||
args.append('-DVISIT_ENGINE_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:
|
if '+hdf5' in spec:
|
||||||
args.append(
|
args.append(
|
||||||
'-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix))
|
'-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix))
|
||||||
|
|
|
@ -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:
|
|
@ -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
|
|
@ -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})
|
Loading…
Reference in a new issue