Skip to content

Commit

Permalink
Merge pull request #751 from teojgo/test/cuda_gdb_nvprof_fix
Browse files Browse the repository at this point in the history
[test] Fix ldflags for `nvprof`, `cuda_gdb` tests
  • Loading branch information
vkarak committed Apr 11, 2019
2 parents db1cf43 + 208a238 commit 551307e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
2 changes: 1 addition & 1 deletion cscs-checks/tools/profiling_and_debugging/cuda_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self):
'-fopenmp']
nvidia_sm = '37' if self.current_system.name == 'kesch' else '60'
self.build_system.cxxflags = ['-g', '-G', '-arch=sm_%s' % nvidia_sm]
self.build_system.ldflags = ['-g', '-fopenmp']
self.build_system.ldflags = ['-g', '-fopenmp', '-lstdc++']

# FIXME: workaround until the kesch programming environment is fixed
if self.current_system.name == 'kesch':
Expand Down
10 changes: 5 additions & 5 deletions cscs-checks/tools/profiling_and_debugging/nvprof.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ def __init__(self):
self.num_tasks_per_node = 1
self.sourcesdir = 'src/Cuda'
self.executable = 'nvprof'
self.executable_opts = ['./nvprof_check']
self.target_executable = './jacobi'
self.executable_opts = [self.target_executable]
self.sanity_patterns = sn.all([
sn.assert_found('Profiling application: ./nvprof_check',
self.stderr),
sn.assert_found('Profiling application: %s' %
self.target_executable, self.stderr),
sn.assert_found('[CUDA memcpy HtoD]', self.stderr),
sn.assert_found('[CUDA memcpy DtoH]', self.stderr),
sn.assert_found(r'\s+100(\s+\S+){3}\s+jacobi_kernel', self.stderr)
])

self.build_system = 'Make'
self.build_system.makefile = 'Makefile_nvprof'
self.build_system.cflags = [
'-g', '-D_CSCS_ITMAX=100', '-DOMP_MEMLOCALITY', '-DUSE_MPI',
'-DEVS_PER_NODE=1', '-fopenmp', '-std=c99'
]
self.build_system.cxxflags = ['-g', '-G']
self.build_system.ldflags = ['-g', '-fopenmp', '-std=c99']
self.build_system.ldflags = ['-g', '-fopenmp', '-std=c99', '-lstdc++']

# FIXME temporary workaround
# the programming environment should be adapted / fixed
Expand Down
21 changes: 0 additions & 21 deletions cscs-checks/tools/profiling_and_debugging/src/Cuda/Makefile_nvprof

This file was deleted.

0 comments on commit 551307e

Please sign in to comment.