diff --git a/cscs-checks/apps/paraview/paraview_check.py b/cscs-checks/apps/paraview/paraview_check.py index 7f13202c19..6f7a815f55 100644 --- a/cscs-checks/apps/paraview/paraview_check.py +++ b/cscs-checks/apps/paraview/paraview_check.py @@ -1,40 +1,24 @@ -import os - +import reframe as rfm import reframe.utility.sanity as sn -from reframe.core.pipeline import RunOnlyRegressionTest -class ParaViewCheck(RunOnlyRegressionTest): - def __init__(self, **kwargs): - super().__init__('paraview_gpu_check', - os.path.dirname(__file__), **kwargs) +@rfm.simple_test +class ParaViewCheck(rfm.RunOnlyRegressionTest): + def __init__(self): + super().__init__() + self.name = 'paraview_gpu_check' self.descr = 'ParaView GPU check' - - # Uncomment and adjust for your site self.valid_systems = ['daint:gpu', 'dom:gpu'] - - # Uncomment and set the valid prog. environments for your site self.valid_prog_environs = ['PrgEnv-gnu'] + self.num_tasks = 12 + self.num_tasks_per_node = 12 + self.modules = ['gcc/7.1.0', 'ParaView'] - # Uncomment and adjust to load the ParaView module - self.modules = ['ParaView'] - - # Reset sources dir relative to the SCS apps prefix self.executable = 'pvbatch' self.executable_opts = ['coloredSphere.py'] self.sanity_patterns = sn.assert_found( 'Vendor: NVIDIA Corporation', self.stdout) - # Uncomment and adjust for your site - # self.use_multithreading = True - self.num_tasks = 12 - self.num_tasks_per_node = 12 - - # Uncomment and set the maintainers and/or tags self.maintainers = ['JF'] self.tags = {'scs', 'production'} - - -def _get_checks(**kwargs): - return [ParaViewCheck(**kwargs)] diff --git a/cscs-checks/apps/paraview/src/coloredSphere.py b/cscs-checks/apps/paraview/src/coloredSphere.py index d88c4eadd7..fd4d076786 100644 --- a/cscs-checks/apps/paraview/src/coloredSphere.py +++ b/cscs-checks/apps/paraview/src/coloredSphere.py @@ -29,7 +29,11 @@ rep = Show(pidscal) -from vtkPVClientServerCoreCorePython import vtkProcessModule +if(GetParaViewVersion() >= 5.5): + from vtkmodules.vtkPVClientServerCoreCorePython import vtkProcessModule +else: + from vtkPVClientServerCoreCorePython import vtkProcessModule + print("rank=", vtkProcessModule.GetProcessModule().GetPartitionId()) print("total=", vtkProcessModule.GetProcessModule().GetNumberOfLocalPartitions()) nbprocs = servermanager.ActiveConnection.GetNumberOfDataPartitions()