Skip to content

Commit

Permalink
more tuning params that can go negative but shouldn't
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrzewa committed Jul 19, 2024
1 parent 0c8d86f commit d2d1848
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions quda_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,9 @@ void update_tunable_params(tm_QudaMGTunableParams_t * tunable_params,
switch(tuning_dir){
case TM_MG_TUNE_MU_FACTOR:
{
tunable_params->mg_mu_factor[lvl] += tuning_plan->mg_mu_factor_delta[lvl];
if( tunable_params->mg_mu_factor[lvl] + tuning_plan->mg_mu_factor_delta[lvl] > 0){
tunable_params->mg_mu_factor[lvl] += tuning_plan->mg_mu_factor_delta[lvl];
}
break;
}
case TM_MG_TUNE_COARSE_SOLVER_MAXITER:
Expand All @@ -2722,7 +2724,9 @@ void update_tunable_params(tm_QudaMGTunableParams_t * tunable_params,
}
case TM_MG_TUNE_COARSE_SOLVER_TOL:
{
tunable_params->mg_coarse_solver_tol[lvl] += tuning_plan->mg_coarse_solver_tol_delta[lvl];
if( tunable_params->mg_coarse_solver_tol[lvl] + tuning_plan->mg_coarse_solver_tol_delta[lvl] > 0 ){
tunable_params->mg_coarse_solver_tol[lvl] += tuning_plan->mg_coarse_solver_tol_delta[lvl];
}
break;
}
case TM_MG_TUNE_NU_PRE:
Expand All @@ -2741,12 +2745,16 @@ void update_tunable_params(tm_QudaMGTunableParams_t * tunable_params,
}
case TM_MG_TUNE_SMOOTHER_TOL:
{
tunable_params->mg_smoother_tol[lvl] += tuning_plan->mg_smoother_tol_delta[lvl];
if( tunable_params->mg_smoother_tol[lvl] + tuning_plan->mg_smoother_tol_delta[lvl] > 0 ){
tunable_params->mg_smoother_tol[lvl] += tuning_plan->mg_smoother_tol_delta[lvl];
}
break;
}
case TM_MG_TUNE_OMEGA:
{
tunable_params->mg_omega[lvl] += tuning_plan->mg_omega_delta[lvl];
if( tunable_params->mg_omega[lvl] + tuning_plan->mg_omega_delta[lvl] > 0){
tunable_params->mg_omega[lvl] += tuning_plan->mg_omega_delta[lvl];
}
break;
}
case TM_MG_TUNE_INVALID:
Expand Down

0 comments on commit d2d1848

Please sign in to comment.