From 76e55716cb26536d9dbe6f048ab15cdbb5377e9f Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 9 Oct 2018 16:21:33 +0200 Subject: [PATCH 1/2] Adapt the LAMMPS test to PE18.08 * Adapt to new regression test syntax. --- cscs-checks/apps/lammps/lammps_check.py | 63 +++++++++++-------------- 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/cscs-checks/apps/lammps/lammps_check.py b/cscs-checks/apps/lammps/lammps_check.py index ed1b425b7a..7bd536b537 100644 --- a/cscs-checks/apps/lammps/lammps_check.py +++ b/cscs-checks/apps/lammps/lammps_check.py @@ -1,13 +1,12 @@ import os +import reframe as rfm import reframe.utility.sanity as sn -from reframe.core.pipeline import RunOnlyRegressionTest -class LAMMPSBaseCheck(RunOnlyRegressionTest): - def __init__(self, name, **kwargs): - super().__init__(name, os.path.dirname(__file__), **kwargs) - +class LAMMPSBaseCheck(rfm.RunOnlyRegressionTest): + def __init__(self): + super().__init__() self.valid_prog_environs = ['PrgEnv-gnu'] self.modules = ['LAMMPS'] @@ -27,27 +26,24 @@ def __init__(self, name, **kwargs): sn.assert_found(r'Total wall time:', self.stdout), sn.assert_lt(energy_diff, 6e-4) ]) - self.maintainers = ['TR', 'VH'] self.strict_check = False - self.tags = {'scs'} self.extra_resources = { 'switches': { 'num_switches': 1 } } + self.tags = {'scs'} + self.maintainers = ['TR', 'VH'] -class LAMMPSGPUCheck(LAMMPSBaseCheck): - def __init__(self, variant, **kwargs): - super().__init__('lammps_gpu_%s_check' % variant, **kwargs) +class LAMMPSGPUCheck(LAMMPSBaseCheck): + def __init__(self): + super().__init__() self.valid_systems = ['daint:gpu', 'dom:gpu'] - self.descr = 'LAMMPS GPU check' - self.executable = 'lmp_mpi' self.executable_opts = '-sf gpu -pk gpu 1 -in in.lj.gpu'.split() self.variables = {'CRAY_CUDA_MPS': '1'} - self.num_gpus_per_node = 1 if self.current_system.name == 'dom': self.num_tasks = 12 @@ -57,44 +53,44 @@ def __init__(self, variant, **kwargs): self.num_tasks_per_node = 2 +@rfm.simple_test class LAMMPSGPUMaintCheck(LAMMPSGPUCheck): - def __init__(self, **kwargs): - super().__init__(variant='maint', **kwargs) - self.tags |= {'maintenance'} + def __init__(self): + super().__init__() self.reference = { 'dom:gpu': { - 'perf': (3457.0, -0.05, None) + 'perf': (3457.0, -0.10, None) }, 'daint:gpu': { 'perf': (4718.0, -0.10, None) }, } + self.tags |= {'maintenance'} + +@rfm.simple_test class LAMMPSGPUProdCheck(LAMMPSGPUCheck): - def __init__(self, **kwargs): - super().__init__(variant='prod', **kwargs) - self.tags |= {'production'} + def __init__(self): + super().__init__() self.reference = { 'dom:gpu': { - 'perf': (3360.0, -0.05, None) + 'perf': (3360.0, -0.10, None) }, 'daint:gpu': { 'perf': (2382.0, -0.50, None) }, } + self.tags |= {'production'} -class LAMMPSCPUCheck(LAMMPSBaseCheck): - def __init__(self, variant, **kwargs): - super().__init__('lammps_cpu_%s_check' % variant, **kwargs) +class LAMMPSCPUCheck(LAMMPSBaseCheck): + def __init__(self): + super().__init__() self.valid_systems = ['daint:mc', 'dom:mc'] - self.descr = 'LAMMPS CPU check' - self.executable = 'lmp_omp' self.executable_opts = '-sf omp -pk omp 1 -in in.lj.cpu'.split() - if self.current_system.name == 'dom': self.num_tasks = 216 self.num_tasks_per_node = 36 @@ -103,10 +99,11 @@ def __init__(self, variant, **kwargs): self.num_tasks = 576 +@rfm.simple_test class LAMMPSCPUProdCheck(LAMMPSCPUCheck): - def __init__(self, **kwargs): - super().__init__('prod', **kwargs) - self.tags |= {'production'} + def __init__(self): + super().__init__() + self.descr = self.name self.reference = { 'dom:mc': { 'perf': (4454.0, -0.05, None) @@ -116,8 +113,4 @@ def __init__(self, **kwargs): }, } - -def _get_checks(**kwargs): - return [LAMMPSGPUMaintCheck(**kwargs), - LAMMPSGPUProdCheck(**kwargs), - LAMMPSCPUProdCheck(**kwargs)] + self.tags |= {'production'} From 8269f5a500aaf182da4a7e5db89fec4a6aff721a Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 9 Oct 2018 16:30:04 +0200 Subject: [PATCH 2/2] Remove self.descr assignment --- cscs-checks/apps/lammps/lammps_check.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cscs-checks/apps/lammps/lammps_check.py b/cscs-checks/apps/lammps/lammps_check.py index 7bd536b537..6ec9ed11fb 100644 --- a/cscs-checks/apps/lammps/lammps_check.py +++ b/cscs-checks/apps/lammps/lammps_check.py @@ -103,7 +103,6 @@ def __init__(self): class LAMMPSCPUProdCheck(LAMMPSCPUCheck): def __init__(self): super().__init__() - self.descr = self.name self.reference = { 'dom:mc': { 'perf': (4454.0, -0.05, None)