From 1d2de281eb09e54f375d65fe9f9d6f8b7c268f4b Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Thu, 19 Jul 2018 10:51:09 +0200 Subject: [PATCH 1/3] Adapt check for PE 18.07 * Adapt to new regression test syntax. * Make a change in `coloredSphere.py` to load different python modules depending on the ParaView version. --- cscs-checks/apps/paraview/paraview_check.py | 26 +++++++------------ .../apps/paraview/src/coloredSphere.py | 6 ++++- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/cscs-checks/apps/paraview/paraview_check.py b/cscs-checks/apps/paraview/paraview_check.py index 7f13202c19..87d3a51906 100644 --- a/cscs-checks/apps/paraview/paraview_check.py +++ b/cscs-checks/apps/paraview/paraview_check.py @@ -1,40 +1,32 @@ -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'] # 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'] + # Needed in order to swap from the default version of gcc + self.pre_run = ['module swap gcc/6.2.0 gcc/7.1.0'] + 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() From a1e13fa818f5a955f6656e35f0f346d09c908337 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 24 Jul 2018 08:12:32 +0200 Subject: [PATCH 2/3] Add note to `pre_run` definition --- cscs-checks/apps/paraview/paraview_check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cscs-checks/apps/paraview/paraview_check.py b/cscs-checks/apps/paraview/paraview_check.py index 87d3a51906..0f521744b7 100644 --- a/cscs-checks/apps/paraview/paraview_check.py +++ b/cscs-checks/apps/paraview/paraview_check.py @@ -19,7 +19,9 @@ def __init__(self): self.executable = 'pvbatch' self.executable_opts = ['coloredSphere.py'] - # Needed in order to swap from the default version of gcc + # NOTE: This is needed in order to swap from the default + # version of gcc until issue #59 is fixed. Then it should + # be moved to the `self.modules` definition. self.pre_run = ['module swap gcc/6.2.0 gcc/7.1.0'] self.sanity_patterns = sn.assert_found( From c86d058e022a0077573642c96e19237a38cb93bc Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 25 Jul 2018 14:13:51 +0200 Subject: [PATCH 3/3] Address PR comments --- cscs-checks/apps/paraview/paraview_check.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/cscs-checks/apps/paraview/paraview_check.py b/cscs-checks/apps/paraview/paraview_check.py index 0f521744b7..6f7a815f55 100644 --- a/cscs-checks/apps/paraview/paraview_check.py +++ b/cscs-checks/apps/paraview/paraview_check.py @@ -8,27 +8,17 @@ def __init__(self): super().__init__() self.name = 'paraview_gpu_check' self.descr = 'ParaView GPU check' - self.valid_systems = ['daint:gpu', 'dom:gpu'] - self.valid_prog_environs = ['PrgEnv-gnu'] - - # Uncomment and adjust to load the ParaView module - self.modules = ['ParaView'] + self.num_tasks = 12 + self.num_tasks_per_node = 12 + self.modules = ['gcc/7.1.0', 'ParaView'] self.executable = 'pvbatch' self.executable_opts = ['coloredSphere.py'] - # NOTE: This is needed in order to swap from the default - # version of gcc until issue #59 is fixed. Then it should - # be moved to the `self.modules` definition. - self.pre_run = ['module swap gcc/6.2.0 gcc/7.1.0'] - self.sanity_patterns = sn.assert_found( 'Vendor: NVIDIA Corporation', self.stdout) - self.num_tasks = 12 - self.num_tasks_per_node = 12 - self.maintainers = ['JF'] self.tags = {'scs', 'production'}