Skip to content

Facilitate error tracing in CudaManager.

Stephan Hageboeck requested to merge hageboeck/CudaAssertError into master

1. CudaAssertError

VecGeom's CudaAssertError retrieves and clears (!) the error state from the cuda API. In release builds, the state isn't checked, though! The clearing of the state without any action will let the program continue until something fails due to the previous errors that were encountered, which usually confuses people who try to debug this.

Here, the following is implemented:

  • CudaAssertError() in release builds has no effect (instead of clearing the error state).
  • CudaAssertError() in debug builds will retrieve and clear an error state, and abort the program if a cuda error occurred.
  • CudaCheckError() will retrieve, clear, and print error information irrespective of the build configuration.

2. Additional trace points

In order to debug a kernel invocation problem in the CudaManager, additional CudaAssertError() proved to be useful. These introduce a minimal overhead in debug builds only.

Merge request reports