Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
While debugging an exception in the status checker I got tired of trying to dig into the raw state data to access the current track's debug information. This adds JSON I/O, and lldb-callable debug_print functions, for the track.
There's now a hacky piece of code to set the "currently executing params" from the action sequence. @pcanal you're the resident expert on global variables, so perhaps you could take a look at the global variable? I only intend this functionality to be used in single-thread mode for interactive debugging, so perhaps it doesn't need to be thread-local (and it might be bad if we do thread-local because the main thread can catch an exception run by an openmp thread?). Later we might extend the JSON I/O to allow KernelContextException to merge the core track state with the core params data without a global variable/lock...
Calling from an Executor that has an assertion failure:
While debugging an exception in the status checker I got tired of trying to dig into the raw state data to access the current track's debug information. This adds JSON I/O, and lldb-callable
debug_print
functions, for the track.There's now a hacky piece of code to set the "currently executing params" from the action sequence. @pcanal you're the resident expert on global variables, so perhaps you could take a look at the global variable? I only intend this functionality to be used in single-thread mode for interactive debugging, so perhaps it doesn't need to be thread-local (and it might be bad if we do thread-local because the main thread can catch an exception run by an openmp thread?). Later we might extend the JSON I/O to allow
KernelContextException
to merge the core track state with the core params data without a global variable/lock...Calling from an
Executor
that has an assertion failure: