forked from reframe-hpc/reframe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample4.py
More file actions
32 lines (28 loc) · 1.23 KB
/
Copy pathexample4.py
File metadata and controls
32 lines (28 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import reframe as rfm
import reframe.utility.sanity as sn
@rfm.simple_test
class Example4Test(rfm.RegressionTest):
def __init__(self):
self.descr = 'Matrix-vector multiplication example with OpenACC'
self.valid_systems = ['daint:gpu']
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi']
self.sourcepath = 'example_matrix_vector_multiplication_openacc.c'
self.build_system = 'SingleSource'
self.executable_opts = ['1024', '100']
self.modules = ['craype-accel-nvidia60']
self.num_gpus_per_node = 1
self.prgenv_flags = {
'PrgEnv-cray': ['-hacc', '-hnoomp'],
'PrgEnv-pgi': ['-acc', '-ta=tesla:cc60']
}
self.sanity_patterns = sn.assert_found(
r'time for single matrix vector multiplication', self.stdout)
self.maintainers = ['you-can-type-your-email-here']
self.tags = {'tutorial'}
@rfm.run_before('compile')
def setflags(self):
self.build_system.cflags = self.prgenv_flags[self.current_environ.name]