From c793abb4a7c5564f3ee6c096cdca494afb91dc18 Mon Sep 17 00:00:00 2001 From: ajocksch Date: Thu, 24 Jun 2021 14:25:53 +0200 Subject: [PATCH 1/4] automatic_arrays_acc --- cscs-checks/mch/automatic_arrays_acc.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/cscs-checks/mch/automatic_arrays_acc.py b/cscs-checks/mch/automatic_arrays_acc.py index eaaede7c13..b8d04e5c41 100644 --- a/cscs-checks/mch/automatic_arrays_acc.py +++ b/cscs-checks/mch/automatic_arrays_acc.py @@ -12,10 +12,9 @@ class AutomaticArraysCheck(rfm.RegressionTest): def __init__(self): self.valid_systems = ['daint:gpu', 'dom:gpu', 'arolla:cn', 'tsa:cn'] - self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-cce', 'PrgEnv-pgi'] - if self.current_system.name in ['daint', 'dom']: - self.modules = ['craype-accel-nvidia60'] - elif self.current_system.name in ['arolla', 'tsa']: + self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-cce', 'PrgEnv-pgi', + 'PrgEnv-nvidia'] + if self.current_system.name in ['arolla', 'tsa']: self.exclusive_access = True # This tets requires an MPI compiler, although it uses a single task @@ -38,6 +37,10 @@ def __init__(self): 'PrgEnv-pgi': { 'daint:gpu': {'time': (7.5E-05, None, 0.15, 's')}, 'dom:gpu': {'time': (7.5e-05, None, 0.15, 's')}, + }, + 'PrgEnv-nvidia': { + 'daint:gpu': {'time': (7.5E-05, None, 0.15, 's')}, + 'dom:gpu': {'time': (7.5e-05, None, 0.15, 's')}, } } @@ -46,6 +49,13 @@ def __init__(self): @run_before('compile') def setflags(self): + if self.current_system.name in ['daint', 'dom']: + if (not self.current_environ.name.startswith('PrgEnv-nvidia')): + self.modules = ['craype-accel-nvidia60'] + else: + self.build_system.fflags += ['-acc', '-ta=tesla,cc60', + '-Mnorpath'] + if self.current_environ.name.startswith('PrgEnv-cray'): envname = 'PrgEnv-cray' self.build_system.fflags += ['-hacc', '-hnoomp'] From 4d9e3b2f6373ebadabe728f38edcc851c0acb53e Mon Sep 17 00:00:00 2001 From: ajocksch Date: Fri, 25 Jun 2021 18:08:53 +0200 Subject: [PATCH 2/4] no parenthesis --- cscs-checks/mch/automatic_arrays_acc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cscs-checks/mch/automatic_arrays_acc.py b/cscs-checks/mch/automatic_arrays_acc.py index b8d04e5c41..1c11ab3c6a 100644 --- a/cscs-checks/mch/automatic_arrays_acc.py +++ b/cscs-checks/mch/automatic_arrays_acc.py @@ -50,7 +50,7 @@ def __init__(self): @run_before('compile') def setflags(self): if self.current_system.name in ['daint', 'dom']: - if (not self.current_environ.name.startswith('PrgEnv-nvidia')): + if not self.current_environ.name.startswith('PrgEnv-nvidia'): self.modules = ['craype-accel-nvidia60'] else: self.build_system.fflags += ['-acc', '-ta=tesla,cc60', From a8baf8e5a7473e9fa7c12ab1ce0704e890a17057 Mon Sep 17 00:00:00 2001 From: Javier Otero Date: Mon, 28 Jun 2021 09:39:25 +0200 Subject: [PATCH 3/4] Update test syntax --- cscs-checks/mch/automatic_arrays_acc.py | 84 +++++++++++++------------ 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/cscs-checks/mch/automatic_arrays_acc.py b/cscs-checks/mch/automatic_arrays_acc.py index 1c11ab3c6a..4ce02af837 100644 --- a/cscs-checks/mch/automatic_arrays_acc.py +++ b/cscs-checks/mch/automatic_arrays_acc.py @@ -10,45 +10,29 @@ @rfm.simple_test class AutomaticArraysCheck(rfm.RegressionTest): - def __init__(self): - self.valid_systems = ['daint:gpu', 'dom:gpu', 'arolla:cn', 'tsa:cn'] - self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-cce', 'PrgEnv-pgi', - 'PrgEnv-nvidia'] + valid_systems = ['daint:gpu', 'dom:gpu', 'arolla:cn', 'tsa:cn'] + valid_prog_environs = [ + 'PrgEnv-cray', 'PrgEnv-cce', 'PrgEnv-pgi', 'PrgEnv-nvidia' + ] + num_tasks = 1 + num_gpus_per_node = 1 + num_tasks_per_node = 1 + sourcepath = 'automatic_arrays_OpenACC.F90' + build_system = 'SingleSource' + maintainers = ['AJ', 'MKr'] + tags = {'production', 'mch', 'craype'} + envname = variable(str) + + @run_after('setup') + def set_exclusive_access(self): if self.current_system.name in ['arolla', 'tsa']: self.exclusive_access = True + @run_before('compile') + def setflags(self): # This tets requires an MPI compiler, although it uses a single task - self.num_tasks = 1 - self.num_gpus_per_node = 1 - self.num_tasks_per_node = 1 - self.sourcepath = 'automatic_arrays_OpenACC.F90' - self.build_system = 'SingleSource' self.build_system.fflags = ['-O2'] - self.sanity_patterns = sn.assert_found(r'Result: ', self.stdout) - self.perf_patterns = { - 'time': sn.extractsingle(r'Timing:\s+(?P