|
5 | 5 | @rfm.required_version('>=2.14') |
6 | 6 | @rfm.parameterized_test(['dynamic'], ['static']) |
7 | 7 | class PetscPoisson2DCheck(rfm.RegressionTest): |
8 | | - def __init__(self, variant): |
9 | | - super().__init__() |
| 8 | + def __init__(self, linkage): |
10 | 9 | self.descr = ('Compile/run PETSc 2D Poisson example with cray-petsc ' |
11 | | - '(%s linking)') % variant |
| 10 | + '(%s linking)') % linkage |
12 | 11 | self.valid_systems = ['daint:gpu', 'daint:mc', |
13 | 12 | 'dom:gpu', 'dom:mc', 'tiger:gpu'] |
14 | | - self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', |
15 | | - 'PrgEnv-intel'] |
| 13 | + self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu'] |
| 14 | + if linkage == 'dynamic': |
| 15 | + # FIXME: static compilation yields a link error in case of |
| 16 | + # PrgEnv-intel (Cray Bug #255701) |
| 17 | + self.valid_prog_environs += ['PrgEnv-intel'] |
| 18 | + |
16 | 19 | self.sourcepath = 'poisson2d.c' |
17 | 20 | self.modules = ['cray-petsc'] |
18 | 21 | self.num_tasks = 16 |
19 | 22 | self.num_tasks_per_node = 8 |
20 | 23 | self.build_system = 'SingleSource' |
21 | | - if variant == 'dynamic': |
22 | | - self.build_system.cflags = ['-dynamic'] |
23 | | - |
| 24 | + self.variables = {'CRAYPE_LINK_TYPE': linkage} |
24 | 25 | self.executable_opts = ['-da_grid_x 4', '-da_grid_y 4', '-ksp_monitor'] |
25 | 26 |
|
26 | 27 | # Check the final residual norm for convergence |
27 | 28 | norm = sn.extractsingle(r'\s+\d+\s+KSP Residual norm\s+(?P<norm>\S+)', |
28 | 29 | self.stdout, 'norm', float, -1) |
29 | 30 | self.sanity_patterns = sn.assert_lt(norm, 1.0e-5) |
30 | | - |
31 | 31 | self.tags = {'production', 'craype'} |
32 | 32 | self.maintainers = ['AJ', 'CB'] |
0 commit comments