From 4bd71ed76e121689c9c8cc19a274f1ccfb6de784 Mon Sep 17 00:00:00 2001 From: Sergei Kliavinek Date: Thu, 9 Sep 2021 18:56:35 +0300 Subject: [PATCH 01/16] add redesigned gromacs tests --- cscs-checks/apps/gromacs/gromacs_check.py | 199 +++++++++++----------- hpctestlib/apps/gromacs/base_check.py | 102 +++++++++++ 2 files changed, 199 insertions(+), 102 deletions(-) create mode 100644 hpctestlib/apps/gromacs/base_check.py diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index a0fc0d0989..aaeac4f137 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -8,64 +8,98 @@ import reframe as rfm import reframe.utility.sanity as sn +from hpctestlib.apps.gromacs.base_check import Gromacs_BaseCheck + +REFERENCE_GPU_PERFORMANCE = { + 'large': { + 'daint:gpu': { + 'maint': (63.0, -0.10, None, 'ns/day'), + 'prod': (63.0, -0.20, None, 'ns/day'), + }, + }, + 'small': { + 'daint:gpu': { + 'prod': (35.0, -0.10, None, 'ns/day'), + }, + 'dom:gpu': { + 'prod': (37.0, -0.05, None, 'ns/day'), + }, + } +} + +REFERENCE_CPU_PERFORMANCE = { + 'large': { + 'daint:mc': { + 'prod': (68.0, -0.20, None, 'ns/day'), + }, + 'eiger:mc': { + 'prod': (146.00, -0.20, None, 'ns/day'), + }, + 'pilatus:mc': { + 'prod': (146.00, -0.20, None, 'ns/day'), + }, + }, + 'small': { + 'daint:mc': { + 'prod': (38.8, -0.10, None, 'ns/day'), + }, + 'dom:mc': { + 'prod': (40.0, -0.05, None, 'ns/day'), + }, + 'eiger:mc': { + 'prod': (103.00, -0.10, None, 'ns/day'), + }, + 'dom:mc': { + 'prod': (103.00, -0.10, None, 'ns/day'), + }, + } +} + + +class GromacsBaseCheck(Gromacs_BaseCheck): + scale = parameter(['small', 'large']) + modules = ['GROMACS'] + maintainers = ['VH', 'SO'] + strict_check = False + use_multithreading = False + extra_resources = { + 'switches': { + 'num_switches': 1 + } + } + tags = {'scs', 'external-resources'} - -class GromacsBaseCheck(rfm.RunOnlyRegressionTest): - def __init__(self, output_file): + @run_after('init') + def env_define(self): if self.current_system.name in ['eiger', 'pilatus']: self.valid_prog_environs = ['cpeGNU'] else: self.valid_prog_environs = ['builtin'] - self.executable = 'gmx_mpi' - - # Reset sources dir relative to the SCS apps prefix - self.sourcesdir = os.path.join(self.current_system.resourcesdir, - 'Gromacs', 'herflat') - self.keep_files = [output_file] - - energy = sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' - r'\s+Conserved En\.\s+Temperature\n' - r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' - r'\s+Pressure \(bar\)\s+Constr\. rmsd', - output_file, 'energy', float, item=-1) - energy_reference = -3270799.9 - - self.sanity_patterns = sn.all([ - sn.assert_found('Finished mdrun', output_file), - sn.assert_reference(energy, energy_reference, -0.001, 0.001) - ]) - - self.perf_patterns = { - 'perf': sn.extractsingle(r'Performance:\s+(?P\S+)', - output_file, 'perf', float) - } - - self.modules = ['GROMACS'] - self.maintainers = ['VH', 'SO'] - self.strict_check = False - self.use_multithreading = False - self.extra_resources = { - 'switches': { - 'num_switches': 1 - } - } - self.tags = {'scs', 'external-resources'} - - -@rfm.parameterized_test(*([s, v] - for s in ['small', 'large'] - for v in ['prod', 'maint'])) -class GromacsGPUCheck(GromacsBaseCheck): - def __init__(self, scale, variant): - super().__init__('md.log') - self.valid_systems = ['daint:gpu'] - self.descr = 'GROMACS GPU check' - self.executable_opts = ['mdrun', '-dlb yes', '-ntomp 1', '-npme 0', - '-s herflat.tpr'] - self.variables = {'CRAY_CUDA_MPS': '1'} - self.num_gpus_per_node = 1 - if scale == 'small': + @run_after('init') + def set_tags(self): + self.tags |= {'maintenance' if self.mode == 'maint' + else 'production'} + + @run_after('setup') + def set_reference(self): + self.reference = self.reference_dict[self.scale] + + +@rfm.simple_test +class gromacs_gpu_check(GromacsBaseCheck): + mode = parameter(['maint', 'prod']) + valid_systems = ['daint:gpu'] + descr = 'GROMACS GPU check' + executable_opts = ['mdrun', '-dlb yes', '-ntomp 1', '-npme 0', + '-s herflat.tpr'] + variables = {'CRAY_CUDA_MPS': '1'} + num_gpus_per_node = 1 + reference_dict = REFERENCE_GPU_PERFORMANCE + + @run_after('setup') + def set_num_tasks(self): + if self.scale == 'small': self.valid_systems += ['dom:gpu'] self.num_tasks = 72 self.num_tasks_per_node = 12 @@ -73,40 +107,19 @@ def __init__(self, scale, variant): self.num_tasks = 192 self.num_tasks_per_node = 12 - references = { - 'maint': { - 'large': { - 'daint:gpu': {'perf': (63.0, -0.10, None, 'ns/day')} - } - }, - 'prod': { - 'small': { - 'dom:gpu': {'perf': (37.0, -0.05, None, 'ns/day')}, - 'daint:gpu': {'perf': (35.0, -0.10, None, 'ns/day')} - }, - 'large': { - 'daint:gpu': {'perf': (63.0, -0.20, None, 'ns/day')} - } - }, - } - with contextlib.suppress(KeyError): - self.reference = references[variant][scale] - - self.tags |= {'maintenance' if variant == 'maint' else 'production'} - -@rfm.parameterized_test(*([s, v] - for s in ['small', 'large'] - for v in ['prod'])) -class GromacsCPUCheck(GromacsBaseCheck): - def __init__(self, scale, variant): - super().__init__('md.log') - self.valid_systems = ['daint:mc', 'eiger:mc', 'pilatus:mc'] - self.descr = 'GROMACS CPU check' - self.executable_opts = ['mdrun', '-dlb yes', '-ntomp 1', '-npme -1', - '-nb cpu', '-s herflat.tpr'] +@rfm.simple_test +class gromacs_cpu_check(GromacsBaseCheck): + mode = parameter(['prod']) + valid_systems = ['daint:mc', 'eiger:mc', 'pilatus:mc'] + descr = 'GROMACS CPU check' + executable_opts = ['mdrun', '-dlb yes', '-ntomp 1', '-npme -1', + '-nb cpu', '-s herflat.tpr'] + reference_dict = REFERENCE_CPU_PERFORMANCE - if scale == 'small': + @run_after('setup') + def set_num_tasks(self): + if self.scale == 'small': self.valid_systems += ['dom:mc'] if (self.current_system.name in ['daint', 'dom']): self.num_tasks = 216 @@ -121,21 +134,3 @@ def __init__(self, scale, variant): elif (self.current_system.name in ['eiger', 'pilatus']): self.num_tasks = 2048 self.num_tasks_per_node = 128 - - references = { - 'prod': { - 'small': { - 'dom:mc': {'perf': (40.0, -0.05, None, 'ns/day')}, - 'daint:mc': {'perf': (38.8, -0.10, None, 'ns/day')}, - 'eiger:mc': {'perf': (103.00, -0.10, None, 'ns/day')}, - 'pilatus:mc': {'perf': (103.00, -0.10, None, 'ns/day')} - }, - 'large': { - 'daint:mc': {'perf': (68.0, -0.20, None, 'ns/day')}, - 'eiger:mc': {'perf': (146.00, -0.20, None, 'ns/day')}, - 'pilatus:mc': {'perf': (146.00, -0.20, None, 'ns/day')} - } - }, - } - self.reference = references[variant][scale] - self.tags |= {'maintenance' if variant == 'maint' else 'production'} diff --git a/hpctestlib/apps/gromacs/base_check.py b/hpctestlib/apps/gromacs/base_check.py new file mode 100644 index 0000000000..f3793fbffa --- /dev/null +++ b/hpctestlib/apps/gromacs/base_check.py @@ -0,0 +1,102 @@ +# Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich) +# ReFrame Project Developers. See the top-level LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause + +import contextlib +import os + +import reframe as rfm +import reframe.utility.sanity as sn + + +class Gromacs_BaseCheck(rfm.RunOnlyRegressionTest): + '''Base class for the Gromacs Test. + + GROMACS is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems + with hundreds to millions of particles. + + It is primarily designed for biochemical molecules like proteins, + lipids and nucleic acids that have a lot of complicated bonded + interactions, but since GROMACS is extremely fast at calculating + the nonbonded interactions (that usually dominate simulations) + many groups are also using it for research on non-biological + systems, e.g. polymers (see gromacs.org). + + The presented abstract run-only class checks the Gromacs perfomance. + To do this, it is necessary to define in tests the reference values + of energy and possible deviations from this value. This data is used + to check if the task is being executed correctly, that is, the final + energy is correct (approximately the reference). The default + assumption is that NAMD is already installed on the device under test. + ''' + + #: Reference value of energy, that is used for the comparison + #: with the execution ouput on the sanity step. The absolute + #: difference between final energy value and reference value + #: should be smaller than energy_tolerance + #: + #: :type: str + #: :default: :class:`required` + energy_value = variable(float) + + #: Maximum deviation from the reference value of energy, + #: that is acceptable. + #: + #: :default: :class:`required` + energy_tolerance = variable(float) + + #: :default: :class:`required` + executable = required + + #: Amber output file. + #: + #: :default: : 'amber.out' + output_file = variable(str, value='md.log') + + executable = 'gmx_mpi' + energy_value = -3270799.9 + energy_tolerance = 0.001 + + + + @run_after('init') + def source_install(self): + # Reset sources dir relative to the SCS apps prefix + self.sourcesdir = os.path.join(self.current_system.resourcesdir, + 'Gromacs', 'herflat') + + @run_after('init') + def set_keep_files(self): + self.keep_files = [self.output_file] + + @performance_function('ns/day', perf_key='perf') + def set_perf_patterns(self): + return sn.extractsingle(r'Performance:\s+(?P\S+)', + self.output_file, 'perf', float) + + @run_before('performance') + def set_the_performance_dict(self): + self.perf_variables = {self.mode: + sn.make_performance_function( + sn.extractsingle( + r'Performance:\s+(?P\S+)', + self.output_file, 'perf', float), + 'ns/day')} + + @sanity_function + def assert_energy_readout(self): + '''Assert the obtained energy meets the specified tolerances.''' + energy = sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' + r'\s+Conserved En\.\s+Temperature\n' + r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' + r'\s+Pressure \(bar\)\s+Constr\. rmsd', + self.output_file, 'energy', float, item=-1) + ref_ener_diff = sn.abs(self.energy_value * + self.energy_tolerance) + + return sn.all([ + sn.assert_found('Finished mdrun', self.output_file), + sn.assert_lt(self.energy_tolerance, ref_ener_diff) + ]) From 189916f406e2105b86669dac71fc4636d0e8023c Mon Sep 17 00:00:00 2001 From: Sergei Kliavinek Date: Thu, 9 Sep 2021 18:59:02 +0300 Subject: [PATCH 02/16] fix problems with blank line and white space --- hpctestlib/apps/gromacs/base_check.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hpctestlib/apps/gromacs/base_check.py b/hpctestlib/apps/gromacs/base_check.py index f3793fbffa..bffb1ae759 100644 --- a/hpctestlib/apps/gromacs/base_check.py +++ b/hpctestlib/apps/gromacs/base_check.py @@ -60,7 +60,6 @@ class Gromacs_BaseCheck(rfm.RunOnlyRegressionTest): energy_tolerance = 0.001 - @run_after('init') def source_install(self): # Reset sources dir relative to the SCS apps prefix @@ -96,7 +95,7 @@ def assert_energy_readout(self): ref_ener_diff = sn.abs(self.energy_value * self.energy_tolerance) - return sn.all([ + return sn.all([ sn.assert_found('Finished mdrun', self.output_file), sn.assert_lt(self.energy_tolerance, ref_ener_diff) ]) From 9bc222e77e37273ea56587903e5ea2a6840b65f3 Mon Sep 17 00:00:00 2001 From: Sergei Kliavinek Date: Thu, 9 Sep 2021 18:59:41 +0300 Subject: [PATCH 03/16] fix problems with blank line and white space --- hpctestlib/apps/gromacs/base_check.py | 1 - 1 file changed, 1 deletion(-) diff --git a/hpctestlib/apps/gromacs/base_check.py b/hpctestlib/apps/gromacs/base_check.py index bffb1ae759..54102d4fba 100644 --- a/hpctestlib/apps/gromacs/base_check.py +++ b/hpctestlib/apps/gromacs/base_check.py @@ -59,7 +59,6 @@ class Gromacs_BaseCheck(rfm.RunOnlyRegressionTest): energy_value = -3270799.9 energy_tolerance = 0.001 - @run_after('init') def source_install(self): # Reset sources dir relative to the SCS apps prefix From b72545dc618480b4668098e1848743bc3518de7e Mon Sep 17 00:00:00 2001 From: Sergei Kliavinek Date: Wed, 15 Sep 2021 21:23:02 +0300 Subject: [PATCH 04/16] delete unused import --- cscs-checks/apps/gromacs/gromacs_check.py | 4 ---- hpctestlib/apps/gromacs/base_check.py | 1 - 2 files changed, 5 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index aaeac4f137..855770b790 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -3,11 +3,7 @@ # # SPDX-License-Identifier: BSD-3-Clause -import contextlib -import os - import reframe as rfm -import reframe.utility.sanity as sn from hpctestlib.apps.gromacs.base_check import Gromacs_BaseCheck REFERENCE_GPU_PERFORMANCE = { diff --git a/hpctestlib/apps/gromacs/base_check.py b/hpctestlib/apps/gromacs/base_check.py index 54102d4fba..2d93c96b9b 100644 --- a/hpctestlib/apps/gromacs/base_check.py +++ b/hpctestlib/apps/gromacs/base_check.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: BSD-3-Clause -import contextlib import os import reframe as rfm From d3e81b672c46228968dcd6e86d07e1c017c47e61 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 11 Nov 2021 22:05:52 +0100 Subject: [PATCH 05/16] WIP: Gromacs benchmarks as library tests --- cscs-checks/apps/gromacs/gromacs_check.py | 3 +- hpctestlib/apps/gromacs/__init__.py | 137 ++++++++++++++++++++++ hpctestlib/apps/gromacs/base_check.py | 99 ---------------- 3 files changed, 139 insertions(+), 100 deletions(-) create mode 100644 hpctestlib/apps/gromacs/__init__.py delete mode 100644 hpctestlib/apps/gromacs/base_check.py diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index 855770b790..ebf0d8220d 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -4,7 +4,8 @@ # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm -from hpctestlib.apps.gromacs.base_check import Gromacs_BaseCheck +from hpctestlib.apps.gromacs import gromacs_check + REFERENCE_GPU_PERFORMANCE = { 'large': { diff --git a/hpctestlib/apps/gromacs/__init__.py b/hpctestlib/apps/gromacs/__init__.py new file mode 100644 index 0000000000..3da7282a9f --- /dev/null +++ b/hpctestlib/apps/gromacs/__init__.py @@ -0,0 +1,137 @@ +# Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich) +# ReFrame Project Developers. See the top-level LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause + +import os + +import reframe as rfm +import reframe.utility as util +import reframe.utility.sanity as sn +import reframe.utility.typecheck as typ + + +@rfm.simple_test +class gromacs_check(rfm.RunOnlyRegressionTest): + '''Base class for the Gromacs Test. + + GROMACS is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems + with hundreds to millions of particles. + + It is primarily designed for biochemical molecules like proteins, + lipids and nucleic acids that have a lot of complicated bonded + interactions, but since GROMACS is extremely fast at calculating + the nonbonded interactions (that usually dominate simulations) + many groups are also using it for research on non-biological + systems, e.g. polymers (see gromacs.org). + + The presented abstract run-only class checks the Gromacs perfomance. + To do this, it is necessary to define in tests the reference values + of energy and possible deviations from this value. This data is used + to check if the task is being executed correctly, that is, the final + energy is correct (approximately the reference). The default + assumption is that NAMD is already installed on the device under test. + ''' + + #: Parameter pack encoding the benchmark information. + #: + #: The first element of the tuple refers to the benchmark name, + #: the second is the energy reference and the third is the + #: tolerance threshold. + #: + #: :type: `Tuple[str, float, float]` + #: :values: + #: .. code-block:: python + #: + benchmark_info = parameter([ + ('HECBioSim/Crambin', 0.0, 0.0), + ('HECBioSim/Glutamine-Binding-Protein', 0.0, 0.0), + ('HECBioSim/hEGFRDimer', 0.0, 0.0), + ('HECBioSim/hEGFRDimerPair', 0.0, 0.0), + ('HECBioSim/hEGFRtetramerPair', 0.0, 0.0) + ]) + + nb_impl = parameter(['cpu', 'gpu']) + + executable = 'gmx_mpi' + + # Test tags + # + # :required: No + # :default: ``{'sciapp', 'chemistry'}`` + tags = {'sciapp', 'chemistry'} + keep_files = ['md.log'] + + @run_after('init') + def prepare_test(self): + self.__bench, self.__energy_ref, self.__energy_tol = self.benchmark_info + self.descr = f'GROMACS {self.__bench} benchmark (NB: {self.nb_impl})' + self.prerun_cmds = [ + f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/main/{self.__bench}/benchmark.tpr' + ] + self.executable_opts = ['mdrun', '-nb', self.nb_impl, + '-s benchmark.tpr'] + + @performance_function('ns/day') + def perf(self): + return sn.extractsingle(r'Performance:\s+(?P\S+)', + 'md.log', 'perf', float) + + @deferrable + def energy_hecbiosim_crambin(self): + return sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' + r'\s+Conserved En\.\s+Temperature\n' + r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' + r'\s+Pressure \(bar\)\s+Constr\. rmsd', + 'md.log', 'energy', float, item=-1) + + @deferrable + def energy_hecbiosim_glutamine_binding_protein(self): + return sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' + r'\s+Conserved En\.\s+Temperature\n' + r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' + r'\s+Pressure \(bar\)\s+Constr\. rmsd', + 'md.log', 'energy', float, item=-1) + + @deferrable + def energy_hecbiosim_hegfrdimer(self): + return sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' + r'\s+Conserved En\.\s+Temperature\n' + r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' + r'\s+Pressure \(bar\)\s+Constr\. rmsd', + 'md.log', 'energy', float, item=-1) + + @deferrable + def energy_hecbiosim_hegfrdimerpair(self): + return sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' + r'\s+Conserved En\.\s+Temperature\n' + r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' + r'\s+Pressure \(bar\)\s+Constr\. rmsd', + 'md.log', 'energy', float, item=-1) + + @deferrable + def energy_hecbiosim_hegfrtetramerpair(self): + return sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' + r'\s+Conserved En\.\s+Temperature\n' + r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' + r'\s+Pressure \(bar\)\s+Constr\. rmsd', + 'md.log', 'energy', float, item=-1) + + @sanity_function + def assert_energy_readout(self): + '''Assert the obtained energy meets the specified tolerances.''' + + energy_fn_name = f'energy_{util.toalphanum(self.__bench).lower()}' + energy_fn = getattr(self, energy_fn_name, None) + sn.assert_true( + energy_fn is not None, + msg=(f"cannot extract energy for benchmark {self.__bench!r}: " + f"please define a member function '{energy_fn_name}()'") + ).evaluate() + energy = energy_fn() + energy_diff = sn.abs(energy - self.__energy_ref) + return sn.all([ + sn.assert_found('Finished mdrun', 'md.log'), + sn.assert_lt(energy_diff, self.__energy_tol) + ]) diff --git a/hpctestlib/apps/gromacs/base_check.py b/hpctestlib/apps/gromacs/base_check.py deleted file mode 100644 index 2d93c96b9b..0000000000 --- a/hpctestlib/apps/gromacs/base_check.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich) -# ReFrame Project Developers. See the top-level LICENSE file for details. -# -# SPDX-License-Identifier: BSD-3-Clause - -import os - -import reframe as rfm -import reframe.utility.sanity as sn - - -class Gromacs_BaseCheck(rfm.RunOnlyRegressionTest): - '''Base class for the Gromacs Test. - - GROMACS is a versatile package to perform molecular dynamics, - i.e. simulate the Newtonian equations of motion for systems - with hundreds to millions of particles. - - It is primarily designed for biochemical molecules like proteins, - lipids and nucleic acids that have a lot of complicated bonded - interactions, but since GROMACS is extremely fast at calculating - the nonbonded interactions (that usually dominate simulations) - many groups are also using it for research on non-biological - systems, e.g. polymers (see gromacs.org). - - The presented abstract run-only class checks the Gromacs perfomance. - To do this, it is necessary to define in tests the reference values - of energy and possible deviations from this value. This data is used - to check if the task is being executed correctly, that is, the final - energy is correct (approximately the reference). The default - assumption is that NAMD is already installed on the device under test. - ''' - - #: Reference value of energy, that is used for the comparison - #: with the execution ouput on the sanity step. The absolute - #: difference between final energy value and reference value - #: should be smaller than energy_tolerance - #: - #: :type: str - #: :default: :class:`required` - energy_value = variable(float) - - #: Maximum deviation from the reference value of energy, - #: that is acceptable. - #: - #: :default: :class:`required` - energy_tolerance = variable(float) - - #: :default: :class:`required` - executable = required - - #: Amber output file. - #: - #: :default: : 'amber.out' - output_file = variable(str, value='md.log') - - executable = 'gmx_mpi' - energy_value = -3270799.9 - energy_tolerance = 0.001 - - @run_after('init') - def source_install(self): - # Reset sources dir relative to the SCS apps prefix - self.sourcesdir = os.path.join(self.current_system.resourcesdir, - 'Gromacs', 'herflat') - - @run_after('init') - def set_keep_files(self): - self.keep_files = [self.output_file] - - @performance_function('ns/day', perf_key='perf') - def set_perf_patterns(self): - return sn.extractsingle(r'Performance:\s+(?P\S+)', - self.output_file, 'perf', float) - - @run_before('performance') - def set_the_performance_dict(self): - self.perf_variables = {self.mode: - sn.make_performance_function( - sn.extractsingle( - r'Performance:\s+(?P\S+)', - self.output_file, 'perf', float), - 'ns/day')} - - @sanity_function - def assert_energy_readout(self): - '''Assert the obtained energy meets the specified tolerances.''' - energy = sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' - r'\s+Conserved En\.\s+Temperature\n' - r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' - r'\s+Pressure \(bar\)\s+Constr\. rmsd', - self.output_file, 'energy', float, item=-1) - ref_ener_diff = sn.abs(self.energy_value * - self.energy_tolerance) - - return sn.all([ - sn.assert_found('Finished mdrun', self.output_file), - sn.assert_lt(self.energy_tolerance, ref_ener_diff) - ]) From aaf83ca531a4d05fdbbb5bef04ad5c4076f45ae8 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Mon, 15 Nov 2021 10:44:19 +0100 Subject: [PATCH 06/16] Rewrite Gromacs CSCS checks --- cscs-checks/apps/gromacs/gromacs_check.py | 207 +++++++++++------- .../gromacs/{__init__.py => checks.py} | 31 ++- 2 files changed, 140 insertions(+), 98 deletions(-) rename hpctestlib/sciapps/gromacs/{__init__.py => checks.py} (88%) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index ebf0d8220d..ed2af6d60a 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -4,9 +4,134 @@ # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm -from hpctestlib.apps.gromacs import gromacs_check +from hpctestlib.sciapps.gromacs.checks import gromacs_check +@rfm.simple_test +class cscs_gromacs_check(gromacs_check): + modules = ['GROMACS'] + maintainers = ['VH', 'VK'] + use_multithreading = False + extra_resources = { + 'switches': { + 'num_switches': 1 + } + } + executable_opts += ['-dlb yes', '-ntomp 1', '-npme -1'] + valid_prog_environs = ['builtin'] + + # CSCS-specific parameterization + num_nodes = parameter([6, 16]) + mode = parameter(['maintenance', 'production']) + allref = { + 6: { + 'sm_60': { + 'HECBioSim/Crambin': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + }, + 'broadwell': { + 'HECBioSim/Crambin': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + }, + 'zen2': { + 'HECBioSim/Crambin': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + }, + }, + 16: { + 'sm_60': { + 'HECBioSim/Crambin': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + }, + 'broadwell': { + 'HECBioSim/Crambin': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + }, + 'zen2': { + 'HECBioSim/Crambin': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + }, + } + } + + @run_after('init') + def setup_filtering_criteria(self): + # Update test's description + self.descr += f' ({self.num_nodes} node(s), {self.mode!r} mode)' + + # Setup system filtering + valid_systems = { + 'cpu': { + 6: ['daint:mc', 'dom:mc', 'eiger:mc', 'pilatus:mc'], + 16: ['daint:mc', 'eiger:mc'] + }, + 'gpu': { + 6: ['daint:gpu', 'dom:gpu', 'eiger:gpu', 'pilatus:gpu'], + 16: ['daint:gpu', 'eiger:gpu'] + } + } + try: + self.valid_systems = valid_systems[self.nb_impl][self.num_nodes] + except KeyError: + self.valid_systems = [] + + # Maintenance mode is not valid for the cpu run + if self.nb_impl == 'cpu' and self.mode == 'maintenance': + self.valid_systems = [] + + # Setup prog env. filtering + if self.current_system.name in ('eiger', 'pilatus'): + self.valid_prog_environs = ['cpeGNU'] + + self.tags |= {self.mode} + + @run_before('run') + def setup_run(self): + # self.skip_if_no_procinfo() + # Setup GPU run + if self.nb_impl == 'gpu': + self.num_gpus_per_node = 1 + self.variables = {'CRAY_CUDA_MPS': '1'} + + proc = self.current_partition.processor + + # Choose arch; we set explicitly the GPU arch, since there is no + # auto-detection + arch = proc.arch + if self.current_partition.fullname in ('daint:gpu', 'dom:gpu'): + arch = 'sm_60' + + # Setup performance references + self.reference = { + '*': { + 'perf': self.allref[self.num_nodes][arch][self.bench_name] + } + } + + # Setup parallel run + self.num_tasks_per_node = proc.num_cores + self.num_tasks = self.num_nodes * self.num_tasks_per_node + + +# FIXME: Remove the following references REFERENCE_GPU_PERFORMANCE = { 'large': { 'daint:gpu': { @@ -51,83 +176,3 @@ }, } } - - -class GromacsBaseCheck(Gromacs_BaseCheck): - scale = parameter(['small', 'large']) - modules = ['GROMACS'] - maintainers = ['VH', 'SO'] - strict_check = False - use_multithreading = False - extra_resources = { - 'switches': { - 'num_switches': 1 - } - } - tags = {'scs', 'external-resources'} - - @run_after('init') - def env_define(self): - if self.current_system.name in ['eiger', 'pilatus']: - self.valid_prog_environs = ['cpeGNU'] - else: - self.valid_prog_environs = ['builtin'] - - @run_after('init') - def set_tags(self): - self.tags |= {'maintenance' if self.mode == 'maint' - else 'production'} - - @run_after('setup') - def set_reference(self): - self.reference = self.reference_dict[self.scale] - - -@rfm.simple_test -class gromacs_gpu_check(GromacsBaseCheck): - mode = parameter(['maint', 'prod']) - valid_systems = ['daint:gpu'] - descr = 'GROMACS GPU check' - executable_opts = ['mdrun', '-dlb yes', '-ntomp 1', '-npme 0', - '-s herflat.tpr'] - variables = {'CRAY_CUDA_MPS': '1'} - num_gpus_per_node = 1 - reference_dict = REFERENCE_GPU_PERFORMANCE - - @run_after('setup') - def set_num_tasks(self): - if self.scale == 'small': - self.valid_systems += ['dom:gpu'] - self.num_tasks = 72 - self.num_tasks_per_node = 12 - else: - self.num_tasks = 192 - self.num_tasks_per_node = 12 - - -@rfm.simple_test -class gromacs_cpu_check(GromacsBaseCheck): - mode = parameter(['prod']) - valid_systems = ['daint:mc', 'eiger:mc', 'pilatus:mc'] - descr = 'GROMACS CPU check' - executable_opts = ['mdrun', '-dlb yes', '-ntomp 1', '-npme -1', - '-nb cpu', '-s herflat.tpr'] - reference_dict = REFERENCE_CPU_PERFORMANCE - - @run_after('setup') - def set_num_tasks(self): - if self.scale == 'small': - self.valid_systems += ['dom:mc'] - if (self.current_system.name in ['daint', 'dom']): - self.num_tasks = 216 - self.num_tasks_per_node = 36 - elif (self.current_system.name in ['eiger', 'pilatus']): - self.num_tasks = 768 - self.num_tasks_per_node = 128 - else: - if (self.current_system.name in ['daint', 'dom']): - self.num_tasks = 576 - self.num_tasks_per_node = 36 - elif (self.current_system.name in ['eiger', 'pilatus']): - self.num_tasks = 2048 - self.num_tasks_per_node = 128 diff --git a/hpctestlib/sciapps/gromacs/__init__.py b/hpctestlib/sciapps/gromacs/checks.py similarity index 88% rename from hpctestlib/sciapps/gromacs/__init__.py rename to hpctestlib/sciapps/gromacs/checks.py index 3da7282a9f..cec508f2df 100644 --- a/hpctestlib/sciapps/gromacs/__init__.py +++ b/hpctestlib/sciapps/gromacs/checks.py @@ -3,12 +3,9 @@ # # SPDX-License-Identifier: BSD-3-Clause -import os - import reframe as rfm import reframe.utility as util import reframe.utility.sanity as sn -import reframe.utility.typecheck as typ @rfm.simple_test @@ -26,12 +23,6 @@ class gromacs_check(rfm.RunOnlyRegressionTest): many groups are also using it for research on non-biological systems, e.g. polymers (see gromacs.org). - The presented abstract run-only class checks the Gromacs perfomance. - To do this, it is necessary to define in tests the reference values - of energy and possible deviations from this value. This data is used - to check if the task is being executed correctly, that is, the final - energy is correct (approximately the reference). The default - assumption is that NAMD is already installed on the device under test. ''' #: Parameter pack encoding the benchmark information. @@ -42,8 +33,6 @@ class gromacs_check(rfm.RunOnlyRegressionTest): #: #: :type: `Tuple[str, float, float]` #: :values: - #: .. code-block:: python - #: benchmark_info = parameter([ ('HECBioSim/Crambin', 0.0, 0.0), ('HECBioSim/Glutamine-Binding-Protein', 0.0, 0.0), @@ -52,14 +41,13 @@ class gromacs_check(rfm.RunOnlyRegressionTest): ('HECBioSim/hEGFRtetramerPair', 0.0, 0.0) ]) + #: Parameter encoding the implementation of the non-bonded calculations + #: + #: :type: :class:`str` + #: :values: ``['cpu', 'gpu']`` nb_impl = parameter(['cpu', 'gpu']) executable = 'gmx_mpi' - - # Test tags - # - # :required: No - # :default: ``{'sciapp', 'chemistry'}`` tags = {'sciapp', 'chemistry'} keep_files = ['md.log'] @@ -68,11 +56,20 @@ def prepare_test(self): self.__bench, self.__energy_ref, self.__energy_tol = self.benchmark_info self.descr = f'GROMACS {self.__bench} benchmark (NB: {self.nb_impl})' self.prerun_cmds = [ - f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/main/{self.__bench}/benchmark.tpr' + f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/main/{self.__bench}/benchmark.tpr' # noqa: E501 ] self.executable_opts = ['mdrun', '-nb', self.nb_impl, '-s benchmark.tpr'] + @property + def bench_name(self): + '''The benchmark name. + + :type: :class:`str` + ''' + + return self.__bench + @performance_function('ns/day') def perf(self): return sn.extractsingle(r'Performance:\s+(?P\S+)', From 22362a8446d6b5279582d8887ba7e9a10a6f5965 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Mon, 15 Nov 2021 12:11:09 +0100 Subject: [PATCH 07/16] Fix PEP8 complaints --- cscs-checks/apps/gromacs/gromacs_check.py | 12 ++++++------ hpctestlib/sciapps/gromacs/checks.py | 22 +++++++++++++++++++--- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index ed2af6d60a..b948235de8 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -27,21 +27,21 @@ class cscs_gromacs_check(gromacs_check): 6: { 'sm_60': { 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), @@ -50,21 +50,21 @@ class cscs_gromacs_check(gromacs_check): 16: { 'sm_60': { 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), diff --git a/hpctestlib/sciapps/gromacs/checks.py b/hpctestlib/sciapps/gromacs/checks.py index cec508f2df..20b64c23ad 100644 --- a/hpctestlib/sciapps/gromacs/checks.py +++ b/hpctestlib/sciapps/gromacs/checks.py @@ -53,7 +53,7 @@ class gromacs_check(rfm.RunOnlyRegressionTest): @run_after('init') def prepare_test(self): - self.__bench, self.__energy_ref, self.__energy_tol = self.benchmark_info + self.__bench, self.__nrg_ref, self.__nrg_tol = self.benchmark_info self.descr = f'GROMACS {self.__bench} benchmark (NB: {self.nb_impl})' self.prerun_cmds = [ f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/main/{self.__bench}/benchmark.tpr' # noqa: E501 @@ -70,6 +70,22 @@ def bench_name(self): return self.__bench + @property + def energy_ref(self): + '''The energy reference value for this benchmark. + + :type: :class:`str` + ''' + return self.__nrg_ref + + @property + def energy_tol(self): + '''The energy tolerance value for this benchmark. + + :type: :class:`str` + ''' + return self.__nrg_tol + @performance_function('ns/day') def perf(self): return sn.extractsingle(r'Performance:\s+(?P\S+)', @@ -127,8 +143,8 @@ def assert_energy_readout(self): f"please define a member function '{energy_fn_name}()'") ).evaluate() energy = energy_fn() - energy_diff = sn.abs(energy - self.__energy_ref) + energy_diff = sn.abs(energy - self.energy_ref) return sn.all([ sn.assert_found('Finished mdrun', 'md.log'), - sn.assert_lt(energy_diff, self.__energy_tol) + sn.assert_lt(energy_diff, self.energy_tol) ]) From b4f7299e77b8ef4ac3d07d7815a36ae891998650 Mon Sep 17 00:00:00 2001 From: Victor Holanda Rusu Date: Tue, 16 Nov 2021 21:29:12 +0100 Subject: [PATCH 08/16] Update the GROMACS reference numbers --- cscs-checks/apps/gromacs/gromacs_check.py | 206 +++++++++++++--------- hpctestlib/sciapps/gromacs/checks.py | 13 +- 2 files changed, 133 insertions(+), 86 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index ed2af6d60a..706016abaf 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -21,53 +21,132 @@ class cscs_gromacs_check(gromacs_check): valid_prog_environs = ['builtin'] # CSCS-specific parameterization - num_nodes = parameter([6, 16]) + num_nodes = parameter([1, 2, 4, 6, 8, 16]) mode = parameter(['maintenance', 'production']) allref = { + 1: { + 'sm_60': { + 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (70.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (7.5, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (3.0, None, None, 'ns/day'), + }, + 'broadwell': { + 'HECBioSim/Crambin': (107.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (36.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (3.0, None, None, 'ns/day'), + }, + 'zen2': { + 'HECBioSim/Crambin': (320.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (16.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), + }, + }, + 2: { + 'sm_60': { + 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (13.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (5.0, None, None, 'ns/day'), + }, + 'broadwell': { + 'HECBioSim/Crambin': (145.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (60.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (7.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (3.0, None, None, 'ns/day'), + }, + 'zen2': { + 'HECBioSim/Crambin': (355.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (210.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (31.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), + }, + }, + 4: { + 'sm_60': { + 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (20.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), + }, + 'broadwell': { + 'HECBioSim/Crambin': (160.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (90.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (14.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (5.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (3.0, None, None, 'ns/day'), + }, + 'zen2': { + 'HECBioSim/Crambin': (340.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (230.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (56.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (25.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (11.0, None, None, 'ns/day'), + }, + }, 6: { 'sm_60': { - 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (25.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (7.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (180.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (20.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (4.0, None, None, 'ns/day'), }, 'zen2': { - 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (240.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (75.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (33.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (13.0, None, None, 'ns/day'), + }, + }, + 8: { + 'sm_60': { + 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (140.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (28.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (14.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (8.0, None, None, 'ns/day'), + }, + 'broadwell': { + 'HECBioSim/Crambin': (240.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (110.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (25.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), + }, + 'zen2': { + 'HECBioSim/Glutamine-Binding-Protein': (250.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (80.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (43.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (20.0, None, None, 'ns/day'), }, }, 16: { 'sm_60': { - 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (170.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (40.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (20.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (13.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (160.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (30.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (14.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (8.0, None, None, 'ns/day'), }, 'zen2': { - 'HECBioSim/Crambin': (0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (82.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (49.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (25.0, None, None, 'ns/day'), }, } } @@ -80,11 +159,19 @@ def setup_filtering_criteria(self): # Setup system filtering valid_systems = { 'cpu': { - 6: ['daint:mc', 'dom:mc', 'eiger:mc', 'pilatus:mc'], + 1: ['daint:mc', 'dom:mc', 'eiger:mc', 'pilatus:mc'], + 2: ['daint:mc', 'dom:mc', 'eiger:mc', 'pilatus:mc'], + 4: ['daint:mc', 'dom:mc', 'eiger:mc', 'pilatus:mc'], + 6: ['daint:mc', 'dom:mc', 'eiger:mc', 'pilatus:mc'], + 8: ['daint:mc', 'eiger:mc'], 16: ['daint:mc', 'eiger:mc'] }, 'gpu': { - 6: ['daint:gpu', 'dom:gpu', 'eiger:gpu', 'pilatus:gpu'], + 1: ['daint:gpu', 'dom:gpu', 'eiger:gpu', 'pilatus:gpu'], + 2: ['daint:gpu', 'dom:gpu', 'eiger:gpu', 'pilatus:gpu'], + 4: ['daint:gpu', 'dom:gpu', 'eiger:gpu', 'pilatus:gpu'], + 6: ['daint:gpu', 'dom:gpu', 'eiger:gpu', 'pilatus:gpu'], + 8: ['daint:gpu', 'eiger:gpu'], 16: ['daint:gpu', 'eiger:gpu'] } } @@ -98,7 +185,7 @@ def setup_filtering_criteria(self): self.valid_systems = [] # Setup prog env. filtering - if self.current_system.name in ('eiger', 'pilatus'): + if self.current_system.name in ['eiger', 'pilatus']: self.valid_prog_environs = ['cpeGNU'] self.tags |= {self.mode} @@ -119,6 +206,11 @@ def setup_run(self): if self.current_partition.fullname in ('daint:gpu', 'dom:gpu'): arch = 'sm_60' + try: + found = self.allref[self.num_nodes][arch][self.bench_name] + except KeyError: + self.skip("Test configuration is not supported") + # Setup performance references self.reference = { '*': { @@ -130,49 +222,3 @@ def setup_run(self): self.num_tasks_per_node = proc.num_cores self.num_tasks = self.num_nodes * self.num_tasks_per_node - -# FIXME: Remove the following references -REFERENCE_GPU_PERFORMANCE = { - 'large': { - 'daint:gpu': { - 'maint': (63.0, -0.10, None, 'ns/day'), - 'prod': (63.0, -0.20, None, 'ns/day'), - }, - }, - 'small': { - 'daint:gpu': { - 'prod': (35.0, -0.10, None, 'ns/day'), - }, - 'dom:gpu': { - 'prod': (37.0, -0.05, None, 'ns/day'), - }, - } -} - -REFERENCE_CPU_PERFORMANCE = { - 'large': { - 'daint:mc': { - 'prod': (68.0, -0.20, None, 'ns/day'), - }, - 'eiger:mc': { - 'prod': (146.00, -0.20, None, 'ns/day'), - }, - 'pilatus:mc': { - 'prod': (146.00, -0.20, None, 'ns/day'), - }, - }, - 'small': { - 'daint:mc': { - 'prod': (38.8, -0.10, None, 'ns/day'), - }, - 'dom:mc': { - 'prod': (40.0, -0.05, None, 'ns/day'), - }, - 'eiger:mc': { - 'prod': (103.00, -0.10, None, 'ns/day'), - }, - 'dom:mc': { - 'prod': (103.00, -0.10, None, 'ns/day'), - }, - } -} diff --git a/hpctestlib/sciapps/gromacs/checks.py b/hpctestlib/sciapps/gromacs/checks.py index cec508f2df..0555dac518 100644 --- a/hpctestlib/sciapps/gromacs/checks.py +++ b/hpctestlib/sciapps/gromacs/checks.py @@ -34,11 +34,11 @@ class gromacs_check(rfm.RunOnlyRegressionTest): #: :type: `Tuple[str, float, float]` #: :values: benchmark_info = parameter([ - ('HECBioSim/Crambin', 0.0, 0.0), - ('HECBioSim/Glutamine-Binding-Protein', 0.0, 0.0), - ('HECBioSim/hEGFRDimer', 0.0, 0.0), - ('HECBioSim/hEGFRDimerPair', 0.0, 0.0), - ('HECBioSim/hEGFRtetramerPair', 0.0, 0.0) + ('HECBioSim/Crambin', -204107.0, 0.001), + ('HECBioSim/Glutamine-Binding-Protein', -724598.0, 0.001), + ('HECBioSim/hEGFRDimer', -3.32892e+06, 0.001), + ('HECBioSim/hEGFRDimerPair', -1.20733e+07, 0.001), + ('HECBioSim/hEGFRtetramerPair', -2.09831e+07, 0.001) ]) #: Parameter encoding the implementation of the non-bonded calculations @@ -130,5 +130,6 @@ def assert_energy_readout(self): energy_diff = sn.abs(energy - self.__energy_ref) return sn.all([ sn.assert_found('Finished mdrun', 'md.log'), - sn.assert_lt(energy_diff, self.__energy_tol) + #sn.assert_lt(energy_diff, self.__energy_tol) + sn.assert_reference(energy, self.__energy_ref, -self.__energy_tol, self.__energy_tol) ]) From 963275f9c5aa9dd8ba326f6b92e4632897f49dde Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 16 Nov 2021 22:01:12 +0100 Subject: [PATCH 09/16] Address PR comments --- cscs-checks/apps/gromacs/gromacs_check.py | 9 +++++---- hpctestlib/sciapps/gromacs/checks.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index 706016abaf..870cadc172 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -185,14 +185,15 @@ def setup_filtering_criteria(self): self.valid_systems = [] # Setup prog env. filtering - if self.current_system.name in ['eiger', 'pilatus']: + if self.current_system.name in ('eiger', 'pilatus'): self.valid_prog_environs = ['cpeGNU'] self.tags |= {self.mode} @run_before('run') def setup_run(self): - # self.skip_if_no_procinfo() + self.skip_if_no_procinfo() + # Setup GPU run if self.nb_impl == 'gpu': self.num_gpus_per_node = 1 @@ -209,7 +210,8 @@ def setup_run(self): try: found = self.allref[self.num_nodes][arch][self.bench_name] except KeyError: - self.skip("Test configuration is not supported") + self.skip(f'Configuration with {self.num_nodes} node(s) of ' + f'{self.bench_name!r} is not supported on {self.arch!r}') # Setup performance references self.reference = { @@ -221,4 +223,3 @@ def setup_run(self): # Setup parallel run self.num_tasks_per_node = proc.num_cores self.num_tasks = self.num_nodes * self.num_tasks_per_node - diff --git a/hpctestlib/sciapps/gromacs/checks.py b/hpctestlib/sciapps/gromacs/checks.py index 16bee4c83b..7c2d7442bb 100644 --- a/hpctestlib/sciapps/gromacs/checks.py +++ b/hpctestlib/sciapps/gromacs/checks.py @@ -146,6 +146,6 @@ def assert_energy_readout(self): energy_diff = sn.abs(energy - self.energy_ref) return sn.all([ sn.assert_found('Finished mdrun', 'md.log'), - sn.assert_reference(energy, self.__energy_ref, - -self.__energy_tol, self.__energy_tol) + sn.assert_reference(energy, self.energy_ref, + -self.energy_tol, self.energy_tol) ]) From cc098a7c15ee9649fd7d323acffe23bc96a08ce5 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 16 Nov 2021 22:03:39 +0100 Subject: [PATCH 10/16] Fix PEP8 issues --- cscs-checks/apps/gromacs/gromacs_check.py | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index 870cadc172..926c36a1da 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -27,18 +27,18 @@ class cscs_gromacs_check(gromacs_check): 1: { 'sm_60': { 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (70.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (70.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (7.5, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (3.0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (107.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (36.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (36.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (3.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (320.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (16.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), }, @@ -46,19 +46,19 @@ class cscs_gromacs_check(gromacs_check): 2: { 'sm_60': { 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (13.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (5.0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (145.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (60.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (60.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (7.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (3.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (355.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (210.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (210.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (31.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), }, @@ -66,21 +66,21 @@ class cscs_gromacs_check(gromacs_check): 4: { 'sm_60': { 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (20.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (160.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (90.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (90.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (14.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (5.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (3.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (340.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (230.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (230.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (56.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (25.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (11.0, None, None, 'ns/day'), @@ -89,20 +89,20 @@ class cscs_gromacs_check(gromacs_check): 6: { 'sm_60': { 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (25.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (7.0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (180.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (20.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (4.0, None, None, 'ns/day'), }, 'zen2': { - 'HECBioSim/Glutamine-Binding-Protein': (240.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (240.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (75.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (33.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (13.0, None, None, 'ns/day'), @@ -111,20 +111,20 @@ class cscs_gromacs_check(gromacs_check): 8: { 'sm_60': { 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (140.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (140.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (28.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (14.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (8.0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (240.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (110.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (110.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (25.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), }, 'zen2': { - 'HECBioSim/Glutamine-Binding-Protein': (250.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (250.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (80.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (43.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (20.0, None, None, 'ns/day'), @@ -132,13 +132,13 @@ class cscs_gromacs_check(gromacs_check): }, 16: { 'sm_60': { - 'HECBioSim/Glutamine-Binding-Protein': (170.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (170.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (40.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (20.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (13.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Glutamine-Binding-Protein': (160.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (160.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (30.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (14.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (8.0, None, None, 'ns/day'), From 7a231b6295219c252020199732c4ee610acd352a Mon Sep 17 00:00:00 2001 From: Victor Holanda Rusu Date: Thu, 25 Nov 2021 22:18:47 +0100 Subject: [PATCH 11/16] Add additional test and update perf numbers --- cscs-checks/apps/gromacs/gromacs_check.py | 114 +++++++++++++--------- hpctestlib/sciapps/gromacs/checks.py | 26 +++-- 2 files changed, 86 insertions(+), 54 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index 706016abaf..cb98554fa7 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -26,125 +26,143 @@ class cscs_gromacs_check(gromacs_check): allref = { 1: { 'sm_60': { - 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (70.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (7.5, None, None, 'ns/day'), + 'HECBioSim/Crambin': (195.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (78.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (8.5, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (9.2, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (3.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Crambin': (107.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (36.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (3.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (116.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (38.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (4.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (8.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (320.0, None, None, 'ns/day'), 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimer': (16.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (31.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), }, }, 2: { 'sm_60': { - 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (13.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (5.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (202.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (111.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (15.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (18.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (6.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Crambin': (145.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (60.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (7.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (3.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (65.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (8.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (13.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (4.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (355.0, None, None, 'ns/day'), 'HECBioSim/Glutamine-Binding-Protein': (210.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimer': (31.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (53.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), }, }, 4: { 'sm_60': { 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (20.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (133.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (22.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (28.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (10.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Crambin': (160.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (90.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (14.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (5.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (260.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (111.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (15.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (23.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (3.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (340.0, None, None, 'ns/day'), 'HECBioSim/Glutamine-Binding-Protein': (230.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimer': (56.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (80.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (25.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (11.0, None, None, 'ns/day'), }, }, 6: { 'sm_60': { - 'HECBioSim/Crambin': (170.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (25.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (213.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (142.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (28.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (35.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (7.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (8.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Crambin': (180.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (105.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (20.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (4.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (308.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (127.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (22.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (29.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Glutamine-Binding-Protein': (240.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimer': (75.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (110.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (33.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (13.0, None, None, 'ns/day'), }, }, 8: { 'sm_60': { - 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (140.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (28.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (14.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (8.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (206.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (149.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (37.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (39.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (16.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (9.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Crambin': (240.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (110.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (25.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), + 'HECBioSim/Crambin': (356.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (158.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (28.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (39.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (11.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (6.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Glutamine-Binding-Protein': (250.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimer': (80.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (104.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (43.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (20.0, None, None, 'ns/day'), }, }, 16: { 'sm_60': { - 'HECBioSim/Glutamine-Binding-Protein': (170.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (40.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (20.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (13.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (154.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (43.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (54.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (21.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (14.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Glutamine-Binding-Protein': (160.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimer': (30.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRDimerPair': (14.0, None, None, 'ns/day'), - 'HECBioSim/hEGFRtetramerPair': (8.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (200.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimer': (44.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (54.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerPair': (19.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRtetramerPair': (10.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/hEGFRDimer': (82.0, None, None, 'ns/day'), + 'HECBioSim/hEGFRDimerSmallerPL': (70.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (49.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (25.0, None, None, 'ns/day'), }, diff --git a/hpctestlib/sciapps/gromacs/checks.py b/hpctestlib/sciapps/gromacs/checks.py index 0555dac518..14fbb01229 100644 --- a/hpctestlib/sciapps/gromacs/checks.py +++ b/hpctestlib/sciapps/gromacs/checks.py @@ -25,6 +25,12 @@ class gromacs_check(rfm.RunOnlyRegressionTest): ''' + #: The version of Horovod to use. + #: + #: :type: :class:`str` + #: :default: ``'v0.21.0'`` + benchmark_version = variable(str, value='1.0.0') + #: Parameter pack encoding the benchmark information. #: #: The first element of the tuple refers to the benchmark name, @@ -37,6 +43,7 @@ class gromacs_check(rfm.RunOnlyRegressionTest): ('HECBioSim/Crambin', -204107.0, 0.001), ('HECBioSim/Glutamine-Binding-Protein', -724598.0, 0.001), ('HECBioSim/hEGFRDimer', -3.32892e+06, 0.001), + ('HECBioSim/hEGFRDimerSmallerPL',-3.27080e+06, 0.001), ('HECBioSim/hEGFRDimerPair', -1.20733e+07, 0.001), ('HECBioSim/hEGFRtetramerPair', -2.09831e+07, 0.001) ]) @@ -47,7 +54,7 @@ class gromacs_check(rfm.RunOnlyRegressionTest): #: :values: ``['cpu', 'gpu']`` nb_impl = parameter(['cpu', 'gpu']) - executable = 'gmx_mpi' + executable = 'gmx_mpi mdrun' tags = {'sciapp', 'chemistry'} keep_files = ['md.log'] @@ -56,10 +63,9 @@ def prepare_test(self): self.__bench, self.__energy_ref, self.__energy_tol = self.benchmark_info self.descr = f'GROMACS {self.__bench} benchmark (NB: {self.nb_impl})' self.prerun_cmds = [ - f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/main/{self.__bench}/benchmark.tpr' # noqa: E501 + f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/{self.benchmark_version}/{self.__bench}/benchmark.tpr' # noqa: E501 ] - self.executable_opts = ['mdrun', '-nb', self.nb_impl, - '-s benchmark.tpr'] + self.executable_opts += ['-nb', self.nb_impl, '-s benchmark.tpr'] @property def bench_name(self): @@ -99,6 +105,14 @@ def energy_hecbiosim_hegfrdimer(self): r'\s+Pressure \(bar\)\s+Constr\. rmsd', 'md.log', 'energy', float, item=-1) + @deferrable + def energy_hecbiosim_hegfrdimersmallerpl(self): + return sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' + r'\s+Conserved En\.\s+Temperature\n' + r'(\s+\S+){2}\s+(?P\S+)(\s+\S+){2}\n' + r'\s+Pressure \(bar\)\s+Constr\. rmsd', + 'md.log', 'energy', float, item=-1) + @deferrable def energy_hecbiosim_hegfrdimerpair(self): return sn.extractsingle(r'\s+Potential\s+Kinetic En\.\s+Total Energy' @@ -130,6 +144,6 @@ def assert_energy_readout(self): energy_diff = sn.abs(energy - self.__energy_ref) return sn.all([ sn.assert_found('Finished mdrun', 'md.log'), - #sn.assert_lt(energy_diff, self.__energy_tol) - sn.assert_reference(energy, self.__energy_ref, -self.__energy_tol, self.__energy_tol) + sn.assert_reference(energy, self.__energy_ref, + -self.__energy_tol, self.__energy_tol) ]) From 8d4732501f8166578e395f7ab2fde0cfe273f4a9 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 26 Nov 2021 13:53:08 +0100 Subject: [PATCH 12/16] Address PR comments --- cscs-checks/apps/gromacs/gromacs_check.py | 2 +- docs/hpctestlib.rst | 3 +++ hpctestlib/sciapps/gromacs/{checks.py => benchmarks.py} | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) rename hpctestlib/sciapps/gromacs/{checks.py => benchmarks.py} (97%) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index 0733aed7b1..aeac39a39a 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm -from hpctestlib.sciapps.gromacs.checks import gromacs_check +from hpctestlib.sciapps.gromacs.benchmarks import gromacs_check @rfm.simple_test diff --git a/docs/hpctestlib.rst b/docs/hpctestlib.rst index 133bb34bc5..44215e20ef 100644 --- a/docs/hpctestlib.rst +++ b/docs/hpctestlib.rst @@ -11,6 +11,9 @@ Scientific Applications :members: :show-inheritance: +.. automodule:: hpctestlib.sciapps.gromacs.benchmarks + :members: + :show-inheritance: Data Analytics -------------- diff --git a/hpctestlib/sciapps/gromacs/checks.py b/hpctestlib/sciapps/gromacs/benchmarks.py similarity index 97% rename from hpctestlib/sciapps/gromacs/checks.py rename to hpctestlib/sciapps/gromacs/benchmarks.py index efd6992784..160269ead4 100644 --- a/hpctestlib/sciapps/gromacs/checks.py +++ b/hpctestlib/sciapps/gromacs/benchmarks.py @@ -28,7 +28,7 @@ class gromacs_check(rfm.RunOnlyRegressionTest): #: The version of Horovod to use. #: #: :type: :class:`str` - #: :default: ``'v0.21.0'`` + #: :default: ``'1.0.0'`` benchmark_version = variable(str, value='1.0.0') #: Parameter pack encoding the benchmark information. @@ -43,7 +43,7 @@ class gromacs_check(rfm.RunOnlyRegressionTest): ('HECBioSim/Crambin', -204107.0, 0.001), ('HECBioSim/Glutamine-Binding-Protein', -724598.0, 0.001), ('HECBioSim/hEGFRDimer', -3.32892e+06, 0.001), - ('HECBioSim/hEGFRDimerSmallerPL',-3.27080e+06, 0.001), + ('HECBioSim/hEGFRDimerSmallerPL', -3.27080e+06, 0.001), ('HECBioSim/hEGFRDimerPair', -1.20733e+07, 0.001), ('HECBioSim/hEGFRtetramerPair', -2.09831e+07, 0.001) ]) @@ -63,9 +63,9 @@ def prepare_test(self): self.__bench, self.__nrg_ref, self.__nrg_tol = self.benchmark_info self.descr = f'GROMACS {self.__bench} benchmark (NB: {self.nb_impl})' self.prerun_cmds = [ - f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/{self.benchmark_version}/{self.__bench}/benchmark.tpr' # noqa: E501 + f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/{self.benchmark_version}/{self.__bench}/benchmark.tpr' # noqa: E501 ] - self.executable_opts += ['-nb', self.nb_impl, '-s benchmark.tpr'] + self.executable_opts = ['-nb', self.nb_impl, '-s benchmark.tpr'] @property def bench_name(self): From 1a723b6237b905c36823c8710913e0da7ce411a0 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 26 Nov 2021 15:40:40 +0100 Subject: [PATCH 13/16] Adapt tags and remove modes --- cscs-checks/apps/gromacs/gromacs_check.py | 13 ++++++------- hpctestlib/sciapps/gromacs/benchmarks.py | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index aeac39a39a..7337e0cdce 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -22,7 +22,6 @@ class cscs_gromacs_check(gromacs_check): # CSCS-specific parameterization num_nodes = parameter([1, 2, 4, 6, 8, 16]) - mode = parameter(['maintenance', 'production']) allref = { 1: { 'sm_60': { @@ -172,7 +171,7 @@ class cscs_gromacs_check(gromacs_check): @run_after('init') def setup_filtering_criteria(self): # Update test's description - self.descr += f' ({self.num_nodes} node(s), {self.mode!r} mode)' + self.descr += f' ({self.num_nodes} node(s))' # Setup system filtering valid_systems = { @@ -198,15 +197,15 @@ def setup_filtering_criteria(self): except KeyError: self.valid_systems = [] - # Maintenance mode is not valid for the cpu run - if self.nb_impl == 'cpu' and self.mode == 'maintenance': - self.valid_systems = [] - # Setup prog env. filtering if self.current_system.name in ('eiger', 'pilatus'): self.valid_prog_environs = ['cpeGNU'] - self.tags |= {self.mode} + if self.num_nodes in (6, 16): + self.tags |= {'production'} + if (self.nb_impl == 'gpu' and + self.bench_name == 'HECBioSim/hEGFRDimerSmallerPL'): + self.tags |= {'maintenance'} @run_before('run') def setup_run(self): diff --git a/hpctestlib/sciapps/gromacs/benchmarks.py b/hpctestlib/sciapps/gromacs/benchmarks.py index 160269ead4..4928864c28 100644 --- a/hpctestlib/sciapps/gromacs/benchmarks.py +++ b/hpctestlib/sciapps/gromacs/benchmarks.py @@ -63,8 +63,8 @@ def prepare_test(self): self.__bench, self.__nrg_ref, self.__nrg_tol = self.benchmark_info self.descr = f'GROMACS {self.__bench} benchmark (NB: {self.nb_impl})' self.prerun_cmds = [ - f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/{self.benchmark_version}/{self.__bench}/benchmark.tpr' # noqa: E501 - ] + f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/{self.benchmark_version}/{self.__bench}/benchmark.tpr' # noqa: E501 + ] self.executable_opts = ['-nb', self.nb_impl, '-s benchmark.tpr'] @property From 7ffec82e03622750c06e15505feefd31dbcbc1d3 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 26 Nov 2021 15:44:09 +0100 Subject: [PATCH 14/16] Make PEP8 happy again --- cscs-checks/apps/gromacs/gromacs_check.py | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index 7337e0cdce..1c2e2c99f6 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -26,20 +26,20 @@ class cscs_gromacs_check(gromacs_check): 1: { 'sm_60': { 'HECBioSim/Crambin': (195.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (78.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (78.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (8.5, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (9.2, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (3.0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (116.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (38.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (38.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (4.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (8.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (320.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), # noqa: E501 + 'HECBioSim/Glutamine-Binding-Protein': (120.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (16.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (31.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), @@ -48,21 +48,21 @@ class cscs_gromacs_check(gromacs_check): 2: { 'sm_60': { 'HECBioSim/Crambin': (202.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (111.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (111.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (15.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (18.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (6.0, None, None, 'ns/day'), }, 'broadwell': { 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (65.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (65.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (8.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (13.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (4.0, None, None, 'ns/day'), }, 'zen2': { 'HECBioSim/Crambin': (355.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (210.0, None, None, 'ns/day'), # noqa: E501 + 'HECBioSim/Glutamine-Binding-Protein': (210.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (31.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (53.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), @@ -71,7 +71,7 @@ class cscs_gromacs_check(gromacs_check): 4: { 'sm_60': { 'HECBioSim/Crambin': (200.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (133.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (133.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (22.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (28.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (10.0, None, None, 'ns/day'), @@ -79,7 +79,7 @@ class cscs_gromacs_check(gromacs_check): }, 'broadwell': { 'HECBioSim/Crambin': (260.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (111.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (111.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (15.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (23.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (7.0, None, None, 'ns/day'), @@ -87,7 +87,7 @@ class cscs_gromacs_check(gromacs_check): }, 'zen2': { 'HECBioSim/Crambin': (340.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (230.0, None, None, 'ns/day'), # noqa: E501 + 'HECBioSim/Glutamine-Binding-Protein': (230.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (56.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (80.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (25.0, None, None, 'ns/day'), @@ -97,7 +97,7 @@ class cscs_gromacs_check(gromacs_check): 6: { 'sm_60': { 'HECBioSim/Crambin': (213.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (142.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (142.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (28.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (35.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (13.0, None, None, 'ns/day'), @@ -105,14 +105,14 @@ class cscs_gromacs_check(gromacs_check): }, 'broadwell': { 'HECBioSim/Crambin': (308.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (127.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (127.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (22.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (29.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (9.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (5.0, None, None, 'ns/day'), }, 'zen2': { - 'HECBioSim/Glutamine-Binding-Protein': (240.0, None, None, 'ns/day'), # noqa: E501 + 'HECBioSim/Glutamine-Binding-Protein': (240.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (75.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (110.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (33.0, None, None, 'ns/day'), @@ -122,7 +122,7 @@ class cscs_gromacs_check(gromacs_check): 8: { 'sm_60': { 'HECBioSim/Crambin': (206.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (149.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (149.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (37.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (39.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (16.0, None, None, 'ns/day'), @@ -130,7 +130,7 @@ class cscs_gromacs_check(gromacs_check): }, 'broadwell': { 'HECBioSim/Crambin': (356.0, None, None, 'ns/day'), - 'HECBioSim/Glutamine-Binding-Protein': (158.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (158.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (28.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (39.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (11.0, None, None, 'ns/day'), @@ -146,14 +146,14 @@ class cscs_gromacs_check(gromacs_check): }, 16: { 'sm_60': { - 'HECBioSim/Glutamine-Binding-Protein': (154.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (154.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (43.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (54.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (21.0, None, None, 'ns/day'), 'HECBioSim/hEGFRtetramerPair': (14.0, None, None, 'ns/day'), }, 'broadwell': { - 'HECBioSim/Glutamine-Binding-Protein': (200.0, None, None, 'ns/day'), + 'HECBioSim/Glutamine-Binding-Protein': (200.0, None, None, 'ns/day'), # noqa: E501 'HECBioSim/hEGFRDimer': (44.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerSmallerPL': (54.0, None, None, 'ns/day'), 'HECBioSim/hEGFRDimerPair': (19.0, None, None, 'ns/day'), From c3ce674e44bd8380ed3a36c2c8cf1e5fb047f628 Mon Sep 17 00:00:00 2001 From: Victor Holanda Rusu Date: Mon, 29 Nov 2021 10:07:45 +0100 Subject: [PATCH 15/16] Add documentation to the gromacs lib tests --- cscs-checks/apps/gromacs/gromacs_check.py | 2 +- hpctestlib/sciapps/gromacs/benchmarks.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cscs-checks/apps/gromacs/gromacs_check.py b/cscs-checks/apps/gromacs/gromacs_check.py index 1c2e2c99f6..11e7b3358c 100644 --- a/cscs-checks/apps/gromacs/gromacs_check.py +++ b/cscs-checks/apps/gromacs/gromacs_check.py @@ -228,7 +228,7 @@ def setup_run(self): found = self.allref[self.num_nodes][arch][self.bench_name] except KeyError: self.skip(f'Configuration with {self.num_nodes} node(s) of ' - f'{self.bench_name!r} is not supported on {self.arch!r}') + f'{self.bench_name!r} is not supported on {arch!r}') # Setup performance references self.reference = { diff --git a/hpctestlib/sciapps/gromacs/benchmarks.py b/hpctestlib/sciapps/gromacs/benchmarks.py index 4928864c28..ea19d84c52 100644 --- a/hpctestlib/sciapps/gromacs/benchmarks.py +++ b/hpctestlib/sciapps/gromacs/benchmarks.py @@ -23,6 +23,12 @@ class gromacs_check(rfm.RunOnlyRegressionTest): many groups are also using it for research on non-biological systems, e.g. polymers (see gromacs.org). + The benchmarks consist on a set of different inputs files that vary in the + number of atoms. The original input files are part of the HECBioSim + Benchmark suite (https://www.hecbiosim.ac.uk/access-hpc/benchmarks ). + Each test instance validates numerically its output and extracts and + reports a performance metric. + ''' #: The version of Horovod to use. From 22d1b886b8befb5bc6f1d9ace6c05572eaae8a4b Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Mon, 29 Nov 2021 18:07:31 +0100 Subject: [PATCH 16/16] Fix the documentation --- hpctestlib/sciapps/gromacs/benchmarks.py | 28 ++++++++++-------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/hpctestlib/sciapps/gromacs/benchmarks.py b/hpctestlib/sciapps/gromacs/benchmarks.py index ea19d84c52..51d5a7dd86 100644 --- a/hpctestlib/sciapps/gromacs/benchmarks.py +++ b/hpctestlib/sciapps/gromacs/benchmarks.py @@ -10,28 +10,22 @@ @rfm.simple_test class gromacs_check(rfm.RunOnlyRegressionTest): - '''Base class for the Gromacs Test. + '''GROMACS benchmark test. - GROMACS is a versatile package to perform molecular dynamics, - i.e. simulate the Newtonian equations of motion for systems - with hundreds to millions of particles. - - It is primarily designed for biochemical molecules like proteins, - lipids and nucleic acids that have a lot of complicated bonded - interactions, but since GROMACS is extremely fast at calculating - the nonbonded interactions (that usually dominate simulations) - many groups are also using it for research on non-biological - systems, e.g. polymers (see gromacs.org). + `GROMACS `__ is a versatile package to perform + molecular dynamics, i.e. simulate the Newtonian equations of motion for + systems with hundreds to millions of particles. The benchmarks consist on a set of different inputs files that vary in the - number of atoms. The original input files are part of the HECBioSim - Benchmark suite (https://www.hecbiosim.ac.uk/access-hpc/benchmarks ). + number of atoms and can be found in the following repository, which is + also versioned: https://github.com/victorusu/GROMACS_Benchmark_Suite/. + Each test instance validates numerically its output and extracts and reports a performance metric. ''' - #: The version of Horovod to use. + #: The version of the benchmark suite to use. #: #: :type: :class:`str` #: :default: ``'1.0.0'`` @@ -69,8 +63,8 @@ def prepare_test(self): self.__bench, self.__nrg_ref, self.__nrg_tol = self.benchmark_info self.descr = f'GROMACS {self.__bench} benchmark (NB: {self.nb_impl})' self.prerun_cmds = [ - f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/{self.benchmark_version}/{self.__bench}/benchmark.tpr' # noqa: E501 - ] + f'curl -LJO https://github.com/victorusu/GROMACS_Benchmark_Suite/raw/{self.benchmark_version}/{self.__bench}/benchmark.tpr' # noqa: E501 + ] self.executable_opts = ['-nb', self.nb_impl, '-s benchmark.tpr'] @property @@ -153,7 +147,7 @@ def energy_hecbiosim_hegfrtetramerpair(self): @sanity_function def assert_energy_readout(self): - '''Assert the obtained energy meets the specified tolerances.''' + '''Assert that the obtained energy meets the benchmark tolerances.''' energy_fn_name = f'energy_{util.toalphanum(self.__bench).lower()}' energy_fn = getattr(self, energy_fn_name, None)