From 38ba697823af95bb67283ad531a7de6c6ea4124c Mon Sep 17 00:00:00 2001 From: Sergei Kliavinek Date: Thu, 9 Sep 2021 17:22:00 +0300 Subject: [PATCH 1/2] add redesigned vasp tests --- cscs-checks/apps/vasp/vasp_check.py | 219 ++++++++++-------- hpctestlib/apps/vasp/base_check.py | 90 +++++++ .../apps/vasp/src/INCAR | 0 .../apps/vasp/src/KPOINTS | 0 .../apps/vasp/src/POSCAR | 0 .../apps/vasp/src/POTCAR | 0 6 files changed, 211 insertions(+), 98 deletions(-) create mode 100644 hpctestlib/apps/vasp/base_check.py rename {cscs-checks => hpctestlib}/apps/vasp/src/INCAR (100%) rename {cscs-checks => hpctestlib}/apps/vasp/src/KPOINTS (100%) rename {cscs-checks => hpctestlib}/apps/vasp/src/POSCAR (100%) rename {cscs-checks => hpctestlib}/apps/vasp/src/POTCAR (100%) diff --git a/cscs-checks/apps/vasp/vasp_check.py b/cscs-checks/apps/vasp/vasp_check.py index b29b0f7cd6..e9fdc8f636 100644 --- a/cscs-checks/apps/vasp/vasp_check.py +++ b/cscs-checks/apps/vasp/vasp_check.py @@ -5,117 +5,140 @@ import reframe as rfm import reframe.utility.sanity as sn +from hpctestlib.apps.vasp.base_check import VASP +dom_cpu = { + 'maint': (148.7, None, 0.05, 's'), + 'prod': (148.7, None, 0.05, 's'), +} -class VASPCheck(rfm.RunOnlyRegressionTest): - def __init__(self): +daint_cpu = { + 'maint': (105.3, None, 0.20, 's'), + 'prod': (105.3, None, 0.20, 's'), +} + +eiger_cpu = { + 'maint': (100.0, None, 0.10, 's'), + 'prod': (100.0, None, 0.10, 's'), +} + +pilatus_cpu = { + 'maint': (100.0, None, 0.10, 's'), + 'prod': (100.0, None, 0.10, 's'), +} + + +REFERENCE_CPU_PERFORMANCE = { + 'dom:gpu': dom_cpu, + 'daint:gpu': daint_cpu, + 'eiger:mc': eiger_cpu, + 'pilatus:mc': pilatus_cpu +} + + +dom_gpu = { + 'maint': (61.0, None, 0.10, 's'), + 'prod': (46.7, None, 0.20, 's'), +} + +daint_gpu = { + 'maint': (46.7, None, 0.20, 's'), + 'prod': (46.7, None, 0.20, 's'), +} + +REFERENCE_GPU_PERFORMANCE = { + 'dom:gpu': dom_gpu, + 'daint:gpu': daint_gpu, +} + +REFERENCE_PERFORMANCE = { + 'gpu': REFERENCE_GPU_PERFORMANCE, + 'cpu': REFERENCE_CPU_PERFORMANCE, +} + + +@rfm.simple_test +class VASPCheckCSCS(VASP): + mode = parameter(['prod', 'maint']) + modules = ['VASP'] + maintainers = ['LM'] + tags = {'scs'} + strict_check = False + extra_resources = { + 'switches': { + 'num_switches': 1 + } + } + + @run_after('init') + def env_define(self): if self.current_system.name in ['eiger', 'pilatus']: self.valid_prog_environs = ['cpeIntel'] else: self.valid_prog_environs = ['builtin'] - self.modules = ['VASP'] - force = sn.extractsingle(r'1 F=\s+(?P\S+)', - self.stdout, 'result', float) - self.sanity_patterns = sn.assert_reference( - force, -.85026214E+03, -1e-5, 1e-5 - ) - self.keep_files = ['OUTCAR'] - self.perf_patterns = { - 'time': sn.extractsingle(r'Total CPU time used \(sec\):' - r'\s+(?P