Skip to content

Commit

Permalink
add VTK-9.3.0-foss-2023b-b.eb VTK-9.3.0-intel-2023b.eb
Browse files Browse the repository at this point in the history
Unlike version 2023.11, SciPy-bundle-2023.12 works for both gfbg/2023b and iimkl/2023b
  • Loading branch information
Louwrensth committed Aug 17, 2024
1 parent 6ace482 commit 71a372f
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 0 deletions.
93 changes: 93 additions & 0 deletions easybuild/easyconfigs/v/VTK/VTK-9.3.0-foss-2023b-b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
##
# Authors::
# * Fotis Georgatos <[email protected]>
# * Robert Mijakovic <[email protected]>
##

easyblock = 'CMakeNinja'

name = 'VTK'
version = '9.3.0'
versionsuffix = '-b' # alternative version of SciPy-bundle dependency

homepage = 'https://www.vtk.org'
description = """The Visualization Toolkit (VTK) is an open-source, freely available software system for
3D computer graphics, image processing and visualization. VTK consists of a C++ class library and several
interpreted interface layers including Tcl/Tk, Java, and Python. VTK supports a wide variety of visualization
algorithms including: scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques
such as: implicit modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation."""

toolchain = {'name': 'foss', 'version': '2023b'}
toolchainopts = {'usempi': True}

source_urls = ['https://www.vtk.org/files/release/%(version_major_minor)s']
sources = [
SOURCE_TAR_GZ,
'%(name)sData-%(version)s.tar.gz',
]
patches = [('vtk-version.egg-info', '.')]
checksums = [
{'VTK-9.3.0.tar.gz': 'fdc7b9295225b34e4fdddc49cd06e66e94260cb00efee456e0f66568c9681be9'},
{'VTKData-9.3.0.tar.gz': 'f82142dd327e995c9536c1003e1370bb4092c96f23edb8119d16d2411ef35dc3'},
{'vtk-version.egg-info': '787b82415ae7a4a1f815b4db0e25f7abc809a05fc85d7d219627f3a7e5d3867b'},
]

builddependencies = [
('CMake', '3.27.6'),
('Ninja', '1.11.1'),
]

dependencies = [
('Python', '3.11.5'),
('SciPy-bundle', '2023.12'),
('XZ', '5.4.4'),
('libGLU', '9.0.3'),
('X11', '20231019'),
]

separate_build_dir = True

# OpenGL
configopts = "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT
configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT
configopts += "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include "
# Python
configopts += "-DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3 -DVTK_PYTHON_OPTIONAL_LINK=OFF "
configopts += "-DPython3_EXECUTABLE=$EBROOTPYTHON/bin/python3 "
configopts += "-DPython3_INCLUDE_DIR=$EBROOTPYTHON/include/python%(pyshortver)s "
configopts += "-DPython3_LIBRARY=$EBROOTPYTHON/lib/libpython%(pyshortver)s.so "
# Other
configopts += "-DVTK_USE_MPI=ON "
configopts += "-DCMAKE_INSTALL_LIBDIR=lib"

preinstallopts = "export PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages:$PYTHONPATH && "

# Install a egg-info file so VTK is more python friendly, required for mayavi
local_egg_info_src = '%(builddir)s/VTK-%(version)s/vtk-version.egg-info'
local_egg_info_dest = '%(installdir)s/lib/python%(pyshortver)s/site-packages/vtk-%(version)s.egg-info'
postinstallcmds = [
'sed "s/#VTK_VERSION#/%%(version)s/" %s > %s' % (local_egg_info_src, local_egg_info_dest),
]

modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']}

local_vtk_exec = ['vtk%s-%%(version_major_minor)s' % x
for x in ['WrapJava', 'ParseJava', 'WrapPythonInit', 'WrapPython', 'WrapHierarchy']]
local_vtk_exec += ['vtkpython']
local_vtk_libs = ['CommonCore', 'IONetCDF', 'ParallelCore', 'RenderingOpenGL2']

sanity_check_paths = {
'files': ['bin/%s' % x for x in local_vtk_exec] + ['include/vtk-%(version_major_minor)s/vtkMPI.h'] +
['lib/libvtk%s-%%(version_major_minor)s.%s' % (x, SHLIB_EXT) for x in local_vtk_libs],
'dirs': ['lib/python%(pyshortver)s/site-packages/', 'include/vtk-%(version_major_minor)s'],
}

sanity_check_commands = [
"python -c 'import %(namelower)s'",
"python -c 'import pkg_resources; pkg_resources.get_distribution(\"vtk\")'",
# make sure that VTK Python libraries link to libpython (controlled via DVTK_PYTHON_OPTIONAL_LINK=OFF),
# see https://gitlab.kitware.com/vtk/vtk/-/issues/17881
"ldd $EBROOTVTK/lib/libvtkPythonContext2D-%%(version_major_minor)s.%s | grep /libpython" % SHLIB_EXT,
]

moduleclass = 'vis'
92 changes: 92 additions & 0 deletions easybuild/easyconfigs/v/VTK/VTK-9.3.0-intel-2023b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
##
# Authors::
# * Fotis Georgatos <[email protected]>
# * Robert Mijakovic <[email protected]>
##

easyblock = 'CMakeNinja'

name = 'VTK'
version = '9.3.0'

homepage = 'https://www.vtk.org'
description = """The Visualization Toolkit (VTK) is an open-source, freely available software system for
3D computer graphics, image processing and visualization. VTK consists of a C++ class library and several
interpreted interface layers including Tcl/Tk, Java, and Python. VTK supports a wide variety of visualization
algorithms including: scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques
such as: implicit modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation."""

toolchain = {'name': 'intel', 'version': '2023b'}
toolchainopts = {'usempi': True}

source_urls = ['https://www.vtk.org/files/release/%(version_major_minor)s']
sources = [
SOURCE_TAR_GZ,
'%(name)sData-%(version)s.tar.gz',
]
patches = [('vtk-version.egg-info', '.')]
checksums = [
{'VTK-9.3.0.tar.gz': 'fdc7b9295225b34e4fdddc49cd06e66e94260cb00efee456e0f66568c9681be9'},
{'VTKData-9.3.0.tar.gz': 'f82142dd327e995c9536c1003e1370bb4092c96f23edb8119d16d2411ef35dc3'},
{'vtk-version.egg-info': '787b82415ae7a4a1f815b4db0e25f7abc809a05fc85d7d219627f3a7e5d3867b'},
]

builddependencies = [
('CMake', '3.27.6'),
('Ninja', '1.11.1'),
]

dependencies = [
('Python', '3.11.5'),
('SciPy-bundle', '2023.12'),
('XZ', '5.4.4'),
('libGLU', '9.0.3'),
('X11', '20231019'),
]

separate_build_dir = True

# OpenGL
configopts = "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT
configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT
configopts += "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include "
# Python
configopts += "-DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3 -DVTK_PYTHON_OPTIONAL_LINK=OFF "
configopts += "-DPython3_EXECUTABLE=$EBROOTPYTHON/bin/python3 "
configopts += "-DPython3_INCLUDE_DIR=$EBROOTPYTHON/include/python%(pyshortver)s "
configopts += "-DPython3_LIBRARY=$EBROOTPYTHON/lib/libpython%(pyshortver)s.so "
# Other
configopts += "-DVTK_USE_MPI=ON "
configopts += "-DCMAKE_INSTALL_LIBDIR=lib"

preinstallopts = "export PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages:$PYTHONPATH && "

# Install a egg-info file so VTK is more python friendly, required for mayavi
local_egg_info_src = '%(builddir)s/VTK-%(version)s/vtk-version.egg-info'
local_egg_info_dest = '%(installdir)s/lib/python%(pyshortver)s/site-packages/vtk-%(version)s.egg-info'
postinstallcmds = [
'sed "s/#VTK_VERSION#/%%(version)s/" %s > %s' % (local_egg_info_src, local_egg_info_dest),
]

modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']}

local_vtk_exec = ['vtk%s-%%(version_major_minor)s' % x
for x in ['WrapJava', 'ParseJava', 'WrapPythonInit', 'WrapPython', 'WrapHierarchy']]
local_vtk_exec += ['vtkpython']
local_vtk_libs = ['CommonCore', 'IONetCDF', 'ParallelCore', 'RenderingOpenGL2']

sanity_check_paths = {
'files': ['bin/%s' % x for x in local_vtk_exec] + ['include/vtk-%(version_major_minor)s/vtkMPI.h'] +
['lib/libvtk%s-%%(version_major_minor)s.%s' % (l, SHLIB_EXT) for l in local_vtk_libs],
'dirs': ['lib/python%(pyshortver)s/site-packages/', 'include/vtk-%(version_major_minor)s'],
}

sanity_check_commands = [
"python -c 'import %(namelower)s'",
"python -c 'import pkg_resources; pkg_resources.get_distribution(\"vtk\")'",
# make sure that VTK Python libraries link to libpython (controlled via DVTK_PYTHON_OPTIONAL_LINK=OFF),
# see https://gitlab.kitware.com/vtk/vtk/-/issues/17881
"ldd $EBROOTVTK/lib/libvtkPythonContext2D-%%(version_major_minor)s.%s | grep /libpython" % SHLIB_EXT,
]

moduleclass = 'vis'

0 comments on commit 71a372f

Please sign in to comment.