Skip to content

Commit

Permalink
Merge branch 'main' into jfavre-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
teojgo authored Apr 17, 2024
2 parents 884ac56 + a044288 commit b96d5fd
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 27 deletions.
3 changes: 2 additions & 1 deletion checks/apps/namd/namd_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def setup_parallel_run(self):
# On Eiger a no-smp NAMD version is the default
if self.current_system.name in ['eiger', 'pilatus']:
self.executable_opts = ['+idlepoll', 'stmv.namd']
self.num_cpus_per_task = 2
else:
self.executable_opts = ['+idlepoll', '+ppn 71', 'stmv.namd']
self.num_cpus_per_task = 72
Expand Down Expand Up @@ -122,7 +123,7 @@ def set_reference(self):
self.reference = {
'daint:mc': {'days_ns': (0.425, None, 0.10, 'days/ns')},
'eiger:mc': {'days_ns': (0.057, None, 0.05, 'days/ns')},
'pilatus:mc': {'days_ns': (0.054, None, 0.05, 'days/ns')}
'pilatus:mc': {'days_ns': (0.054, None, 0.10, 'days/ns')}
}

@performance_function('days/ns')
Expand Down
89 changes: 63 additions & 26 deletions checks/system/io/ior_check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2023 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# Copyright 2016 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
Expand All @@ -10,16 +10,62 @@
import reframe.utility.sanity as sn


class IorCheck(rfm.RegressionTest):
class fetch_ior_benchmarks(rfm.RunOnlyRegressionTest):
descr = 'Fetch IOR benchmarks'
version = variable(str, value='4.0.0')
executable = 'wget'
executable_opts = [
f'https://github.com/hpc/ior/releases/download/{version}/ior-{version}.tar.gz' # noqa: E501
]

@sanity_function
def validate_download(self):
return sn.assert_eq(self.job.exitcode, 0)


class build_ior_benchmarks(rfm.CompileOnlyRegressionTest):
descr = 'Build IOR benchmarks'
build_system = 'Autotools'
build_prefix = variable(str)
ior_benchmarks = fixture(fetch_ior_benchmarks, scope='session')

# Build on the remote system for consistency
build_locally = False

@run_after('init')
def load_cray_module(self):
if self.current_system.name in ['eiger', 'pilatus']:
self.modules = ['cray']

@run_before('compile')
def prepare_build(self):
tarball = f'ior-{self.ior_benchmarks.version}.tar.gz'
self.build_prefix = tarball[:-7]
fullpath = os.path.join(self.ior_benchmarks.stagedir, tarball)
self.prebuild_cmds = [
f'cp {fullpath} {self.stagedir}',
f'tar xzf {tarball}',
f'cd {self.build_prefix}'
]

# FIXME this will not be needed in a ReFrame release including:
# https://github.com/reframe-hpc/reframe/pull/3157
@sanity_function
def validate_build(self):
return True


class IorCheck(rfm.RunOnlyRegressionTest):
base_dir = parameter(['/capstor/scratch/cscs',
'/scratch/snx3000tds',
'/scratch/snx3000',
'/scratch/shared/fulen',
'/users'])
username = getpass.getuser()
time_limit = '5m'
maintainers = ['SO', 'GLR']
tags = {'ops', 'production', 'external-resources'}
ior_binaries = fixture(build_ior_benchmarks, scope='environment')
maintainers = ['SO', 'TM']
tags = {'ops', 'production'}

@run_after('init')
def set_description(self):
Expand Down Expand Up @@ -108,20 +154,11 @@ def set_valid_systems(self):
self.num_tasks = self.fs[self.base_dir][cur_sys].get('num_tasks', 1)
self.num_tasks_per_node = tpn

self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'IOR')

@run_after('init')
def load_cray_module(self):
if self.current_system.name in ['eiger', 'pilatus']:
self.modules = ['cray']

@run_before('compile')
def prepare_build(self):
self.build_system = 'Make'
self.build_system.options = ['posix', 'mpiio']
self.build_system.max_concurrency = 1
self.num_gpus_per_node = 0

@run_before('run')
def prepare_run(self):
# Default umask is 0022, which generates file permissions -rw-r--r--
Expand All @@ -131,30 +168,34 @@ def prepare_run(self):
test_file = os.path.join(test_dir,
f'.ior.{self.current_partition.name}')
self.prerun_cmds = [f'mkdir -p {test_dir}']
self.executable = os.path.join('src', 'C', 'IOR')
self.executable = os.path.join(
self.ior_binaries.stagedir,
self.ior_binaries.build_prefix,
'src', 'ior'
)

# executable options depends on the file system
block_size = self.fs[self.base_dir]['ior_block_size']
access_type = self.fs[self.base_dir]['ior_access_type']
self.executable_opts = ['-B', '-F', '-C ', '-Q 1', '-t 4m', '-D 30',
self.executable_opts = ['-F', '-C ', '-Q 1', '-t 4m', '-D 30',
'-b', block_size, '-a', access_type,
'-o', test_file]
'-o', test_file, '--posix.odirect']

@sanity_function
def assert_finished(self):
return sn.assert_found(r'^Finished\s+:', self.stdout)


@rfm.simple_test
class IorWriteCheck(IorCheck):
executable_opts += ['-w', '-k']
tags |= {'write'}

@sanity_function
def assert_output(self):
return sn.assert_found(r'^Max Write: ', self.stdout)

@run_after('init')
def set_perf_patterns(self):
self.perf_patterns = {
'write_bw': sn.extractsingle(
r'^Max Write:\s+(?P<write_bw>\S+) MiB/sec', self.stdout,
r'^Operation(.*\n)*^write\s+(?P<write_bw>\S+)', self.stdout,
'write_bw', float)
}

Expand All @@ -164,15 +205,11 @@ class IorReadCheck(IorCheck):
executable_opts += ['-r']
tags |= {'read'}

@sanity_function
def assert_output(self):
return sn.assert_found(r'^Max Read: ', self.stdout)

@run_after('init')
def set_perf_patterns(self):
self.perf_patterns = {
'read_bw': sn.extractsingle(
r'^Max Read:\s+(?P<read_bw>\S+) MiB/sec', self.stdout,
r'^Operation(.*\n)*^read\s+(?P<read_bw>\S+)', self.stdout,
'read_bw', float)
}

Expand Down

0 comments on commit b96d5fd

Please sign in to comment.