Logging#
This module contains functions and variables to control dynasor’s logging
logger- the module logger
- dynasor.logging_tools.set_logging_level(level)[source]#
Alters the logging verbosity logging is handled.
Possible values from least to most verbose:
CRITICAL,ERROR,WARNING,INFO,DEBUG.- Parameters:
level (
str) – Verbosity level; see Python logging library for details.- Return type:
None
- dynasor.logging_tools.warn_if_numba_threading_layer_is_slow()[source]#
Emit a one-time warning if Numba has fallen back to the
workqueuethreading layer, which is available everywhere but not tuned for performance; installing TBB (pip install tbb) lets Numba pick a faster, fork-safe layer instead.Numba only selects its threading layer lazily, the first time a parallel (
@numba.njit(parallel=True)) kernel actually runs, so this is a no-op until that has happened at least once; call it right after such a kernel has run.- Return type:
None