DebugOnly
ClimaCore.DebugOnly — Module
DebugOnlyA module for debugging tools. Note that any tools in here are subject to sudden changes without warning. So, please, do not use any of these tools in production as support for them are not guaranteed.
sourceClimaCore.DebugOnly.call_post_op_callback — Function
call_post_op_callback()Returns a Bool. Meant to be overloaded so that ClimaCore.DataLayouts.post_op_callback(result, args...; kwargs...) is called after every data operation.
ClimaCore.DebugOnly.post_op_callback — Function
post_op_callback(result, args...; kwargs...)A callback that is called, if ClimaCore.DataLayouts.call_post_op_callback() = true, on the result of every data operation.
There is purposely no implementation– this is a debugging tool, and users may want to check different things.
Note that, since this method is called in so many places, this is a performance-critical code path and expensive operations performed in post_op_callback may significantly slow down your code.
ClimaCore.DebugOnly.example_debug_post_op_callback — Function
example_debug_post_op_callback(result, args...; kwargs...)An example post_op_callback method, that checks for NaNs and Infs.