Skip to content

Commit

Permalink
Reduce Choleski solver verbosity
Browse files Browse the repository at this point in the history
As the solver is called while committing parameters a long history spoils the output a lot.
Use proper flags instead of DT_DEBUG_ALWAYS
  • Loading branch information
jenshannoschwalm committed Nov 23, 2024
1 parent d7e5dd4 commit 95a59f6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/iop/choleski.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down

0 comments on commit 95a59f6

Please sign in to comment.