Skip to content
Draft
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 87 additions & 37 deletions checks/apps/paraview/paraview.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# Copyright Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
Expand All @@ -8,7 +8,7 @@


@rfm.simple_test
class ParaView_coloredSphere(rfm.RunOnlyRegressionTest):
class paraview_colored_sphere(rfm.RunOnlyRegressionTest):
"""
daint:
ParaView Version (5, 13, 2)
Expand All @@ -26,14 +26,15 @@ class ParaView_coloredSphere(rfm.RunOnlyRegressionTest):
Renderer: softpipe
writing coloredSphere_v5.13.2.OSMESA.png
"""
valid_systems = ['+uenv']
valid_prog_environs = ['+paraview-python']
descr = 'ParaView pvbatch coloredSphere.py test'
valid_systems = ['+uenv +nvgpu', '+uenv -nvgpu -amdgpu']
valid_prog_environs = ['+uenv +paraview-python']
num_tasks = 12
num_tasks_per_node = 6
time_limit = '3m'
executable = '/user-environment/ParaView-5.13/bin/pvbatch'
executable = 'pvbatch'
executable_opts = ['-- coloredSphere.py']
maintainers = ['jfavre', 'biddisco', 'SSA']
maintainers = ['jfavre', 'biddisco', 'albestro', 'SSA']
tags = {'production'}

@run_before('run')
Expand All @@ -58,11 +59,11 @@ def assert_vendor_renderer(self):


@rfm.simple_test
class ParaView_catalystClipping(rfm.RegressionTest):
valid_systems = ['+uenv +remote']
valid_prog_environs = ['+paraview-python']
git_tag = variable(str, value='0.1')
sourcesdir = None
class paraview_catalyst_clipping(rfm.RegressionTest):
descr = 'ParaView Catalyst DummySPH test'
valid_systems = ['+uenv +nvgpu', '+uenv -nvgpu -amdgpu']
valid_prog_environs = ['+uenv +paraview-python']
sourcesdir = 'https://github.com/jfavre/DummySPH.git'
build_system = 'CMake'
build_locally = False
num_tasks = 1
Expand All @@ -72,47 +73,96 @@ class ParaView_catalystClipping(rfm.RegressionTest):
env_vars = {
'CATALYST_IMPLEMENTATION_NAME': 'paraview',
'CATALYST_IMPLEMENTATION_PATHS':
'/user-environment/ParaView-5.13/lib64/catalyst',
'CATALYST_DATA_DUMP_DIRECTORY': '$PWD/dataset',
'/user-environment/paraview/lib64/catalyst',
'CATALYST_DATA_DUMP_DIRECTORY': 'dataset',
'VTK_SILENCE_GET_VOID_POINTER_WARNINGS': '1'
}
maintainers = ['jfavre', 'biddisco', 'SSA']
maintainers = ['jfavre', 'biddisco', 'albestro', 'SSA']
tags = {'production'}

@run_before('compile')
def prepare_build(self):
tgz = f'v{self.git_tag}.tar.gz'
self.prebuild_cmds = [
f'# tested with paraview/5.13.2:v2 -v paraview-python',
f'wget -q https://github.com/jfavre/DummySPH/archive/refs/tags/'
f'{tgz} && tar xf {tgz} && rm -f {tgz}',
self.build_system.config_opts = ['-S src', '-DINSITU=Catalyst']

@run_before('run')
def prepare_job(self):
self.executable_opts = [
f'--catalyst',
f'ParaView_scripts/catalyst_clipping.py'
]
# on eiger, mpicxx/mpicc are broken (g++: No such file)
self.build_system.cc = 'gcc'
self.build_system.cxx = 'g++'
self.build_system.config_opts = [
f'-S DummySPH-{self.git_tag}/src',
'-DINSITU=Catalyst'
self.prerun_cmds = ['']
self.postrun_cmds = [
'',
'head -1 datasets/dataset_000001.vtpd',
'head -1 head datasets/dataset_000001/dataset_000001_0.vtp',
'file datasets/RenderView1_000001.png'
]

@sanity_function
def assert_runtime(self):
regex_1 = r'VTKFile type=\"vtkPartitionedDataSet\"'
regex_2 = r'VTKFile type=\"PolyData\"'
regex_3 = r'PNG image data,' # 1024 x 1024, 8-bit/color RGB

return sn.all([
sn.assert_found(regex_1, self.stdout),
sn.assert_found(regex_2, self.stdout),
sn.assert_found(regex_3, self.stdout),
])


@rfm.simple_test
class paraview_catalyst_double_gyre(rfm.RegressionTest):
descr = 'ParaView Catalyst Double Gyre test'
valid_systems = ['+uenv +nvgpu', '+uenv -nvgpu -amdgpu']
valid_prog_environs = ['+uenv +paraview-python']
sourcesdir = 'https://github.com/jfavre/InSitu-Vis-Tutorial.git'
build_system = 'CMake'
build_locally = False
num_tasks = 1
num_tasks_per_node = 1
time_limit = '3m'
executable = 'bin/double_gyre_catalyst'
env_vars = {
'CATALYST_IMPLEMENTATION_NAME': 'paraview',
'CATALYST_IMPLEMENTATION_PATHS':
'/user-environment/paraview/lib64/catalyst',
'CATALYST_DATA_DUMP_DIRECTORY': 'dataset',
'VTK_SILENCE_GET_VOID_POINTER_WARNINGS': '1'
}
maintainers = ['jfavre', 'biddisco', 'albestro', 'SSA']
tags = {'production'}

@run_before('compile')
def prepare_build(self):
# on eiger, mpicxx/mpicc were broken (g++: No such file),
# keeping for reference:
# self.build_system.cc = 'gcc'
# self.build_system.cxx = 'g++'
self.build_system.config_opts = [
'-S Examples/DoubleGyre/C++', '-DINSITU=Catalyst']

@run_before('run')
def prepare_runtime(self):
def prepare_job(self):
self.executable_opts = [
'--catalyst',
f'DummySPH-{self.git_tag}/ParaView_scripts/catalyst_clipping.py']
'128 64 10', './Examples/DoubleGyre/Python/pvDoubleGyre.py'
]
self.prerun_cmds = ['']
self.postrun_cmds = [
'head -1 datasets/dataset_000020/dataset_000020_0.vtp',
'head -1 datasets/dataset_000020.vtpd',
'file datasets/RenderView1_000020.png'
'',
'head -1 datasets/doublegyre_000010.vtpd',
'head -1 datasets/doublegyre_000010/doublegyre_000010_0.vti',
'file datasets/RenderView1_000010.png'
]

@sanity_function
def assert_runtime(self):
regex_vtp = r'VTKFile type=\"PolyData\"'
regex_vtpd = r'VTKFile type=\"vtkPartitionedDataSet\"'
regex_png = r'PNG image data,' # 1024 x 1024, 8-bit/color RGB
regex_1 = r'VTKFile type=\"vtkPartitionedDataSet\"'
regex_2 = r'VTKFile type=\"ImageData\"'
regex_3 = r'PNG image data,' # 1280 x 768, 8-bit/color RGB

return sn.all([
sn.assert_found(regex_vtp, self.stdout),
sn.assert_found(regex_vtpd, self.stdout),
sn.assert_found(regex_png, self.stdout),
sn.assert_found(regex_1, self.stdout),
sn.assert_found(regex_2, self.stdout),
sn.assert_found(regex_3, self.stdout)
])
Loading