From a2f5e24b4a5ab65285c44dba61ed72e3f8549af0 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Fri, 25 Jun 2021 17:23:26 +0200 Subject: [PATCH 1/9] Add PrgEnv-nvidia to the tests --- .../microbenchmarks/mpi/osu/osu_tests.py | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index 9adf34cf2a..ac143d27a4 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -21,7 +21,7 @@ def __init__(self, variant): # The -i option sets the number of iterations self.executable_opts = ['-m', '8', '-x', '1000', '-i', '20000'] self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', - 'PrgEnv-intel'] + 'PrgEnv-intel', 'PrgEnv-nvidia'] self.maintainers = ['RS', 'AJ'] self.sanity_patterns = sn.assert_found(r'^8', self.stdout) self.perf_patterns = { @@ -87,7 +87,7 @@ def __init__(self, variant): # The -x option controls the number of warm-up iterations # The -i option controls the number of iterations self.executable_opts = ['-m', '8', '-x', '1000', '-i', '20000'] - self.valid_prog_environs = ['PrgEnv-gnu'] + self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-nvidia'] self.maintainers = ['RS', 'AJ'] self.sanity_patterns = sn.assert_found(r'^8', self.stdout) self.perf_patterns = { @@ -142,7 +142,7 @@ def __init__(self): self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-pgi'] else: self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', - 'PrgEnv-intel'] + 'PrgEnv-intel', 'PrgEnv-nvidia'] self.maintainers = ['RS', 'AJ'] self.tags = {'production', 'benchmark', 'craype'} self.sanity_patterns = sn.assert_found(r'^4194304', self.stdout) @@ -256,17 +256,27 @@ def __init__(self): 'bw': sn.extractsingle(r'^4194304\s+(?P\S+)', self.stdout, 'bw', float) } + + self.build_system.cppflags = ['-D_ENABLE_CUDA_'] + + @rfm.run_before('compile') + def set_modules(self): if self.current_system.name in ['daint', 'dom']: self.num_gpus_per_node = 1 - self.modules = ['craype-accel-nvidia60'] self.variables = {'MPICH_RDMA_ENABLED_CUDA': '1'} + if self.current_environ.name == 'PrgEnv-nvidia': + self.modules = ['cdt-cuda/21.05'] + self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', '-w'] + self.build_system.ldflags = ['-L${NVIDIA_PATH}/cuda/lib64', + '-L${NVIDIA_PATH}/cuda/lib64/stubs', + '-lcuda', '-lcudart'] + else: + self.modules = ['craype-accel-nvidia60'] elif self.current_system.name in ['arolla', 'tsa']: self.modules = ['cuda/10.1.243'] self.build_system.ldflags = ['-L$EBROOTCUDA/lib64', '-lcudart', '-lcuda'] - self.build_system.cppflags = ['-D_ENABLE_CUDA_'] - @rfm.simple_test class G2GLatencyTest(P2PBaseTest): @@ -290,13 +300,23 @@ def __init__(self): 'latency': sn.extractsingle(r'^8\s+(?P\S+)', self.stdout, 'latency', float) } + + self.build_system.cppflags = ['-D_ENABLE_CUDA_'] + + @rfm.run_before('compile') + def set_modules(self): if self.current_system.name in ['daint', 'dom']: self.num_gpus_per_node = 1 - self.modules = ['craype-accel-nvidia60'] self.variables = {'MPICH_RDMA_ENABLED_CUDA': '1'} + if self.current_environ.name == 'PrgEnv-nvidia': + self.modules = ['cdt-cuda/21.05'] + self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', '-w'] + self.build_system.ldflags = ['-L${NVIDIA_PATH}/cuda/lib64', + '-L${NVIDIA_PATH}/cuda/lib64/stubs', + '-lcuda', '-lcudart'] + else: + self.modules = ['craype-accel-nvidia60'] elif self.current_system.name in ['arolla', 'tsa']: self.modules = ['cuda/10.1.243'] self.build_system.ldflags = ['-L$EBROOTCUDA/lib64', '-lcudart', '-lcuda'] - - self.build_system.cppflags = ['-D_ENABLE_CUDA_'] From 2743d7d93f83585d26863f9debb58f15422672ef Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Fri, 25 Jun 2021 18:36:44 +0200 Subject: [PATCH 2/9] update AlltoallTest --- .../microbenchmarks/mpi/osu/osu_tests.py | 89 +++++++++++-------- 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index ac143d27a4..d3ddaac4e3 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -3,51 +3,66 @@ # # SPDX-License-Identifier: BSD-3-Clause +from reframe.core.decorators import run_after import reframe as rfm import reframe.utility.sanity as sn -@rfm.parameterized_test(['production']) +@rfm.simple_test class AlltoallTest(rfm.RegressionTest): - def __init__(self, variant): - self.strict_check = False - self.valid_systems = ['daint:gpu', 'dom:gpu'] - self.descr = 'Alltoall OSU microbenchmark' - self.build_system = 'Make' - self.build_system.makefile = 'Makefile_alltoall' - self.executable = './osu_alltoall' - # The -m option sets the maximum message size - # The -x option sets the number of warm-up iterations - # The -i option sets the number of iterations - self.executable_opts = ['-m', '8', '-x', '1000', '-i', '20000'] - self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', - 'PrgEnv-intel', 'PrgEnv-nvidia'] - self.maintainers = ['RS', 'AJ'] - self.sanity_patterns = sn.assert_found(r'^8', self.stdout) - self.perf_patterns = { - 'latency': sn.extractsingle(r'^8\s+(?P\S+)', - self.stdout, 'latency', float) + variant = parameter(['production']) + strict_check = False + valid_systems = ['daint:gpu', 'dom:gpu'] + descr = 'Alltoall OSU microbenchmark' + build_system = 'Make' + executable = './osu_alltoall' + # The -m option sets the maximum message size + # The -x option sets the number of warm-up iterations + # The -i option sets the number of iterations + executable_opts = ['-m', '8', '-x', '1000', '-i', '20000'] + valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', + 'PrgEnv-intel', 'PrgEnv-nvidia'] + maintainers = ['RS', 'AJ'] + reference = { + 'dom:gpu': { + 'latency': (8.23, None, 0.1, 'us') + }, + 'daint:gpu': { + 'latency': (20.73, None, 2.0, 'us') } - self.tags = {variant, 'benchmark', 'craype'} - self.reference = { - 'dom:gpu': { - 'latency': (8.23, None, 0.1, 'us') - }, - 'daint:gpu': { - 'latency': (20.73, None, 2.0, 'us') - } + } + num_tasks_per_node = 1 + num_gpus_per_node = 1 + extra_resources = { + 'switches': { + 'num_switches': 1 } - self.num_tasks_per_node = 1 - self.num_gpus_per_node = 1 + } + @run_after('init') + def set_tags(self): + self.tags = {self.variant, 'benchmark', 'craype'} + + @run_before('compile') + def set_makefile(self): + self.build_system.makefile = 'Makefile_alltoall' + + + @run_before('run') + def set_num_tasks(self): if self.current_system.name == 'daint': self.num_tasks = 16 else: self.num_tasks = 6 - self.extra_resources = { - 'switches': { - 'num_switches': 1 - } + @run_before('sanity') + def set_sanity(self): + self.sanity_patterns = sn.assert_found(r'^8', self.stdout) + + @run_before('performance') + def set_performance_patterns(self): + self.perf_patterns = { + 'latency': sn.extractsingle(r'^8\s+(?P\S+)', + self.stdout, 'latency', float) } @@ -72,8 +87,10 @@ def __init__(self): self.tags = {'diagnostic', 'ops', 'benchmark', 'craype'} -@rfm.parameterized_test(['small'], ['large']) +@rfm.simple_test class AllreduceTest(rfm.RegressionTest): + variant = parameter(['small'], ['large']) + def __init__(self, variant): self.strict_check = False self.valid_systems = ['daint:gpu', 'daint:mc'] @@ -259,7 +276,7 @@ def __init__(self): self.build_system.cppflags = ['-D_ENABLE_CUDA_'] - @rfm.run_before('compile') + @run_before('compile') def set_modules(self): if self.current_system.name in ['daint', 'dom']: self.num_gpus_per_node = 1 @@ -303,7 +320,7 @@ def __init__(self): self.build_system.cppflags = ['-D_ENABLE_CUDA_'] - @rfm.run_before('compile') + @run_before('compile') def set_modules(self): if self.current_system.name in ['daint', 'dom']: self.num_gpus_per_node = 1 From 76c7c2ea9b074b87de0df85de83bd0ba3f68be80 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Fri, 25 Jun 2021 18:46:58 +0200 Subject: [PATCH 3/9] Update FlexAlltoallTest to the new syntax --- .../microbenchmarks/mpi/osu/osu_tests.py | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index d3ddaac4e3..beec7babd8 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -38,6 +38,7 @@ class AlltoallTest(rfm.RegressionTest): 'num_switches': 1 } } + @run_after('init') def set_tags(self): self.tags = {self.variant, 'benchmark', 'craype'} @@ -46,7 +47,6 @@ def set_tags(self): def set_makefile(self): self.build_system.makefile = 'Makefile_alltoall' - @run_before('run') def set_num_tasks(self): if self.current_system.name == 'daint': @@ -68,23 +68,30 @@ def set_performance_patterns(self): @rfm.simple_test class FlexAlltoallTest(rfm.RegressionTest): - def __init__(self): - self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', - 'arolla:cn', 'arolla:pn', 'tsa:cn', 'tsa:pn'] - self.valid_prog_environs = ['PrgEnv-cray'] + valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', + 'arolla:cn', 'arolla:pn', 'tsa:cn', 'tsa:pn'] + valid_prog_environs = ['PrgEnv-cray'] + descr = 'Flexible Alltoall OSU test' + build_system = 'Make' + executable = './osu_alltoall' + maintainers = ['RS', 'AJ'] + num_tasks_per_node = 1 + num_tasks = 0 + tags = {'diagnostic', 'ops', 'benchmark', 'craype'} + + @run_after('init') + def add_prog_environ(self): if self.current_system.name in ['arolla', 'tsa']: self.exclusive_access = True self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-pgi'] - self.descr = 'Flexible Alltoall OSU test' - self.build_system = 'Make' + @run_before('compile') + def set_makefile(self): self.build_system.makefile = 'Makefile_alltoall' - self.executable = './osu_alltoall' - self.maintainers = ['RS', 'AJ'] - self.num_tasks_per_node = 1 - self.num_tasks = 0 + + @run_before('sanity') + def set_sanity(self): self.sanity_patterns = sn.assert_found(r'^1048576', self.stdout) - self.tags = {'diagnostic', 'ops', 'benchmark', 'craype'} @rfm.simple_test From f245180e7831784a5e991f5fe54e3cc1f6ce2a91 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Mon, 28 Jun 2021 08:55:35 +0200 Subject: [PATCH 4/9] Update AllreduceTest to the new syntax --- .../microbenchmarks/mpi/osu/osu_tests.py | 65 +++++++++++-------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index beec7babd8..18f9357582 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -97,30 +97,46 @@ def set_sanity(self): @rfm.simple_test class AllreduceTest(rfm.RegressionTest): variant = parameter(['small'], ['large']) + strict_check = False + valid_systems = ['daint:gpu', 'daint:mc'] + descr = 'Allreduce OSU microbenchmark' + build_system = 'Make' + executable = './osu_allreduce' + # The -x option controls the number of warm-up iterations + # The -i option controls the number of iterations + executable_opts = ['-m', '8', '-x', '1000', '-i', '20000'] + valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-nvidia'] + maintainers = ['RS', 'AJ'] + tags = {'production', 'benchmark', 'craype'} + num_tasks_per_node = 1 + num_gpus_per_node = 1 + extra_resources = { + 'switches': { + 'num_switches': 1 + } + } - def __init__(self, variant): - self.strict_check = False - self.valid_systems = ['daint:gpu', 'daint:mc'] - if variant == 'small': + # def __init__(self, variant): + @run_after('init') + def add_valid_systems(self): + if self.variant == 'small': self.valid_systems += ['dom:gpu', 'dom:mc'] - self.descr = 'Allreduce OSU microbenchmark' - self.build_system = 'Make' + @run_before('compile') + def set_makefile(self): self.build_system.makefile = 'Makefile_allreduce' - self.executable = './osu_allreduce' - # The -x option controls the number of warm-up iterations - # The -i option controls the number of iterations - self.executable_opts = ['-m', '8', '-x', '1000', '-i', '20000'] - self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-nvidia'] - self.maintainers = ['RS', 'AJ'] + + @run_before('run') + def set_num_tasks(self): + self.num_tasks = 6 if self.variant == 'small' else 16 + + @run_before('sanity') + def set_sanity(self): self.sanity_patterns = sn.assert_found(r'^8', self.stdout) - self.perf_patterns = { - 'latency': sn.extractsingle(r'^8\s+(?P\S+)', - self.stdout, 'latency', float) - } - self.tags = {'production', 'benchmark', 'craype'} - if variant == 'small': - self.num_tasks = 6 + + @run_before('performance') + def set_performance_patterns(self): + if self.variant == 'small': self.reference = { 'dom:gpu': { 'latency': (5.67, None, 0.05, 'us') @@ -133,7 +149,6 @@ def __init__(self, variant): } } else: - self.num_tasks = 16 self.reference = { 'daint:gpu': { 'latency': (13.62, None, 1.16, 'us') @@ -142,13 +157,9 @@ def __init__(self, variant): 'latency': (19.07, None, 1.64, 'us') } } - - self.num_tasks_per_node = 1 - self.num_gpus_per_node = 1 - self.extra_resources = { - 'switches': { - 'num_switches': 1 - } + self.perf_patterns = { + 'latency': sn.extractsingle(r'^8\s+(?P\S+)', + self.stdout, 'latency', float) } From 0e47b6510a5414384a26ef7ccf0faa3edd431a61 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Mon, 28 Jun 2021 09:03:16 +0200 Subject: [PATCH 5/9] Update P2PBaseTest to the new syntax --- .../microbenchmarks/mpi/osu/osu_tests.py | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index 18f9357582..ff4b299fd0 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -116,7 +116,6 @@ class AllreduceTest(rfm.RegressionTest): } } - # def __init__(self, variant): @run_after('init') def add_valid_systems(self): if self.variant == 'small': @@ -164,29 +163,36 @@ def set_performance_patterns(self): class P2PBaseTest(rfm.RegressionTest): - def __init__(self): - self.exclusive_access = True - self.strict_check = False - self.num_tasks = 2 - self.num_tasks_per_node = 1 - self.descr = 'P2P microbenchmark' - self.build_system = 'Make' - self.build_system.makefile = 'Makefile_p2p' + exclusive_access = True + strict_check = False + num_tasks = 2 + num_tasks_per_node = 1 + descr = 'P2P microbenchmark' + build_system = 'Make' + maintainers = ['RS', 'AJ'] + tags = {'production', 'benchmark', 'craype'} + extra_resources = { + 'switches': { + 'num_switches': 1 + } + } + + @run_after('init') + def add_valid_systems(self): if self.current_system.name in ['arolla', 'tsa']: self.exclusive_access = True self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-pgi'] else: self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', 'PrgEnv-intel', 'PrgEnv-nvidia'] - self.maintainers = ['RS', 'AJ'] - self.tags = {'production', 'benchmark', 'craype'} - self.sanity_patterns = sn.assert_found(r'^4194304', self.stdout) - self.extra_resources = { - 'switches': { - 'num_switches': 1 - } - } + @run_before('compile') + def set_makefile(self): + self.build_system.makefile = 'Makefile_p2p' + + @run_before('sanity') + def set_sanity(self): + self.sanity_patterns = sn.assert_found(r'^4194304', self.stdout) @rfm.simple_test From 04be679ee67f97a1778ab2a423f88483c6f333fe Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Mon, 28 Jun 2021 09:38:24 +0200 Subject: [PATCH 6/9] Update tests to the new syntax --- .../microbenchmarks/mpi/osu/osu_tests.py | 198 +++++++++--------- 1 file changed, 103 insertions(+), 95 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index ff4b299fd0..84c635645b 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -178,7 +178,7 @@ class P2PBaseTest(rfm.RegressionTest): } @run_after('init') - def add_valid_systems(self): + def add_valid_prog_environs(self): if self.current_system.name in ['arolla', 'tsa']: self.exclusive_access = True self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-pgi'] @@ -197,36 +197,37 @@ def set_sanity(self): @rfm.simple_test class P2PCPUBandwidthTest(P2PBaseTest): - def __init__(self): - super().__init__() - self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', - 'arolla:cn', 'tsa:cn', 'eiger:mc', 'pilatus:mc'] - self.executable = './p2p_osu_bw' - self.executable_opts = ['-x', '100', '-i', '1000'] - self.reference = { - 'daint:gpu': { - 'bw': (9607.0, -0.10, None, 'MB/s') - }, - 'daint:mc': { - 'bw': (9649.0, -0.10, None, 'MB/s') - }, - 'dom:gpu': { - 'bw': (9476.3, -0.05, None, 'MB/s') - }, - 'dom:mc': { - 'bw': (9528.0, -0.20, None, 'MB/s') - }, - 'eiger:mc': { - 'bw': (12240.0, -0.10, None, 'MB/s') - }, - 'pilatus:mc': { - 'bw': (12240.0, -0.10, None, 'MB/s') - }, - # keeping as reference: - # 'monch:compute': { - # 'bw': (6317.84, -0.15, None, 'MB/s') - # }, - } + valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', + 'arolla:cn', 'tsa:cn', 'eiger:mc', 'pilatus:mc'] + executable = './p2p_osu_bw' + executable_opts = ['-x', '100', '-i', '1000'] + reference = { + 'daint:gpu': { + 'bw': (9607.0, -0.10, None, 'MB/s') + }, + 'daint:mc': { + 'bw': (9649.0, -0.10, None, 'MB/s') + }, + 'dom:gpu': { + 'bw': (9476.3, -0.05, None, 'MB/s') + }, + 'dom:mc': { + 'bw': (9528.0, -0.20, None, 'MB/s') + }, + 'eiger:mc': { + 'bw': (12240.0, -0.10, None, 'MB/s') + }, + 'pilatus:mc': { + 'bw': (12240.0, -0.10, None, 'MB/s') + }, + # keeping as reference: + # 'monch:compute': { + # 'bw': (6317.84, -0.15, None, 'MB/s') + # }, + } + + @run_before('performance') + def set_performance_patterns(self): self.perf_patterns = { 'bw': sn.extractsingle(r'^4194304\s+(?P\S+)', self.stdout, 'bw', float) @@ -235,36 +236,37 @@ def __init__(self): @rfm.simple_test class P2PCPULatencyTest(P2PBaseTest): - def __init__(self): - super().__init__() - self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', - 'arolla:cn', 'tsa:cn', 'eiger:mc', 'pilatus:mc'] - self.executable_opts = ['-x', '100', '-i', '1000'] - - self.executable = './p2p_osu_latency' - self.reference = { - 'daint:gpu': { - 'latency': (1.30, None, 0.70, 'us') - }, - 'daint:mc': { - 'latency': (1.61, None, 0.85, 'us') - }, - 'dom:gpu': { - 'latency': (1.138, None, 0.10, 'us') - }, - 'dom:mc': { - 'latency': (1.24, None, 0.15, 'us') - }, - 'eiger:mc': { - 'latency': (2.33, None, 0.15, 'us') - }, - 'pilatus:mc': { - 'latency': (2.33, None, 0.15, 'us') - }, - # keeping as reference: - # 'monch:compute': { - # 'latency': (1.27, None, 0.1, 'us') - # }, + executable = './p2p_osu_latency' + reference = { + 'daint:gpu': { + 'latency': (1.30, None, 0.70, 'us') + }, + 'daint:mc': { + 'latency': (1.61, None, 0.85, 'us') + }, + 'dom:gpu': { + 'latency': (1.138, None, 0.10, 'us') + }, + 'dom:mc': { + 'latency': (1.24, None, 0.15, 'us') + }, + 'eiger:mc': { + 'latency': (2.33, None, 0.15, 'us') + }, + 'pilatus:mc': { + 'latency': (2.33, None, 0.15, 'us') + }, + # keeping as reference: + # 'monch:compute': { + # 'latency': (1.27, None, 0.1, 'us') + # }, + } + + @run_before('performance') + def set_performance_patterns(self): + self.perf_patterns = { + 'bw': sn.extractsingle(r'^4194304\s+(?P\S+)', + self.stdout, 'bw', float) } self.perf_patterns = { 'latency': sn.extractsingle(r'^8\s+(?P\S+)', @@ -274,30 +276,33 @@ def __init__(self): @rfm.simple_test class G2GBandwidthTest(P2PBaseTest): - def __init__(self): - super().__init__() - self.valid_systems = ['daint:gpu', 'dom:gpu', 'arolla:cn', 'tsa:cn'] - self.num_gpus_per_node = 1 - self.executable = './p2p_osu_bw' - self.executable_opts = ['-x', '100', '-i', '1000', '-d', - 'cuda', 'D', 'D'] - - self.reference = { - 'dom:gpu': { - 'bw': (8813.09, -0.05, None, 'MB/s') - }, - 'daint:gpu': { - 'bw': (8765.65, -0.1, None, 'MB/s') - }, - '*': { - 'bw': (0, None, None, 'MB/s') - } + valid_systems = ['daint:gpu', 'dom:gpu', 'arolla:cn', 'tsa:cn'] + num_gpus_per_node = 1 + executable = './p2p_osu_bw' + executable_opts = ['-x', '100', '-i', '1000', '-d', + 'cuda', 'D', 'D'] + + reference = { + 'dom:gpu': { + 'bw': (8813.09, -0.05, None, 'MB/s') + }, + 'daint:gpu': { + 'bw': (8765.65, -0.1, None, 'MB/s') + }, + '*': { + 'bw': (0, None, None, 'MB/s') } + } + + @run_before('performance') + def set_performance_patterns(self): self.perf_patterns = { 'bw': sn.extractsingle(r'^4194304\s+(?P\S+)', self.stdout, 'bw', float) } + @run_before('compile') + def set_cpp_flags(self): self.build_system.cppflags = ['-D_ENABLE_CUDA_'] @run_before('compile') @@ -321,27 +326,30 @@ def set_modules(self): @rfm.simple_test class G2GLatencyTest(P2PBaseTest): - def __init__(self): - super().__init__() - self.valid_systems = ['daint:gpu', 'dom:gpu', 'arolla:cn', 'tsa:cn'] - self.num_gpus_per_node = 1 - self.executable = './p2p_osu_latency' - self.executable_opts = ['-x', '100', '-i', '1000', '-d', - 'cuda', 'D', 'D'] - - self.reference = { - 'dom:gpu': { - 'latency': (5.56, None, 0.1, 'us') - }, - 'daint:gpu': { - 'latency': (6.8, None, 0.65, 'us') - }, - } + valid_systems = ['daint:gpu', 'dom:gpu', 'arolla:cn', 'tsa:cn'] + num_gpus_per_node = 1 + executable = './p2p_osu_latency' + executable_opts = ['-x', '100', '-i', '1000', '-d', + 'cuda', 'D', 'D'] + + reference = { + 'dom:gpu': { + 'latency': (5.56, None, 0.1, 'us') + }, + 'daint:gpu': { + 'latency': (6.8, None, 0.65, 'us') + }, + } + + @run_before('performance') + def set_performance_patterns(self): self.perf_patterns = { 'latency': sn.extractsingle(r'^8\s+(?P\S+)', self.stdout, 'latency', float) } + @run_before('compile') + def set_cpp_flags(self): self.build_system.cppflags = ['-D_ENABLE_CUDA_'] @run_before('compile') From 10c9976854b70f8b558f8f8f0f321ceb90ed1b80 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Mon, 28 Jun 2021 12:58:00 +0200 Subject: [PATCH 7/9] Fix comments --- .../microbenchmarks/mpi/osu/osu_tests.py | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index 84c635645b..0dd8df5f46 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: BSD-3-Clause -from reframe.core.decorators import run_after import reframe as rfm import reframe.utility.sanity as sn @@ -21,7 +20,7 @@ class AlltoallTest(rfm.RegressionTest): # The -i option sets the number of iterations executable_opts = ['-m', '8', '-x', '1000', '-i', '20000'] valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', - 'PrgEnv-intel', 'PrgEnv-nvidia'] + 'PrgEnv-intel', 'PrgEnv-nvidia'] maintainers = ['RS', 'AJ'] reference = { 'dom:gpu': { @@ -312,10 +311,13 @@ def set_modules(self): self.variables = {'MPICH_RDMA_ENABLED_CUDA': '1'} if self.current_environ.name == 'PrgEnv-nvidia': self.modules = ['cdt-cuda/21.05'] - self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', '-w'] - self.build_system.ldflags = ['-L${NVIDIA_PATH}/cuda/lib64', - '-L${NVIDIA_PATH}/cuda/lib64/stubs', - '-lcuda', '-lcudart'] + self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', + '-w'] + self.build_system.ldflags = [ + '-L${NVIDIA_PATH}/cuda/lib64', + '-L${NVIDIA_PATH}/cuda/lib64/stubs', + '-lcuda', '-lcudart' + ] else: self.modules = ['craype-accel-nvidia60'] elif self.current_system.name in ['arolla', 'tsa']: @@ -330,7 +332,7 @@ class G2GLatencyTest(P2PBaseTest): num_gpus_per_node = 1 executable = './p2p_osu_latency' executable_opts = ['-x', '100', '-i', '1000', '-d', - 'cuda', 'D', 'D'] + 'cuda', 'D', 'D'] reference = { 'dom:gpu': { @@ -359,10 +361,13 @@ def set_modules(self): self.variables = {'MPICH_RDMA_ENABLED_CUDA': '1'} if self.current_environ.name == 'PrgEnv-nvidia': self.modules = ['cdt-cuda/21.05'] - self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', '-w'] - self.build_system.ldflags = ['-L${NVIDIA_PATH}/cuda/lib64', - '-L${NVIDIA_PATH}/cuda/lib64/stubs', - '-lcuda', '-lcudart'] + self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', + '-w'] + self.build_system.ldflags = [ + '-L${NVIDIA_PATH}/cuda/lib64', + '-L${NVIDIA_PATH}/cuda/lib64/stubs', + '-lcuda', '-lcudart' + ] else: self.modules = ['craype-accel-nvidia60'] elif self.current_system.name in ['arolla', 'tsa']: From 8665fc558a3b0c43306aa472a554eaecdea89362 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Mon, 28 Jun 2021 14:20:25 +0200 Subject: [PATCH 8/9] Load cudatoolkit/21.3_11.2 instead of cdt-cuda --- .../microbenchmarks/mpi/osu/osu_tests.py | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index 0dd8df5f46..0f33cb42bb 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -235,6 +235,8 @@ def set_performance_patterns(self): @rfm.simple_test class P2PCPULatencyTest(P2PBaseTest): + valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc', + 'arolla:cn', 'tsa:cn', 'eiger:mc', 'pilatus:mc'] executable = './p2p_osu_latency' reference = { 'daint:gpu': { @@ -310,14 +312,7 @@ def set_modules(self): self.num_gpus_per_node = 1 self.variables = {'MPICH_RDMA_ENABLED_CUDA': '1'} if self.current_environ.name == 'PrgEnv-nvidia': - self.modules = ['cdt-cuda/21.05'] - self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', - '-w'] - self.build_system.ldflags = [ - '-L${NVIDIA_PATH}/cuda/lib64', - '-L${NVIDIA_PATH}/cuda/lib64/stubs', - '-lcuda', '-lcudart' - ] + self.modules = [ 'cudatoolkit/21.3_11.2'] else: self.modules = ['craype-accel-nvidia60'] elif self.current_system.name in ['arolla', 'tsa']: @@ -360,14 +355,7 @@ def set_modules(self): self.num_gpus_per_node = 1 self.variables = {'MPICH_RDMA_ENABLED_CUDA': '1'} if self.current_environ.name == 'PrgEnv-nvidia': - self.modules = ['cdt-cuda/21.05'] - self.build_system.cppflags += ['-I$NVIDIA_PATH/cuda/include', - '-w'] - self.build_system.ldflags = [ - '-L${NVIDIA_PATH}/cuda/lib64', - '-L${NVIDIA_PATH}/cuda/lib64/stubs', - '-lcuda', '-lcudart' - ] + self.modules = ['cudatoolkit/21.3_11.2'] else: self.modules = ['craype-accel-nvidia60'] elif self.current_system.name in ['arolla', 'tsa']: From 31f74aa77b4e77c929aeb70ac536cad1a32dfa3d Mon Sep 17 00:00:00 2001 From: Javier Otero Date: Mon, 28 Jun 2021 17:32:31 +0200 Subject: [PATCH 9/9] Style fix --- cscs-checks/microbenchmarks/mpi/osu/osu_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py index 0f33cb42bb..c66a047daf 100644 --- a/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py +++ b/cscs-checks/microbenchmarks/mpi/osu/osu_tests.py @@ -312,7 +312,7 @@ def set_modules(self): self.num_gpus_per_node = 1 self.variables = {'MPICH_RDMA_ENABLED_CUDA': '1'} if self.current_environ.name == 'PrgEnv-nvidia': - self.modules = [ 'cudatoolkit/21.3_11.2'] + self.modules = ['cudatoolkit/21.3_11.2'] else: self.modules = ['craype-accel-nvidia60'] elif self.current_system.name in ['arolla', 'tsa']: