Breakpoint is bypassed
-
Hi
I would like to debug a code, but I don't know why the breakpoint doesn't work. The run script is$ cat run2.sh #!/bin/bash export CUDA_VERSION="11.6"; export CUDA_VISIBLE_DEVICES="0" ; \ export TRACES_FOLDER=/home/mnaderan/accel-sim-framework/trace-test/traces; \ CUDA_INJECTION64_PATH=/home/mnaderan/accel-sim-framework/util/tracer_nvbit/tracer_tool/tracer_tool.so gdb --args \ /home/mnaderan/gpu-apps/cactus/gms mdrun -notunepme -pme gpu -nb gpu -v -deffnm ./data_dirs/npt
I put this script in the run step. When I click the debug button, it looks normal.
After entering 'r' in the GDB, it hits the assertion, and you can see that it bypassed the breakpoint.
I appreciate any feedback for that. Is there any workaround for that?
-
Hi
I would like to debug a code, but I don't know why the breakpoint doesn't work. The run script is$ cat run2.sh #!/bin/bash export CUDA_VERSION="11.6"; export CUDA_VISIBLE_DEVICES="0" ; \ export TRACES_FOLDER=/home/mnaderan/accel-sim-framework/trace-test/traces; \ CUDA_INJECTION64_PATH=/home/mnaderan/accel-sim-framework/util/tracer_nvbit/tracer_tool/tracer_tool.so gdb --args \ /home/mnaderan/gpu-apps/cactus/gms mdrun -notunepme -pme gpu -nb gpu -v -deffnm ./data_dirs/npt
I put this script in the run step. When I click the debug button, it looks normal.
After entering 'r' in the GDB, it hits the assertion, and you can see that it bypassed the breakpoint.
I appreciate any feedback for that. Is there any workaround for that?
-
Sorry but I don't understand what you mean. I tried to start debugging an "unstarted application" and pointing that to the executable (my script without gdb) and then ran the script ./run2.sh in a terminal. As you can see, the terminal hits the assertion and the debugger is still waiting.
-
Sorry but I don't understand what you mean. I tried to start debugging an "unstarted application" and pointing that to the executable (my script without gdb) and then ran the script ./run2.sh in a terminal. As you can see, the terminal hits the assertion and the debugger is still waiting.
@mahmoodn Why do you need this script file at all? You can set all these variables in QtCreator Run configuration (Environment, also parameters can be defined in Run configuration) and then simply start the executable. Then debugging will work.
-
Well the explanation is complex.
1- The raw command for the program is/home/mnaderan/gpu-apps/cactus/gms mdrun -notunepme -pme gpu -nb gpu -v -deffnm ./data_dirs/npt
. If I run that in terminal everything is fine.
2- I use a tracer and load its library file as a variable to analyze that gms program. If I separate them, it will be like:$ export CUDA_INJECTION64_PATH=/home/mnaderan/accel-sim-framework/util/tracer_nvbit/tracer_tool/tracer_tool.so $ /home/mnaderan/gpu-apps/cactus/gms mdrun -notunepme -pme gpu -nb gpu -v -deffnm ./data_dirs/npt
In terminal that is fine too.
However, if I want to do the same thing in Qt creator, things don't go well. In the run properties, I point the executable to gms and supply the arguments (see picture). I also have exported that variable in the environment list. However, when I start 'run', the program terminates with as error that no GPU was found (the program needs gpu due to -nb option). Please see that in terminal gpu is detected.
If that can be solved, it will be great, but I wasn't able to fix that. So, I decided to put the command in a script and call the script in Qt creator.