From d65afcd931a9ee8f1763c560af43bf4c3fccd591 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Thu, 11 Oct 2018 10:52:08 +0200 Subject: [PATCH 1/2] Adapt IOR checks to build systems --- cscs-checks/system/io/ior_check.py | 114 ++++++++++++++--------------- 1 file changed, 56 insertions(+), 58 deletions(-) diff --git a/cscs-checks/system/io/ior_check.py b/cscs-checks/system/io/ior_check.py index 649e3361c6..f80d1b3924 100644 --- a/cscs-checks/system/io/ior_check.py +++ b/cscs-checks/system/io/ior_check.py @@ -1,15 +1,13 @@ import os -import reframe.utility.sanity as sn -from reframe.core.pipeline import RegressionTest +import reframe as rfm +import reframe.utility.sanity as sn -class IorCheck(RegressionTest): - def __init__(self, name, fs_mount_point, **kwargs): - super().__init__('%s_%s' % (name, os.path.basename(fs_mount_point)), - os.path.dirname(__file__), **kwargs) +class IorCheck(rfm.RegressionTest): + def __init__(self, fs_mount_point): + super().__init__() self.descr = 'IOR check (%s)' % fs_mount_point - self.tags = {'ops', fs_mount_point} if fs_mount_point == '/scratch/snx1600': self.valid_systems = ['daint:gpu'] @@ -55,9 +53,11 @@ def __init__(self, name, fs_mount_point, **kwargs): self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'IOR') self.executable = os.path.join('src', 'C', 'IOR') + self.build_system = 'Make' + self.build_system.options = ['posix', 'mpiio'] + self.build_system.max_concurrency = 1 self.num_gpus_per_node = 0 self.fs_mount_point = fs_mount_point - self.maintainers = ['SO', 'MP'] self.fs_reference = { '/scratch/snx1600': { 'read_bw': (64326, -0.2, None), @@ -103,22 +103,30 @@ def __init__(self, name, fs_mount_point, **kwargs): '*': self.fs_reference[self.fs_mount_point] } - def compile(self): - super().compile(options='posix mpiio') + self.maintainers = ['SO', 'MP'] + self.tags = {'ops', fs_mount_point} +@rfm.parameterized_test(['/scratch/snx1600', 'MPIIO'], + ['/scratch/snx1600tds', 'MPIIO'], + ['/scratch/snx2000', 'MPIIO'], + ['/scratch/snx2000tds', 'MPIIO'], + ['/scratch/snx3000', 'MPIIO'], + ['/users', 'POSIX'], + ['/apps', 'POSIX']) class IorReadCheck(IorCheck): - def __init__(self, fs_mount_point, ior_type, **kwargs): - super().__init__('ior_read_check', fs_mount_point, **kwargs) - + def __init__(self, fs_mount_point, ior_type): + super().__init__(fs_mount_point) self.test_file = os.path.join(self.fs_mount_point, '.ior', 'read', 'ior_write.dat') if ior_type == 'MPIIO': - self.executable_opts = ('-r -a MPIIO -B -E -F -t 64m -b 32g ' - '-D 300 -k -o %s' % self.test_file).split() + self.executable_opts = ['-r', '-a MPIIO', '-B', '-E', '-F', + '-t 64m', '-b 32g', '-D 300', '-k', + ' -o %s' % self.test_file] elif ior_type == 'POSIX': - self.executable_opts = ('-r -a POSIX -B -E -F -t 1m -b 100m -D 60 ' - '-k -o %s' % self.test_file).split() + self.executable_opts = ['-r', '-a POSIX', '-B', '-E', '-F', + '-t 1m', '-b 100m', '-D 60', '-k', + '-o %s' % self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Read: ', self.stdout) self.perf_patterns = { @@ -129,17 +137,26 @@ def __init__(self, fs_mount_point, ior_type, **kwargs): self.tags |= {'read'} +@rfm.parameterized_test(['/scratch/snx1600', 'MPIIO'], + ['/scratch/snx1600tds', 'MPIIO'], + ['/scratch/snx2000', 'MPIIO'], + ['/scratch/snx2000tds', 'MPIIO'], + ['/scratch/snx3000', 'MPIIO'], + ['/users', 'POSIX'], + ['/apps', 'POSIX']) class IorWriteCheck(IorCheck): - def __init__(self, fs_mount_point, ior_type, **kwargs): - super().__init__('ior_write_check', fs_mount_point, **kwargs) + def __init__(self, fs_mount_point, ior_type): + super().__init__(fs_mount_point) self.test_file = os.path.join(self.fs_mount_point, '.ior', 'write', 'ior_write.dat') if ior_type == 'MPIIO': - self.executable_opts = ('-w -a MPIIO -B -E -F -t 64m -b 46g ' - '-D 300 -o %s' % self.test_file).split() + self.executable_opts = ['-w', '-a MPIIO', '-B', '-E', '-F', + '-t 64m', '-b 46g', '-D 300', + '-o %s' % self.test_file] elif ior_type == 'POSIX': - self.executable_opts = ('-w -a POSIX -B -E -F -t 1m -b 100m -D 60 ' - ' -o %s' % self.test_file).split() + self.executable_opts = ['-w', '-a POSIX', '-B', '-E', '-F', + '-t 1m', '-b 100m', '-D 60' + '-o %s' % self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Write: ', self.stdout) self.perf_patterns = { @@ -151,8 +168,8 @@ def __init__(self, fs_mount_point, ior_type, **kwargs): class IoMonchAcceptanceBase(IorCheck): - def __init__(self, name, fs_mount_point, ior_type, num_tasks, **kwargs): - super().__init__(name, fs_mount_point, **kwargs) + def __init__(self, fs_mount_point, ior_type, num_tasks): + super().__init__(fs_mount_point) self.test_file = os.path.join(self.fs_mount_point, os.getenv('USER'), 'ior_write.dat') self.valid_systems = ['monch:compute'] @@ -179,13 +196,15 @@ def __init__(self, name, fs_mount_point, ior_type, num_tasks, **kwargs): self.tags = {'monch_acceptance'} +@rfm.parameterized_test(*(['/mnt/lnec', 'MPIIO', task] + for task in [40, 80, 160])) class IorReadScratchMonchAcceptanceCheck(IoMonchAcceptanceBase): - def __init__(self, fs_mount_point, ior_type, num_tasks, **kwargs): - super().__init__('ior_read_check_monch_%s_tasks' % num_tasks, - fs_mount_point, ior_type, num_tasks, **kwargs) + def __init__(self, fs_mount_point, ior_type, num_tasks): + super().__init__(fs_mount_point, ior_type, num_tasks) if ior_type == 'MPIIO': - self.executable_opts = ('-r -a MPIIO -B -E -F -t 16m -b 8g ' - '-D 10 -k -o %s' % self.test_file).split() + self.executable_opts = ['-r', '-a MPIIO', '-B', '-E', '-F', + '-t 16m', '-b 8g', '-D 10', '-k', + '-o %s' % self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Read: ', self.stdout) self.perf_patterns = { 'read_bw': sn.extractsingle( @@ -195,13 +214,15 @@ def __init__(self, fs_mount_point, ior_type, num_tasks, **kwargs): self.tags |= {'read'} +@rfm.parameterized_test(*(['/mnt/lnec', 'MPIIO', task] + for task in [40, 80, 160])) class IorWriteScratchMonchAcceptanceCheck(IoMonchAcceptanceBase): - def __init__(self, fs_mount_point, ior_type, num_tasks, **kwargs): - super().__init__('ior_write_check_monch_%s_tasks' % num_tasks, - fs_mount_point, ior_type, num_tasks, **kwargs) + def __init__(self, fs_mount_point, ior_type, num_tasks): + super().__init__(fs_mount_point, ior_type, num_tasks) if ior_type == 'MPIIO': - self.executable_opts = ('-w -a MPIIO -B -E -F -t 16m -b 8g ' - '-o %s' % self.test_file).split() + self.executable_opts = ['-w', '-a MPIIO', '-B', '-E', '-F', + '-t 16m', '-b 8g', + '-o %s' % self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Write: ', self.stdout) self.perf_patterns = { 'write_bw': sn.extractsingle( @@ -209,26 +230,3 @@ def __init__(self, fs_mount_point, ior_type, num_tasks, **kwargs): 'write_bw', float) } self.tags |= {'write'} - - -def _get_checks(**kwargs): - ret = [IorReadCheck('/scratch/snx1600', 'MPIIO', **kwargs), - IorReadCheck('/scratch/snx1600tds', 'MPIIO', **kwargs), - IorReadCheck('/scratch/snx2000', 'MPIIO', **kwargs), - IorReadCheck('/scratch/snx2000tds', 'MPIIO', **kwargs), - IorReadCheck('/scratch/snx3000', 'MPIIO', **kwargs), - IorReadCheck('/users', 'POSIX', **kwargs), - IorReadCheck('/apps', 'POSIX', **kwargs), - IorWriteCheck('/scratch/snx1600', 'MPIIO', **kwargs), - IorWriteCheck('/scratch/snx1600tds', 'MPIIO', **kwargs), - IorWriteCheck('/scratch/snx2000', 'MPIIO', **kwargs), - IorWriteCheck('/scratch/snx2000tds', 'MPIIO', **kwargs), - IorWriteCheck('/scratch/snx3000', 'MPIIO', **kwargs), - IorWriteCheck('/users', 'POSIX', **kwargs), - IorWriteCheck('/apps', 'POSIX', **kwargs)] - for tasks in [40, 80, 160]: - ret.append(IorWriteScratchMonchAcceptanceCheck( - '/mnt/lnec', 'MPIIO', tasks, **kwargs)) - ret.append(IorReadScratchMonchAcceptanceCheck( - '/mnt/lnec', 'MPIIO', tasks, **kwargs)) - return ret From 686ca78da68001a1c7b32ab978ffb721c1d2f483 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Thu, 11 Oct 2018 13:02:55 +0200 Subject: [PATCH 2/2] Address PR comments --- cscs-checks/system/io/ior_check.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/cscs-checks/system/io/ior_check.py b/cscs-checks/system/io/ior_check.py index f80d1b3924..953a00efb6 100644 --- a/cscs-checks/system/io/ior_check.py +++ b/cscs-checks/system/io/ior_check.py @@ -8,6 +8,7 @@ class IorCheck(rfm.RegressionTest): def __init__(self, fs_mount_point): super().__init__() self.descr = 'IOR check (%s)' % fs_mount_point + self.tags = {'ops', fs_mount_point} if fs_mount_point == '/scratch/snx1600': self.valid_systems = ['daint:gpu'] @@ -50,8 +51,7 @@ def __init__(self, fs_mount_point): self.valid_systems = ['monch:compute'] self.valid_prog_environs = ['PrgEnv-cray'] - self.sourcesdir = os.path.join(self.current_system.resourcesdir, - 'IOR') + self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'IOR') self.executable = os.path.join('src', 'C', 'IOR') self.build_system = 'Make' self.build_system.options = ['posix', 'mpiio'] @@ -104,7 +104,6 @@ def __init__(self, fs_mount_point): } self.maintainers = ['SO', 'MP'] - self.tags = {'ops', fs_mount_point} @rfm.parameterized_test(['/scratch/snx1600', 'MPIIO'], @@ -122,11 +121,11 @@ def __init__(self, fs_mount_point, ior_type): if ior_type == 'MPIIO': self.executable_opts = ['-r', '-a MPIIO', '-B', '-E', '-F', '-t 64m', '-b 32g', '-D 300', '-k', - ' -o %s' % self.test_file] + '-o', self.test_file] elif ior_type == 'POSIX': self.executable_opts = ['-r', '-a POSIX', '-B', '-E', '-F', '-t 1m', '-b 100m', '-D 60', '-k', - '-o %s' % self.test_file] + '-o', self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Read: ', self.stdout) self.perf_patterns = { @@ -152,11 +151,11 @@ def __init__(self, fs_mount_point, ior_type): if ior_type == 'MPIIO': self.executable_opts = ['-w', '-a MPIIO', '-B', '-E', '-F', '-t 64m', '-b 46g', '-D 300', - '-o %s' % self.test_file] + '-o', self.test_file] elif ior_type == 'POSIX': self.executable_opts = ['-w', '-a POSIX', '-B', '-E', '-F', '-t 1m', '-b 100m', '-D 60' - '-o %s' % self.test_file] + '-o', self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Write: ', self.stdout) self.perf_patterns = { @@ -196,15 +195,15 @@ def __init__(self, fs_mount_point, ior_type, num_tasks): self.tags = {'monch_acceptance'} -@rfm.parameterized_test(*(['/mnt/lnec', 'MPIIO', task] - for task in [40, 80, 160])) +@rfm.parameterized_test(*(['/mnt/lnec', 'MPIIO', num_tasks] + for num_tasks in [40, 80, 160])) class IorReadScratchMonchAcceptanceCheck(IoMonchAcceptanceBase): def __init__(self, fs_mount_point, ior_type, num_tasks): super().__init__(fs_mount_point, ior_type, num_tasks) if ior_type == 'MPIIO': self.executable_opts = ['-r', '-a MPIIO', '-B', '-E', '-F', '-t 16m', '-b 8g', '-D 10', '-k', - '-o %s' % self.test_file] + '-o', self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Read: ', self.stdout) self.perf_patterns = { 'read_bw': sn.extractsingle( @@ -214,15 +213,14 @@ def __init__(self, fs_mount_point, ior_type, num_tasks): self.tags |= {'read'} -@rfm.parameterized_test(*(['/mnt/lnec', 'MPIIO', task] - for task in [40, 80, 160])) +@rfm.parameterized_test(*(['/mnt/lnec', 'MPIIO', num_tasks] + for num_tasks in [40, 80, 160])) class IorWriteScratchMonchAcceptanceCheck(IoMonchAcceptanceBase): def __init__(self, fs_mount_point, ior_type, num_tasks): super().__init__(fs_mount_point, ior_type, num_tasks) if ior_type == 'MPIIO': self.executable_opts = ['-w', '-a MPIIO', '-B', '-E', '-F', - '-t 16m', '-b 8g', - '-o %s' % self.test_file] + '-t 16m', '-b 8g', '-o', self.test_file] self.sanity_patterns = sn.assert_found(r'^Max Write: ', self.stdout) self.perf_patterns = { 'write_bw': sn.extractsingle(