Reputation: 682
I am attempting to build and run the example code from the NVlabs project SASSI which can be used to instrument CUDA code. However, I am struggling to get even the included sample Makefile
and matrixMul.cu
to build and run properly.
I have tried adding the --maxrregcount=16
and -rcd=true
nvcc flags, but I think my real issue is with linking properly to the SASSI libraries. All of the library paths listed in the nvcc output below resolve to actual directories with .so
files.
Any tips or debugging steps are much appreciated.
$ make clean
rm -f -f matrixMul *.o
$ make branch
/usr/local/sassi7//bin/nvcc -I./inc -c -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -Xlinker "--wrap=main" -Xlinker "--wrap=exit" -lineinfo -Xptxas --sassi-inst-before="cond-branches" -Xptxas --sassi-before-args="cond-branch-info" -g -O3 -dc -o matrixMul.o matrixMul.cu
* * SASSI Instrumentation Details * * For the settings you passed in, you'll need to make sure that you have * an instrumentation library with the following properties: * - It MUST BE compiled using only 16 registers!! To accomplish this * simply compile your library with the nvcc flag, --maxrregcount=16 * - It must define the following functions: * device void sassi_before_handler(SASSIBeforeParams*,SASSICondBranchParams*) *
* * SASSI Instrumentation Details * * For the settings you passed in, you'll need to make sure that you have * an instrumentation library with the following properties: * - It MUST BE compiled using only 16 registers!! To accomplish this * simply compile your library with the nvcc flag, --maxrregcount=16 * - It must define the following functions: * device void sassi_before_handler(SASSIBeforeParams*,SASSICondBranchParams*) * ****************************************************************************** /usr/local/sassi7//bin/nvcc -o matrixMul matrixMul.o -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -Xlinker "--wrap=main" -Xlinker "--wrap=exit" -L../instlibs/lib -lbranch -L/usr/local/sassi7//extras/CUPTI/lib64 -lcupti -lcudadevrt -Xlinker -rpath,/usr/local/sassi7//extras/CUPTI/lib64 -L/lib -lboost_regex -lcrypto -Xlinker -rpath,/lib nvlink error : Undefined reference to '_Z20sassi_before_handlerP17SASSIBeforeParamsP21SASSICondBranchParams' in 'matrixMul.o' make: * [matrixMul] Error 255**
Upvotes: 0
Views: 103
Reputation: 682
The solution was to install Boost, set the appropriate paths in instlibs/env.mk
and run make all
from instlibs/
before trying to build the example code. The paths were set correctly, but not all of the required SASSI libraries had been generated.
Upvotes: 1