diff --git a/cscs-checks/tools/profiling_and_debugging/cuda_gdb.py b/cscs-checks/tools/profiling_and_debugging/cuda_gdb.py index fdff4c0986..5a0efb20c6 100644 --- a/cscs-checks/tools/profiling_and_debugging/cuda_gdb.py +++ b/cscs-checks/tools/profiling_and_debugging/cuda_gdb.py @@ -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': diff --git a/cscs-checks/tools/profiling_and_debugging/nvprof.py b/cscs-checks/tools/profiling_and_debugging/nvprof.py index 412e56507e..927945ad48 100644 --- a/cscs-checks/tools/profiling_and_debugging/nvprof.py +++ b/cscs-checks/tools/profiling_and_debugging/nvprof.py @@ -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 diff --git a/cscs-checks/tools/profiling_and_debugging/src/Cuda/Makefile_nvprof b/cscs-checks/tools/profiling_and_debugging/src/Cuda/Makefile_nvprof deleted file mode 100644 index 946125a0a1..0000000000 --- a/cscs-checks/tools/profiling_and_debugging/src/Cuda/Makefile_nvprof +++ /dev/null @@ -1,21 +0,0 @@ -LD = $(CC) - -OBJ = _jacobi-cuda-kernel.o _jacobi-cuda.o -LIB = - -.SUFFIXES: .o .cu - -%.o: %.cu - nvcc $(CXXFLAGS) $(DDTFLAGS) -c $< -o $@ - -.SUFFIXES: .o .c - -%.o: %.c - $(CC) $(CFLAGS) $(DDTFLAGS) -c $< -o $@ - -nvprof_check: $(OBJ) - $(LD) $(LDFLAGS) $(OBJ) $(LIB) -o $@ - -clean: - rm -f *.o *.mod nvprof_check - rm -fr *.ptx *.opt *.cg *.ap2 *.rpt *.cub *.lst *.xf