3.6. Logging Functions and Library Information#
3.6.1. Logging functions#
These functions control rocSOLVER’s Multi-level Logging capabilities.
3.6.1.1. rocsolver_log_begin()#
-
rocblas_status rocsolver_log_begin(void)#
LOG_BEGIN begins a rocSOLVER multi-level logging session.
Initializes the rocSOLVER logging environment with default values (no logging and one level depth). Default mode can be overridden by using the environment variables ROCSOLVER_LAYER and ROCSOLVER_LEVELS.
This function also sets the streams where the log results will be outputted. The default is STDERR for all the modes. This default can also be overridden using the environment variable ROCSOLVER_LOG_PATH, or specifically ROCSOLVER_LOG_TRACE_PATH, ROCSOLVER_LOG_BENCH_PATH, and/or ROCSOLVER_LOG_PROFILE_PATH.
3.6.1.2. rocsolver_log_end()#
-
rocblas_status rocsolver_log_end(void)#
LOG_END ends the multi-level rocSOLVER logging session.
If applicable, this function also prints the profile logging results before cleaning the logging environment.
3.6.1.3. rocsolver_log_set_layer_mode()#
-
rocblas_status rocsolver_log_set_layer_mode(const rocblas_layer_mode_flags layer_mode)#
LOG_SET_LAYER_MODE sets the logging mode for the rocSOLVER multi-level logging environment.
- Parameters:
layer_mode – [in] rocblas_layer_mode_flags. Specifies the logging mode.
3.6.1.4. rocsolver_log_set_max_levels()#
-
rocblas_status rocsolver_log_set_max_levels(const rocblas_int max_levels)#
LOG_SET_MAX_LEVELS sets the maximum trace log depth for the rocSOLVER multi-level logging environment.
- Parameters:
max_levels – [in] rocblas_int. max_levels >= 1. Specifies the maximum depth at which nested function calls will appear in the trace and profile logs.
3.6.1.5. rocsolver_log_restore_defaults()#
-
rocblas_status rocsolver_log_restore_defaults(void)#
LOG_RESTORE_DEFAULTS restores the default values of the rocSOLVER multi-level logging environment.
This function sets the logging mode and maximum trace log depth to their default values (no logging and one level depth).
3.6.1.6. rocsolver_log_write_profile()#
-
rocblas_status rocsolver_log_write_profile(void)#
LOG_WRITE_PROFILE prints the profile logging results.
3.6.1.7. rocsolver_log_flush_profile()#
-
rocblas_status rocsolver_log_flush_profile(void)#
LOG_FLUSH_PROFILE prints the profile logging results and clears the profile record.
3.6.2. Library information#
3.6.2.1. rocsolver_get_version_string()#
-
rocblas_status rocsolver_get_version_string(char *buf, size_t len)#
GET_VERSION_STRING Queries the library version.
- Parameters:
buf – [out] A buffer that the version string will be written into.
len – [in] The size of the given buffer in bytes.
3.6.2.2. rocsolver_get_version_string_size()#
-
rocblas_status rocsolver_get_version_string_size(size_t *len)#
GET_VERSION_STRING_SIZE Queries the minimum buffer size for a successful call to rocsolver_get_version_string.
- Parameters:
len – [out] pointer to size_t. The minimum length of buffer to pass to rocsolver_get_version_string.