DebugOnly
ClimaCore.DebugOnly — Module
DebugOnlyModule for debugging tools. The tools in this module are subject to change without warning and are not supported for production use.
ClimaCore.DebugOnly.call_post_op_callback — Function
call_post_op_callback()Return whether post_op_callback is called after every data operation. The default method returns false; overload it to return true to enable the callback:
ClimaCore.DebugOnly.call_post_op_callback() = trueClimaCore.DebugOnly.post_op_callback — Function
post_op_callback(result, args...; kwargs...)Callback applied to the result of every data operation when call_post_op_callback returns true.
The function has no methods by default: it is a debugging hook, and users add the method that checks what they need (see example_debug_post_op_callback).
This function is called from every data operation, so expensive work performed in post_op_callback slows down the whole code.
ClimaCore.DebugOnly.example_debug_post_op_callback — Function
example_debug_post_op_callback(result, args...; kwargs...)Example post_op_callback implementation that throws an error if result contains a NaN or an Inf.