33#
44# SPDX-License-Identifier: BSD-3-Clause
55
6+ import os
7+
68import reframe as rfm
9+ import reframe .utility .os_ext as os_ext
710import reframe .utility .sanity as sn
811
912
@@ -18,6 +21,7 @@ def __init__(self, linkage):
1821 # NOTE: PrgEnv-cray_classic does not support trilinos
1922 if linkage == 'static' :
2023 self .valid_prog_environs += ['PrgEnv-cray' ]
24+ self .linkage = linkage
2125
2226 self .build_system = 'SingleSource'
2327 self .build_system .ldflags = ['-%s' % linkage , '-lparmetis' ]
@@ -49,3 +53,28 @@ def __init__(self, linkage):
4953 def set_cxxflags (self ):
5054 flags = self .prgenv_flags [self .current_environ .name ]
5155 self .build_system .cxxflags = flags
56+
57+ @rfm .run_before ('compile' )
58+ def cdt2006_workaround_intel (self ):
59+ if (self .current_environ .name == 'PrgEnv-intel' and
60+ os_ext .cray_cdt_version () == '20.06' ):
61+ self .modules += ['cray-netcdf-hdf5parallel' ]
62+ self .prebuild_cmds = [
63+ 'ln -s $CRAY_NETCDF_HDF5PARALLEL_PREFIX/lib/pkgconfig/'
64+ 'netcdf-cxx4_parallel.pc netcdf_c++4_parallel.pc'
65+ ]
66+ self .variables ['PKG_CONFIG_PATH' ] = '.:$PKG_CONFIG_PATH'
67+
68+ @rfm .run_before ('compile' )
69+ def cdt2006_workaround_dynamic (self ):
70+ if (os_ext .cray_cdt_version () == '20.06' and
71+ self .linkage == 'dynamic' and
72+ self .current_environ .name == 'PrgEnv-gnu' ):
73+ self .variables ['PATH' ] = (
74+ '/opt/cray/pe/cce/10.0.1/cce-clang/x86_64/bin:$PATH'
75+ )
76+ self .prgenv_flags [self .current_environ .name ] += ['-fuse-ld=lld' ]
77+
78+ # GCC >= 9 is required for the above option; our CUDA-friendly CDT
79+ # uses GCC 8 as default.
80+ self .modules += ['gcc/9.3.0' ]
0 commit comments