From 95a59f661ca7488b4991f909eb7a9cf997fe099d Mon Sep 17 00:00:00 2001 From: Hanno Schwalm Date: Sat, 23 Nov 2024 10:04:54 +0100 Subject: [PATCH] Reduce Choleski solver verbosity As the solver is called while committing parameters a long history spoils the output a lot. Use proper flags instead of DT_DEBUG_ALWAYS --- src/iop/choleski.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/iop/choleski.h b/src/iop/choleski.h index b46f79362fdb..33ae53adc47e 100644 --- a/src/iop/choleski.h +++ b/src/iop/choleski.h @@ -301,27 +301,27 @@ static inline gboolean _solve_hermitian(const float *const restrict A, dt_free_align(L); dt_control_log(_("Choleski decomposition failed to allocate memory," " check your RAM settings")); - dt_print(DT_DEBUG_ALWAYS, "Choleski decomposition failed to allocate memory," - " check your RAM settings\n"); + dt_print(DT_DEBUG_PIPE, "Choleski decomposition failed to allocate memory," + " check your RAM settings"); return FALSE; } // LU decomposition valid = (checks) ? _choleski_decompose_safe(A, L, n) : _choleski_decompose_fast(A, L, n) ; - if(!valid) dt_print(DT_DEBUG_ALWAYS, "Cholesky decomposition returned NaNs"); + if(!valid) dt_print(DT_DEBUG_PARAMS, "Cholesky decomposition returned NaNs"); // Triangular descent if(valid) valid = (checks) ? _triangular_descent_safe(L, y, x, n) : _triangular_descent_fast(L, y, x, n) ; - if(!valid) dt_print(DT_DEBUG_ALWAYS, "Cholesky LU triangular descent returned NaNs"); + if(!valid) dt_print(DT_DEBUG_PARAMS, "Cholesky LU triangular descent returned NaNs"); // Triangular ascent if(valid) valid = (checks) ? _triangular_ascent_safe(L, x, y, n) : _triangular_ascent_fast(L, x, y, n); - if(!valid) dt_print(DT_DEBUG_ALWAYS, "Cholesky LU triangular ascent returned NaNs"); + if(!valid) dt_print(DT_DEBUG_PARAMS, "Cholesky LU triangular ascent returned NaNs"); dt_free_align(x); dt_free_align(L); @@ -394,7 +394,7 @@ static inline gboolean pseudo_solve(float *const restrict A, gboolean valid = TRUE; if(m < n) { - dt_print(DT_DEBUG_ALWAYS, "Pseudo solve: cannot cast %zu × %zu matrice", m, n); + dt_print(DT_DEBUG_PARAMS, "Pseudo solve: cannot cast %zu × %zu matrice", m, n); return FALSE; } @@ -405,6 +405,8 @@ static inline gboolean pseudo_solve(float *const restrict A, { dt_free_align(A_square); dt_free_align(y_square); + dt_print(DT_DEBUG_PIPE, "Choleski decomposition failed to allocate memory," + " check your RAM settings"); dt_control_log(_("Choleski decomposition failed to allocate memory," " check your RAM settings")); return FALSE;