Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 27 additions & 35 deletions cscs-checks/libraries/math/trilinos_compile_run.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
import os
import reframe.utility.sanity as sn

from reframe.core.pipeline import RegressionTest

import reframe as rfm
import reframe.utility.sanity as sn

class TrilinosTest(RegressionTest):
def __init__(self, linkage, **kwargs):
super().__init__('trilinos_compile_run_%s' % linkage,
os.path.dirname(__file__), **kwargs)

self.flags = ' -DHAVE_MPI -DEPETRA_MPI -lparmetis -%s ' % linkage
self.prgenv_flags = {
'PrgEnv-cray': ' -homp -hstd=c++11 -hmsglevel_4 ',
'PrgEnv-gnu': ' -fopenmp -std=c++11 -w -fpermissive ',
'PrgEnv-intel': ' -qopenmp -w -std=c++11 ',
'PrgEnv-pgi': ' -mp -w '
}
self.descr = 'Trilinos ' + linkage.capitalize()
self.sourcepath = 'example_AmesosFactory_HB.cpp'
#self.sourcepath = 'trilinos_compile_run.cpp'
self.input_file = os.path.join(self.current_system.resourcesdir,
'Trilinos', 'trilinos_compile_run.rua')

self.executable_opts = self.input_file.split()
@rfm.parameterized_test(['static'], ['dynamic'])
class TrilinosTest(rfm.RegressionTest):
def __init__(self, linkage):
super().__init__()
self.valid_systems = ['daint:gpu', 'daint:mc',
'dom:gpu', 'dom:mc']

# Removed CRAY env in dynamic because of CrayBug/809265
# NOTE: PrgEnv-cray in dynamic does not work because of CrayBug/809265
if linkage == 'dynamic':
self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-intel']
elif linkage == 'static':
else:
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu',
'PrgEnv-intel']

self.build_system = 'SingleSource'
self.build_system.ldflags = ['-%s' % linkage, '-lparmetis']
self.build_system.cppflags = ['-DHAVE_MPI', '-DEPETRA_MPI']
self.prgenv_flags = {
'PrgEnv-cray': ['-homp', '-hstd=c++11', '-hmsglevel_4'],
'PrgEnv-gnu': ['-fopenmp', '-std=c++11', '-w', '-fpermissive'],
'PrgEnv-intel': ['-qopenmp', '-w', '-std=c++11'],
'PrgEnv-pgi': ['-mp', '-w']
}
self.sourcepath = 'example_AmesosFactory_HB.cpp'
input_file = os.path.join(self.current_system.resourcesdir,
'Trilinos', 'trilinos_compile_run.rua')
self.executable_opts = [input_file]

# NOTE: default cray-trilinos module in PE/18.08 does not work
self.modules = ['cray-mpich', 'cray-hdf5-parallel',
'cray-tpsl', 'cray-trilinos']
'cray-tpsl', 'cray-trilinos/12.12.1.1']
self.num_tasks = 2
self.num_tasks_per_node = 2
self.variables = {'OMP_NUM_THREADS': '1'}
Expand All @@ -45,18 +45,10 @@ def __init__(self, linkage, **kwargs):
self.tags = {'production'}

def setup(self, partition, environ, **job_opts):
prgenv_flags = self.prgenv_flags[environ.name]
self.build_system.cxxflags = prgenv_flags
if environ.name == 'PrgEnv-intel':
# CrayBug/836679
self.modules += ['gcc/4.9.3']
self.modules += ['gcc']

super().setup(partition, environ, **job_opts)

def compile(self):
prgenv_flags = self.prgenv_flags[self.current_environ.name]
self.current_environ.cxxflags = self.flags + prgenv_flags
super().compile()


def _get_checks(**kwargs):
return [TrilinosTest('dynamic', **kwargs),
TrilinosTest('static', **kwargs)]