From e716e9137bab09aae739dc4ccc51328175e373a6 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Fri, 28 Jun 2019 13:43:40 +0200 Subject: [PATCH 1/2] Adapt OpenMP flags for CCE 9.0.x --- cscs-checks/prgenv/helloworld.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cscs-checks/prgenv/helloworld.py b/cscs-checks/prgenv/helloworld.py index 9b91db1938..fd41fbd714 100644 --- a/cscs-checks/prgenv/helloworld.py +++ b/cscs-checks/prgenv/helloworld.py @@ -130,7 +130,9 @@ def __init__(self, lang, linkage): self.sourcepath += '_openmp.' + lang self.descr += ' OpenMP ' + str.capitalize(linkage) self.prgenv_flags = { - 'PrgEnv-cray': ['-homp'], + 'PrgEnv-cray': (['-fopenmp'] if lang != 'f90' and + self.current_system.name in {'daint', 'dom'} else + ['-homp']), 'PrgEnv-gnu': ['-fopenmp'], 'PrgEnv-intel': ['-qopenmp'], 'PrgEnv-pgi': ['-mp'] @@ -184,7 +186,9 @@ def __init__(self, lang, linkage): self.sourcepath += '_mpi_openmp.' + lang self.descr += ' MPI + OpenMP ' + linkage.capitalize() self.prgenv_flags = { - 'PrgEnv-cray': ['-homp'], + 'PrgEnv-cray': (['-fopenmp'] if lang != 'f90' and + self.current_system.name in {'daint', 'dom'} else + ['-homp']), 'PrgEnv-gnu': ['-fopenmp'], 'PrgEnv-intel': ['-qopenmp'], 'PrgEnv-pgi': ['-mp'] From 8808f62b623e625e89680aae7fb4f159ddcf0359 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Thu, 4 Jul 2019 11:43:43 +0200 Subject: [PATCH 2/2] Address PR comments --- cscs-checks/prgenv/helloworld.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/cscs-checks/prgenv/helloworld.py b/cscs-checks/prgenv/helloworld.py index fd41fbd714..0f4491df21 100644 --- a/cscs-checks/prgenv/helloworld.py +++ b/cscs-checks/prgenv/helloworld.py @@ -20,8 +20,8 @@ def __init__(self, variant, lang, linkage): self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', 'kesch:cn', 'leone:normal'] - self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', - 'PrgEnv-intel', 'PrgEnv-pgi'] + self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-cray_classic', + 'PrgEnv-gnu', 'PrgEnv-intel', 'PrgEnv-pgi'] if self.current_system.name == 'kesch': self.exclusive_access = True @@ -93,6 +93,12 @@ def compile(self): self.compilation_time_seconds = ( datetime.now() - self.compilation_time_seconds).total_seconds() + def cray_omp_flags(self, lang): + if lang != 'f90' and self.current_system.name in {'daint', 'dom'}: + return ['-fopenmp'] + + return ['-homp'] + @rfm.required_version('>=2.14') @rfm.parameterized_test(*([lang, linkage] @@ -106,6 +112,7 @@ def __init__(self, lang, linkage, **kwargs): self.descr += ' Serial ' + linkage.capitalize() self.prgenv_flags = { 'PrgEnv-cray': [], + 'PrgEnv-cray_classic': [], 'PrgEnv-gnu': [], 'PrgEnv-intel': [], 'PrgEnv-pgi': [] @@ -130,9 +137,8 @@ def __init__(self, lang, linkage): self.sourcepath += '_openmp.' + lang self.descr += ' OpenMP ' + str.capitalize(linkage) self.prgenv_flags = { - 'PrgEnv-cray': (['-fopenmp'] if lang != 'f90' and - self.current_system.name in {'daint', 'dom'} else - ['-homp']), + 'PrgEnv-cray': self.cray_omp_flags(lang), + 'PrgEnv-cray_classic': ['-homp'], 'PrgEnv-gnu': ['-fopenmp'], 'PrgEnv-intel': ['-qopenmp'], 'PrgEnv-pgi': ['-mp'] @@ -163,6 +169,7 @@ def __init__(self, lang, linkage): self.descr += ' MPI ' + linkage.capitalize() self.prgenv_flags = { 'PrgEnv-cray': [], + 'PrgEnv-cray_classic': [], 'PrgEnv-gnu': [], 'PrgEnv-intel': [], 'PrgEnv-pgi': [] @@ -186,9 +193,8 @@ def __init__(self, lang, linkage): self.sourcepath += '_mpi_openmp.' + lang self.descr += ' MPI + OpenMP ' + linkage.capitalize() self.prgenv_flags = { - 'PrgEnv-cray': (['-fopenmp'] if lang != 'f90' and - self.current_system.name in {'daint', 'dom'} else - ['-homp']), + 'PrgEnv-cray': self.cray_omp_flags(lang), + 'PrgEnv-cray_classic': ['-homp'], 'PrgEnv-gnu': ['-fopenmp'], 'PrgEnv-intel': ['-qopenmp'], 'PrgEnv-pgi': ['-mp']