From 5feb9e555174da7152611f0d675464204e6a438d Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Wed, 20 Feb 2019 12:07:35 +0100 Subject: [PATCH 1/5] First test (cookbook) for fieldextra --- cscs-checks/mch/fieldextra_check.py | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 cscs-checks/mch/fieldextra_check.py diff --git a/cscs-checks/mch/fieldextra_check.py b/cscs-checks/mch/fieldextra_check.py new file mode 100644 index 0000000000..ba168887fc --- /dev/null +++ b/cscs-checks/mch/fieldextra_check.py @@ -0,0 +1,54 @@ +import os + +import reframe as rfm +import reframe.utility.sanity as sn + + +class FieldextraCheck(rfm.RunOnlyRegressionTest): + def __init__(self, variant): + super().__init__() + self.maintainers = ['Mkr'] + + self.valid_systems = ['kesch:cn'] + self.valid_prog_environs = ['PrgEnv-gnu-nompi'] + self.executable = 'cookbook/run.bash' + if variant == 'opt': + self.modules = ['fieldextra/12.7.5-gmvolf-17.02'] + self.executable_opts = ['-c gnu -m opt'] + else: + self.modules = ['fieldextra/12.7.5-gmvolf-17.02-openmp'] + self.executable_opts = ['-c gnu -m opt_omp'] + self.variables = { + 'OMP_STACKSIZE': '500M', + 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', + } + + + self.num_tasks = 1 + self.num_tasks_per_node = 1 + self.num_cpus_per_task = 24 + self.num_task_per_core = 1 + self.use_multithreading = True + self.strict_check = False + + self.sanity_patterns = sn.assert_found(r'All tests successful', + self.stdout) + +@rfm.parameterized_test(['opt'], ['opt_omp']) +class FieldextraAccuracy(FieldextraCheck): + def __init__(self, variant): + super().__init__(variant) + self.descr = ( + 'Fieldextra validation test (accuracy); MCH' + ) + self.sourcesdir = os.path.join(self.current_system.resourcesdir, + 'Fieldextra', 'cookbook_tests') + self.readonly_files = [ + 'cookbook/support/input', + 'reference_cookbook' + ] + self.pre_run = [ + 'ln -s ${EBROOTFIELDEXTRA}/bin bin', + 'ln -s ${EBROOTFIELDEXTRA}/tools tools', + 'ln -s ${EBROOTFIELDEXTRA}/resources resources', + ] From 23fc1e5c1e26895a176deefa971cf6de75a262f2 Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Thu, 21 Feb 2019 16:55:11 +0100 Subject: [PATCH 2/5] fieldextra tests --- cscs-checks/mch/fieldextra_check.py | 68 ++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 15 deletions(-) diff --git a/cscs-checks/mch/fieldextra_check.py b/cscs-checks/mch/fieldextra_check.py index ba168887fc..34e8dc94f4 100644 --- a/cscs-checks/mch/fieldextra_check.py +++ b/cscs-checks/mch/fieldextra_check.py @@ -5,24 +5,13 @@ class FieldextraCheck(rfm.RunOnlyRegressionTest): - def __init__(self, variant): + def __init__(self): super().__init__() self.maintainers = ['Mkr'] self.valid_systems = ['kesch:cn'] self.valid_prog_environs = ['PrgEnv-gnu-nompi'] self.executable = 'cookbook/run.bash' - if variant == 'opt': - self.modules = ['fieldextra/12.7.5-gmvolf-17.02'] - self.executable_opts = ['-c gnu -m opt'] - else: - self.modules = ['fieldextra/12.7.5-gmvolf-17.02-openmp'] - self.executable_opts = ['-c gnu -m opt_omp'] - self.variables = { - 'OMP_STACKSIZE': '500M', - 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', - } - self.num_tasks = 1 self.num_tasks_per_node = 1 @@ -31,13 +20,11 @@ def __init__(self, variant): self.use_multithreading = True self.strict_check = False - self.sanity_patterns = sn.assert_found(r'All tests successful', - self.stdout) @rfm.parameterized_test(['opt'], ['opt_omp']) class FieldextraAccuracy(FieldextraCheck): def __init__(self, variant): - super().__init__(variant) + super().__init__() self.descr = ( 'Fieldextra validation test (accuracy); MCH' ) @@ -52,3 +39,54 @@ def __init__(self, variant): 'ln -s ${EBROOTFIELDEXTRA}/tools tools', 'ln -s ${EBROOTFIELDEXTRA}/resources resources', ] + + if variant == 'opt': + self.modules = ['fieldextra/12.7.5-gmvolf-17.02'] + self.executable_opts = ['-c gnu -m opt'] + else: + self.modules = ['fieldextra/12.7.5-gmvolf-17.02-openmp'] + self.executable_opts = ['-c gnu -m opt_omp'] + self.variables = { + 'OMP_STACKSIZE': '500M', + 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', + } + + self.sanity_patterns = sn.assert_found(r'All tests successful', + self.stdout) + + +@rfm.simple_test +class FieldextraPerformance(FieldextraCheck): + def __init__(self): + super().__init__() + self.descr = ( + 'Fieldextra validation test (performance); MCH' + ) + self.sourcesdir = os.path.join(self.current_system.resourcesdir, + 'Fieldextra', 'performance') + self.modules = ['fieldextra/12.7.5-gmvolf-17.02-openmp'] + self.executable = 'fieldextra_gnu_opt_omp' + self.executable_opts = ['nl.TC'] + self.readonly_files = [ + '18112900_204', + ] + self.pre_run = [ + 'source create_nl_6h.template' + ] + self.variables = { + 'OMP_STACKSIZE': '500M', + 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', + } + + self.sanity_patterns = sn.assert_found( + r'%INFO fieldextra: Program successfully completed', self.stdout + ) + self.perf_patterns = { + 'perf': sn.extractsingle(r'WALL CLOCK\s*SPEEDUP\D*(?P\S+)', + 'fieldextra.diagnostic', 'perf', float) + } + self.reference = { + 'kesch': { + 'perf': (350., None, 0.20) + } + } From d3791c69409a2897828202d296af260223841da7 Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Thu, 21 Feb 2019 17:01:10 +0100 Subject: [PATCH 3/5] change indentation --- cscs-checks/mch/fieldextra_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cscs-checks/mch/fieldextra_check.py b/cscs-checks/mch/fieldextra_check.py index 34e8dc94f4..7397ca1c21 100644 --- a/cscs-checks/mch/fieldextra_check.py +++ b/cscs-checks/mch/fieldextra_check.py @@ -74,8 +74,8 @@ def __init__(self): 'source create_nl_6h.template' ] self.variables = { - 'OMP_STACKSIZE': '500M', - 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', + 'OMP_STACKSIZE': '500M', + 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', } self.sanity_patterns = sn.assert_found( From 1c89d2b8ba74fcb1c052a6344fcdf58804ca59ca Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Thu, 28 Feb 2019 15:44:32 +0100 Subject: [PATCH 4/5] modifs according to review --- cscs-checks/mch/fieldextra_check.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/cscs-checks/mch/fieldextra_check.py b/cscs-checks/mch/fieldextra_check.py index 7397ca1c21..b0717c8344 100644 --- a/cscs-checks/mch/fieldextra_check.py +++ b/cscs-checks/mch/fieldextra_check.py @@ -4,10 +4,10 @@ import reframe.utility.sanity as sn -class FieldextraCheck(rfm.RunOnlyRegressionTest): +class FieldextraTestBase(rfm.RunOnlyRegressionTest): def __init__(self): super().__init__() - self.maintainers = ['Mkr'] + self.maintainers = ['MKr'] self.valid_systems = ['kesch:cn'] self.valid_prog_environs = ['PrgEnv-gnu-nompi'] @@ -22,12 +22,10 @@ def __init__(self): @rfm.parameterized_test(['opt'], ['opt_omp']) -class FieldextraAccuracy(FieldextraCheck): +class FieldextraAccuracyTest(FieldextraTestBase): def __init__(self, variant): super().__init__() - self.descr = ( - 'Fieldextra validation test (accuracy); MCH' - ) + self.descr = ('Fieldextra validation test (accuracy); MCH') self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'Fieldextra', 'cookbook_tests') self.readonly_files = [ @@ -45,7 +43,7 @@ def __init__(self, variant): self.executable_opts = ['-c gnu -m opt'] else: self.modules = ['fieldextra/12.7.5-gmvolf-17.02-openmp'] - self.executable_opts = ['-c gnu -m opt_omp'] + self.executable_opts = ['-c', 'gnu', '-m', 'opt_omp'] self.variables = { 'OMP_STACKSIZE': '500M', 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', @@ -56,23 +54,17 @@ def __init__(self, variant): @rfm.simple_test -class FieldextraPerformance(FieldextraCheck): +class FieldextraPerformanceTest(FieldextraTestBase): def __init__(self): super().__init__() - self.descr = ( - 'Fieldextra validation test (performance); MCH' - ) + self.descr = ('Fieldextra validation test (performance); MCH') self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'Fieldextra', 'performance') self.modules = ['fieldextra/12.7.5-gmvolf-17.02-openmp'] self.executable = 'fieldextra_gnu_opt_omp' self.executable_opts = ['nl.TC'] - self.readonly_files = [ - '18112900_204', - ] - self.pre_run = [ - 'source create_nl_6h.template' - ] + self.readonly_files = ['18112900_204'] + self.pre_run = ['source create_nl_6h.template'] self.variables = { 'OMP_STACKSIZE': '500M', 'OMP_NUM_THREADS': '$SLURM_CPUS_PER_TASK', @@ -87,6 +79,6 @@ def __init__(self): } self.reference = { 'kesch': { - 'perf': (350., None, 0.20) + 'perf': (420., None, 0.10) } } From 6a7d59f1d75d91670ad2ce6c1dde20b6ea656b88 Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Fri, 1 Mar 2019 06:59:13 +0100 Subject: [PATCH 5/5] adding tag mch; updating descr. --- cscs-checks/mch/fieldextra_check.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cscs-checks/mch/fieldextra_check.py b/cscs-checks/mch/fieldextra_check.py index b0717c8344..b45acd15d6 100644 --- a/cscs-checks/mch/fieldextra_check.py +++ b/cscs-checks/mch/fieldextra_check.py @@ -8,6 +8,7 @@ class FieldextraTestBase(rfm.RunOnlyRegressionTest): def __init__(self): super().__init__() self.maintainers = ['MKr'] + self.tags = {'mch'} self.valid_systems = ['kesch:cn'] self.valid_prog_environs = ['PrgEnv-gnu-nompi'] @@ -25,7 +26,7 @@ def __init__(self): class FieldextraAccuracyTest(FieldextraTestBase): def __init__(self, variant): super().__init__() - self.descr = ('Fieldextra validation test (accuracy); MCH') + self.descr = 'Fieldextra validation test (accuracy - "cookbook")' self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'Fieldextra', 'cookbook_tests') self.readonly_files = [ @@ -57,7 +58,7 @@ def __init__(self, variant): class FieldextraPerformanceTest(FieldextraTestBase): def __init__(self): super().__init__() - self.descr = ('Fieldextra validation test (performance); MCH') + self.descr = 'Fieldextra validation test (performance)' self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'Fieldextra', 'performance') self.modules = ['fieldextra/12.7.5-gmvolf-17.02-openmp']