From 443d99af4162c0811b1e67ad9d01c827aad9c5ec Mon Sep 17 00:00:00 2001 From: dance858 Date: Sun, 17 Nov 2024 09:51:42 -0800 Subject: [PATCH] changed tolerance again --- src/cones.c | 6 ++---- src/spectral_cones/logdeterminant/logdet_cone.c | 5 +++-- test/spectral_cones_problems/exp_design.h | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/cones.c b/src/cones.c index 0c93e337..b23340ee 100644 --- a/src/cones.c +++ b/src/cones.c @@ -48,8 +48,7 @@ scs_float SCS(proj_pd_exp_cone)(scs_float *v0, scs_int primal); // Forward declare spectral matrix cone projections scs_int SCS(proj_logdet_cone)(scs_float *tvX, const scs_int n, ScsConeWork *c, - Newton_stats *stats, scs_int offset, - bool *warmstart); + scs_int offset, bool *warmstart); scs_int SCS(proj_nuclear_cone)(scs_float *tX, size_t m, size_t n, ScsConeWork *c); void SCS(proj_ell_one)(scs_float *tx, size_t n, ScsConeWork *c); scs_int SCS(proj_sum_largest_evals)(scs_float *tX, scs_int n, scs_int k, @@ -1098,8 +1097,7 @@ static scs_int proj_cone(scs_float *x, const ScsCone *k, ScsConeWork *c, if (k->dsize && k->d) { for (i = 0; i < k->dsize; ++i) { SPECTRAL_TIMING(SCS(tic)(&spec_mat_proj_timer);) - status = SCS(proj_logdet_cone)(&(x[count]), k->d[i], c, &(c->newton_stats), - offset_log_cone, + status = SCS(proj_logdet_cone)(&(x[count]), k->d[i], c, offset_log_cone, c->log_cone_warmstarts + i); SPECTRAL_TIMING(c->tot_time_mat_cone_proj += SCS(tocq)(&spec_mat_proj_timer);) offset_log_cone += k->d[i] + 2; diff --git a/src/spectral_cones/logdeterminant/logdet_cone.c b/src/spectral_cones/logdeterminant/logdet_cone.c index 0da2077d..7ac5f8d4 100644 --- a/src/spectral_cones/logdeterminant/logdet_cone.c +++ b/src/spectral_cones/logdeterminant/logdet_cone.c @@ -34,9 +34,10 @@ scs_int log_cone_proj_wrapper(scs_float t0, scs_float v0, const scs_float *x0, Newton_stats *stats, bool *warm_start); scs_int SCS(proj_logdet_cone)(scs_float *tvX, scs_int n, ScsConeWork *c, - Newton_stats *stats, scs_int offset, - bool *warmstart) + scs_int offset, bool *warmstart) { + Newton_stats *stats = &(c->newton_stats); + // tvX = [t, v, X], where X represents the lower triangular part of a matrix // stored in a compact form and off-diagonal elements have been scaled by // sqrt(2) diff --git a/test/spectral_cones_problems/exp_design.h b/test/spectral_cones_problems/exp_design.h index f7deb8cc..270d8cf6 100644 --- a/test/spectral_cones_problems/exp_design.h +++ b/test/spectral_cones_problems/exp_design.h @@ -104,8 +104,8 @@ static const char *exp_design(void) k->sl_size = sl_size; scs_set_default_settings(stgs); - stgs->eps_abs = 1e-8; - stgs->eps_rel = 1e-8; + stgs->eps_abs = 0.5*1e-7; + stgs->eps_rel = 0.5*1e-7; stgs->eps_infeas = 1e-9; stgs->log_csv_filename="test_exp_design.csv";