Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mariohsouto committed Feb 27, 2019
2 parents cbcf110 + 39e42c5 commit c849ad2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 45 deletions.
8 changes: 4 additions & 4 deletions src/ProxSDP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ mutable struct Options

opt.tol_primal = 1e-4
opt.tol_dual = 1e-4
opt.tol_eig = 1e-10
opt.tol_soc = 1e-10
opt.tol_eig = 1e-6
opt.tol_soc = 1e-6

opt.initial_theta = 1.0
opt.initial_beta = 1.0
Expand Down Expand Up @@ -387,7 +387,7 @@ function chambolle_pock(affine_sets::AffineSets, conic_sets::ConicSets, opt)::CP
end

# Adaptive stepsizes
elseif primal_residual[k] > 10.0 * opt.tol_primal && dual_residual[k] < opt.tol_dual && k > p.window
elseif primal_residual[k] > 10. * opt.tol_primal && dual_residual[k] < 10. * opt.tol_dual && k > p.window
p.beta *= (1 - p.adapt_level)
if p.beta <= opt.min_beta
p.beta = opt.min_beta
Expand All @@ -397,7 +397,7 @@ function chambolle_pock(affine_sets::AffineSets, conic_sets::ConicSets, opt)::CP
if analysis
println("Debug: Beta = $(p.beta), AdaptLevel = $(p.adapt_level)")
end
elseif primal_residual[k] < opt.tol_primal && dual_residual[k] > 10.0 * opt.tol_dual && k > p.window
elseif primal_residual[k] < 10. * opt.tol_primal && dual_residual[k] > 10. * opt.tol_dual && k > p.window
p.beta /= (1 - p.adapt_level)
if p.beta >= opt.max_beta
p.beta = opt.max_beta
Expand Down
2 changes: 1 addition & 1 deletion test/runbench.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ push!(sets_to_test, :SDPLIB)
end
include("moi_init.jl")
# optimizer = MOIU.CachingOptimizer(ProxSDPModelData{Float64}(), ProxSDP.Optimizer(log_verbose=true, timer_verbose = true))
optimizer = ProxSDP.Solver(log_verbose=true, timer_verbose = true)
optimizer = ProxSDP.Solver(log_verbose=true, timer_verbose = true, tol_primal = 1e-3, tol_dual = 1e-3)
else
using JuMP
# using CSDP
Expand Down
62 changes: 22 additions & 40 deletions time.log
Original file line number Diff line number Diff line change
@@ -1,54 +1,36 @@
──────────────────────────────────────────────────────────────────────────────
Time Allocations
────────────────────── ───────────────────────
Tot / % measured: 1294s / 2.29% 26.5GiB / 100%
Tot / % measured: 1.57s / 1.07% 35.0MiB / 0.16%

Section ncalls time %tot avg alloc %tot avg
──────────────────────────────────────────────────────────────────────────────
Main 1 29.7s 100% 29.7s 26.4GiB 100% 26.4GiB
CP loop 1 27.8s 93.6% 27.8s 26.2GiB 99.4% 26.2GiB
primal 1.32k 14.2s 47.7% 10.7ms 97.6MiB 0.36% 75.4KiB
sdp proj 1.32k 11.6s 39.1% 8.76ms 97.5MiB 0.36% 75.4KiB
eigs 1.32k 7.08s 23.9% 5.35ms 81.2MiB 0.30% 62.8KiB
_AUPD! 1.32k 3.46s 11.7% 2.62ms 1.01MiB 0.00% -
_EUPD! 1.32k 314ms 1.06% 237μs 20.7KiB 0.00% -
_INIT! 1.32k 1.01ms 0.00% 762ns 966KiB 0.00% -
reshape1 1.32k 2.76s 9.31% 2.09ms - 0.00% -
reshape2 1.32k 1.50s 5.06% 1.13ms - 0.00% -
eigfact 1 243ms 0.82% 243ms 16.1MiB 0.06% 16.1MiB
get min eig 1.32k 818μs 0.00% 618ns - 0.00% -
linesearch -1 1.32k 1.06s 3.56% 798μs - 0.00% -
linesearch 0 1.32k 486ms 1.64% 367μs - 0.00% -
residual 1.32k 6.63s 22.3% 5.00ms 4.95GiB 18.8% 3.83MiB
linesearch 5 5.68k 3.59s 12.1% 632μs - 0.00% -
linesearch 1 5.68k 11.9ms 0.04% 2.09μs - 0.00% -
linesearch 2 5.68k 10.9ms 0.04% 1.92μs - 0.00% -
Init 1 1.88s 6.34% 1.88s 151MiB 0.56% 151MiB
Main 1 16.7ms 100% 16.7ms 58.0KiB 100% 58.0KiB
CP loop 1 2.28ms 13.6% 2.28ms 38.0KiB 65.5% 38.0KiB
residual 51 95.1μs 0.57% 1.86μs 9.56KiB 16.5% -
primal 51 76.0μs 0.45% 1.49μs 1.63KiB 2.80% -
linesearch -1 51 14.0μs 0.08% 274ns - 0.00% -
linesearch 2 51 14.2μs 0.08% 279ns - 0.00% -
linesearch 4 51 14.0μs 0.08% 275ns - 0.00% -
linesearch 3 51 12.9μs 0.08% 253ns - 0.00% -
linesearch 1 51 10.2μs 0.06% 200ns - 0.00% -
Init 1 1.64ms 9.79% 1.64ms 11.9KiB 20.5% 11.9KiB
──────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────
Time Allocations
────────────────────── ───────────────────────
Tot / % measured: 1294s / 2.29% 26.5GiB / 100%
Tot / % measured: 1.59s / 1.05% 35.6MiB / 0.16%

Section ncalls time %tot avg alloc %tot avg
────────────────────────────────────────────────────────────────────────
Main 1 29.7s 100% 29.7s 26.4GiB 100% 26.4GiB
CP loop 1 27.8s 93.6% 27.8s 26.2GiB 99.4% 26.2GiB
primal 1.32k 14.2s 47.7% 10.7ms 97.6MiB 0.36% 75.4KiB
sdp proj 1.32k 11.6s 39.1% 8.76ms 97.5MiB 0.36% 75.4KiB
eigs 1.32k 7.08s 23.9% 5.35ms 81.2MiB 0.30% 62.8KiB
residual 1.32k 6.63s 22.3% 5.00ms 4.95GiB 18.8% 3.83MiB
linesearch 5 5.68k 3.59s 12.1% 632μs - 0.00% -
_AUPD! 1.32k 3.46s 11.7% 2.62ms 1.01MiB 0.00% -
reshape1 1.32k 2.76s 9.31% 2.09ms - 0.00% -
Init 1 1.88s 6.34% 1.88s 151MiB 0.56% 151MiB
reshape2 1.32k 1.50s 5.06% 1.13ms - 0.00% -
linesearch -1 1.32k 1.06s 3.56% 798μs - 0.00% -
linesearch 0 1.32k 486ms 1.64% 367μs - 0.00% -
_EUPD! 1.32k 314ms 1.06% 237μs 20.7KiB 0.00% -
eigfact 1 243ms 0.82% 243ms 16.1MiB 0.06% 16.1MiB
linesearch 1 5.68k 11.9ms 0.04% 2.09μs - 0.00% -
linesearch 2 5.68k 10.9ms 0.04% 1.92μs - 0.00% -
_INIT! 1.32k 1.01ms 0.00% 762ns 966KiB 0.00% -
get min eig 1.32k 818μs 0.00% 618ns - 0.00% -
Main 1 16.7ms 100% 16.7ms 58.0KiB 100% 58.0KiB
CP loop 1 2.28ms 13.6% 2.28ms 38.0KiB 65.5% 38.0KiB
Init 1 1.64ms 9.79% 1.64ms 11.9KiB 20.5% 11.9KiB
residual 51 95.1μs 0.57% 1.86μs 9.56KiB 16.5% -
primal 51 76.0μs 0.45% 1.49μs 1.63KiB 2.80% -
linesearch 2 51 14.2μs 0.08% 279ns - 0.00% -
linesearch 4 51 14.0μs 0.08% 275ns - 0.00% -
linesearch -1 51 14.0μs 0.08% 274ns - 0.00% -
linesearch 3 51 12.9μs 0.08% 253ns - 0.00% -
linesearch 1 51 10.2μs 0.06% 200ns - 0.00% -
────────────────────────────────────────────────────────────────────────

0 comments on commit c849ad2

Please sign in to comment.