There are several programs (CUDA) in the example files. They are compiled by a make file. I just want to compile them so that I can walk through them line by line. Tha would mean something like this
nvcc -g -G program.cu -o program
How do I compile them so I can have that capability. I just want to walk through the code and learn about CUDA. I do not think the line above would do it. There are many other files that need to be added such as kernel files.
I tried dbg=1 and compilation gave some obsure error. I then tried debug=1 and it gave no error, it also had the debugging properties in the executable. Is there any reason one would work (debug=1) and the other (dbg=1) would not?
debug=1 does absolutely nothing, that will compile the executables with release settings. If you have executables in the debug directory, they were made by your dbg=1 command. You can confirm this for yourself by looking in the C/common/common.mk file. You won’t find any debug option in that Makefile. You will however, see this;
ie. if dbg has a value of 1, compile for debugging, otherwise compile for release. You can happily run:
make newport_j=1
and it will compile just as if you had typed only make. Those trailing arguments to make just set variables inside the make environment. If the makefile doesn’t use those variables, then nothing happens.