Add build editions for catalyst builds. (#22676)
* Add build editions for catalyst builds. * Fix style. * Build edition works only for 5.8:
This commit is contained in:
parent
f1afd5ff27
commit
f1fb816d93
2 changed files with 36 additions and 12 deletions
|
@ -13,9 +13,12 @@
|
||||||
|
|
||||||
|
|
||||||
class Catalyst(CMakePackage):
|
class Catalyst(CMakePackage):
|
||||||
"""Catalyst is an in situ use case library, with an adaptable application
|
"""Catalyst is an in situ library, with an adaptable application
|
||||||
programming interface (API), that orchestrates the alliance between
|
programming interface (API), that orchestrates the alliance
|
||||||
simulation and analysis and/or visualization tasks."""
|
between simulation and analysis and/or visualization tasks. For
|
||||||
|
versions 5.7 and greater use the paraview package.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
homepage = 'http://www.paraview.org'
|
homepage = 'http://www.paraview.org'
|
||||||
url = "https://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz"
|
url = "https://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz"
|
||||||
|
@ -60,11 +63,15 @@ class Catalyst(CMakePackage):
|
||||||
# extends('python', when='+python')
|
# extends('python', when='+python')
|
||||||
extends('python', when='+python')
|
extends('python', when='+python')
|
||||||
extends('python', when='+python3')
|
extends('python', when='+python3')
|
||||||
|
# VTK < 8.2.1 can't handle Python 3.8
|
||||||
|
# This affects Paraview <= 5.7 (VTK 8.2.0)
|
||||||
|
# https://gitlab.kitware.com/vtk/vtk/-/issues/17670
|
||||||
|
depends_on('python@3:3.7', when='@:5.7 +python3', type=('build', 'run'))
|
||||||
|
depends_on('python@3:', when='@5.8:+python3', type=('build', 'run'))
|
||||||
|
depends_on('python@2.7:2.8', when='+python', type=('build', 'link', 'run'))
|
||||||
|
|
||||||
depends_on('git', type='build')
|
depends_on('git', type='build')
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
depends_on('python@2.7:2.8', when='+python', type=('build', 'link', 'run'))
|
|
||||||
depends_on('python@3:', when='+python3', type=('build', 'link', 'run'))
|
|
||||||
|
|
||||||
depends_on('py-numpy', when='+python', type=('build', 'run'))
|
depends_on('py-numpy', when='+python', type=('build', 'run'))
|
||||||
depends_on('py-numpy', when='+python3', type=('build', 'run'))
|
depends_on('py-numpy', when='+python3', type=('build', 'run'))
|
||||||
|
@ -137,9 +144,9 @@ def do_stage(self, mirror_only=False):
|
||||||
catalyst_source_dir = os.path.abspath(self.root_cmakelists_dir)
|
catalyst_source_dir = os.path.abspath(self.root_cmakelists_dir)
|
||||||
|
|
||||||
python_path = (os.path.realpath(
|
python_path = (os.path.realpath(
|
||||||
spec['python3'].command.path if '+python3' in self.spec else
|
self.spec['python'].command.path
|
||||||
spec['python'].command.path if '+python' in self.spec else
|
if ('+python3' in self.spec or '+python' in self.spec)
|
||||||
sys.executable))
|
else sys.executable))
|
||||||
|
|
||||||
command = [python_path, catalyst_script,
|
command = [python_path, catalyst_script,
|
||||||
'-r', self.stage.source_path,
|
'-r', self.stage.source_path,
|
||||||
|
|
|
@ -11,7 +11,11 @@
|
||||||
|
|
||||||
class Paraview(CMakePackage, CudaPackage):
|
class Paraview(CMakePackage, CudaPackage):
|
||||||
"""ParaView is an open-source, multi-platform data analysis and
|
"""ParaView is an open-source, multi-platform data analysis and
|
||||||
visualization application."""
|
visualization application. This package includes the Catalyst
|
||||||
|
in-situ library for versions 5.7 and greater, othewise use the
|
||||||
|
catalyst package.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
homepage = 'https://www.paraview.org'
|
homepage = 'https://www.paraview.org'
|
||||||
url = "https://www.paraview.org/files/v5.7/ParaView-v5.7.0.tar.xz"
|
url = "https://www.paraview.org/files/v5.7/ParaView-v5.7.0.tar.xz"
|
||||||
|
@ -42,8 +46,8 @@ class Paraview(CMakePackage, CudaPackage):
|
||||||
version('5.0.1', sha256='caddec83ec284162a2cbc46877b0e5a9d2cca59fb4ab0ea35b0948d2492950bb')
|
version('5.0.1', sha256='caddec83ec284162a2cbc46877b0e5a9d2cca59fb4ab0ea35b0948d2492950bb')
|
||||||
version('4.4.0', sha256='c2dc334a89df24ce5233b81b74740fc9f10bc181cd604109fd13f6ad2381fc73')
|
version('4.4.0', sha256='c2dc334a89df24ce5233b81b74740fc9f10bc181cd604109fd13f6ad2381fc73')
|
||||||
|
|
||||||
variant('plugins', default=True,
|
variant('development_files', default=True,
|
||||||
description='Install include files for plugins support')
|
description='Install include files for Catalyst or plugins support')
|
||||||
variant('python', default=False, description='Enable Python support')
|
variant('python', default=False, description='Enable Python support')
|
||||||
variant('python3', default=False, description='Enable Python3 support')
|
variant('python3', default=False, description='Enable Python3 support')
|
||||||
variant('mpi', default=True, description='Enable MPI support')
|
variant('mpi', default=True, description='Enable MPI support')
|
||||||
|
@ -59,6 +63,11 @@ class Paraview(CMakePackage, CudaPackage):
|
||||||
variant('adios2', default=False, description='Enable ADIOS2 support')
|
variant('adios2', default=False, description='Enable ADIOS2 support')
|
||||||
|
|
||||||
variant('advanced_debug', default=False, description="Enable all other debug flags beside build_type, such as VTK_DEBUG_LEAK")
|
variant('advanced_debug', default=False, description="Enable all other debug flags beside build_type, such as VTK_DEBUG_LEAK")
|
||||||
|
variant('build_edition', default='canonical', multi=False,
|
||||||
|
values=('canonical', 'catalyst_rendering',
|
||||||
|
'catalyst', 'rendering', 'core'),
|
||||||
|
description='Build editions include only certain modules. '
|
||||||
|
'Editions are listed in decreasing order of size.')
|
||||||
|
|
||||||
conflicts('+python', when='+python3')
|
conflicts('+python', when='+python3')
|
||||||
# Python 2 support dropped with 5.9.0
|
# Python 2 support dropped with 5.9.0
|
||||||
|
@ -68,6 +77,11 @@ class Paraview(CMakePackage, CudaPackage):
|
||||||
# Legacy rendering dropped in 5.5
|
# Legacy rendering dropped in 5.5
|
||||||
# See commit: https://gitlab.kitware.com/paraview/paraview/-/commit/798d328c
|
# See commit: https://gitlab.kitware.com/paraview/paraview/-/commit/798d328c
|
||||||
conflicts('~opengl2', when='@5.5:')
|
conflicts('~opengl2', when='@5.5:')
|
||||||
|
# in 5.7 you cannot reduce the size of the code for Catalyst builds.
|
||||||
|
conflicts('build_edition=catalyst_rendering', when='@:5.7')
|
||||||
|
conflicts('build_edition=catalyst', when='@:5.7')
|
||||||
|
conflicts('build_edition=rendering', when='@:5.7')
|
||||||
|
conflicts('build_edition=core', when='@:5.7')
|
||||||
|
|
||||||
# We only support one single Architecture
|
# We only support one single Architecture
|
||||||
for _arch, _other_arch in itertools.permutations(CudaPackage.cuda_arch_values, 2):
|
for _arch, _other_arch in itertools.permutations(CudaPackage.cuda_arch_values, 2):
|
||||||
|
@ -280,7 +294,7 @@ def nvariant_bool(feature):
|
||||||
return variant_bool(feature, on='OFF', off='ON')
|
return variant_bool(feature, on='OFF', off='ON')
|
||||||
|
|
||||||
rendering = variant_bool('+opengl2', 'OpenGL2', 'OpenGL')
|
rendering = variant_bool('+opengl2', 'OpenGL2', 'OpenGL')
|
||||||
includes = variant_bool('+plugins')
|
includes = variant_bool('+development_files')
|
||||||
|
|
||||||
cmake_args = [
|
cmake_args = [
|
||||||
'-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % variant_bool('+osmesa'),
|
'-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % variant_bool('+osmesa'),
|
||||||
|
@ -303,12 +317,15 @@ def nvariant_bool(feature):
|
||||||
if spec.satisfies('@5.7:'):
|
if spec.satisfies('@5.7:'):
|
||||||
if spec.satisfies('@5.8:'):
|
if spec.satisfies('@5.8:'):
|
||||||
cmake_args.extend([
|
cmake_args.extend([
|
||||||
|
'-DPARAVIEW_BUILD_EDITION:STRING=%s' %
|
||||||
|
spec.variants['build_edition'].value,
|
||||||
'-DPARAVIEW_USE_QT:BOOL=%s' % variant_bool('+qt'),
|
'-DPARAVIEW_USE_QT:BOOL=%s' % variant_bool('+qt'),
|
||||||
'-DPARAVIEW_BUILD_WITH_EXTERNAL=ON'])
|
'-DPARAVIEW_BUILD_WITH_EXTERNAL=ON'])
|
||||||
if spec.satisfies('%cce'):
|
if spec.satisfies('%cce'):
|
||||||
cmake_args.append('-DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF')
|
cmake_args.append('-DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF')
|
||||||
else: # @5.7:
|
else: # @5.7:
|
||||||
cmake_args.extend([
|
cmake_args.extend([
|
||||||
|
'-DPARAVIEW_ENABLE_CATALYST:BOOL=ON',
|
||||||
'-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % variant_bool('+qt'),
|
'-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % variant_bool('+qt'),
|
||||||
'-DPARAVIEW_USE_EXTERNAL:BOOL=ON'])
|
'-DPARAVIEW_USE_EXTERNAL:BOOL=ON'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue