Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Adapt the LAMMPS test to PE18.08 #502

Merged
merged 2 commits into from
Oct 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 27 additions & 35 deletions cscs-checks/apps/lammps/lammps_check.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import os
vkarak marked this conversation as resolved.
Show resolved Hide resolved

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']

Expand All @@ -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
Expand All @@ -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)
vkarak marked this conversation as resolved.
Show resolved Hide resolved
},
'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
Expand All @@ -103,10 +99,10 @@ 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.reference = {
'dom:mc': {
'perf': (4454.0, -0.05, None)
Expand All @@ -116,8 +112,4 @@ def __init__(self, **kwargs):
},
}


def _get_checks(**kwargs):
return [LAMMPSGPUMaintCheck(**kwargs),
LAMMPSGPUProdCheck(**kwargs),
LAMMPSCPUProdCheck(**kwargs)]
self.tags |= {'production'}