-
Notifications
You must be signed in to change notification settings - Fork 20
Debugging
Tim Younkin edited this page Apr 26, 2024
·
1 revision
Debugging GITR with cuda-gdb:
To debug GITR on NVIDIA devices with CUDA turned on, you can use cuda-gdb.
- Set the CMAKE_BUILD_TYPE to "Debug" instead of "Release"
- Build using the build.sh script
- Go to the folder you'd like to run and execute
cuda-gdb ~/path/to/GITR
- Set a breakpoint at a line of interest
break particle_diagnostics.cpp:34
- Run the debugger by hitting
r
- Once the debugger stops at the line of interest you can print and advance as necessary
- to print particle information, like the variable
x
for a particle from the Particles class , you can useprint particlesPointer->x.data_[indx]
- to advance you can use
s
for step - all of these commands correspond to gdb documentation that can be found online