@@ -26,6 +26,7 @@ using OptimizationMOI: MOI as MOI
2626using DataFrames
2727using Plots
2828using StatsPlots
29+ using StatsBase: countmap
2930```
3031
3132# Benchmarks
@@ -48,7 +49,7 @@ function get_stats(sol, ::OptimizationMOI.MOI.OptimizerWithAttributes)
4849 "Ipopt", Symbol(sol.retcode))
4950end
5051
51- function run_benchmarks(problems, optimizers; chunk_size=3 )
52+ function run_benchmarks(problems, optimizers; chunk_size=1 )
5253 problem = String[]
5354 n_vars = Int64[]
5455 secs = Float64[]
@@ -77,7 +78,7 @@ function run_benchmarks(problems, optimizers; chunk_size=3)
7778 try
7879 nlp_prob = CUTEstModel(prob_name)
7980
80- # Skip extremely large problems to prevent memory issues
81+ # Generous memory limits for 100GB systems - include 5000 var problems
8182 if nlp_prob.meta.nvar > 10000
8283 @info " Skipping $(prob_name) (too large: $(nlp_prob.meta.nvar) variables)"
8384 finalize(nlp_prob)
@@ -88,8 +89,8 @@ function run_benchmarks(problems, optimizers; chunk_size=3)
8889
8990 for optimizer in optimizers
9091 try
91- # Set aggressive time and iteration limits
92- sol = solve(prob, optimizer; maxiters = 1000, maxtime = 5 .0)
92+ # Generous limits for 100GB memory
93+ sol = solve(prob, optimizer; maxiters = 1000, maxtime = 30 .0)
9394
9495 @info "✓ Solved $(prob_name) with $(optimizer)"
9596 vars, time, alg, code = get_stats(sol, optimizer)
@@ -121,14 +122,16 @@ function run_benchmarks(problems, optimizers; chunk_size=3)
121122 push!(retcode, :LOAD_FAILED)
122123 end
123124 finally
124- # Clean up resources
125+ # Aggressive cleanup to prevent memory accumulation
125126 if nlp_prob !== nothing
126127 try
127128 finalize(nlp_prob)
128129 catch e
129130 @warn "Failed to finalize $(prob_name): $(e)"
130131 end
131132 end
133+ # Force garbage collection after each problem
134+ GC.gc()
132135 end
133136 end
134137
@@ -155,8 +158,25 @@ problems on this section.
155158eq_bou_problems = CUTEst.select_sif_problems(min_con=1, only_equ_con=true, only_free_var=false)
156159@info "after1 - testing $(length(eq_bou_problems)) equality-constrained problems"
157160
161+ # Limit to first 50 problems for 100GB memory systems
162+ eq_bou_problems = eq_bou_problems[1:min(50, length(eq_bou_problems))]
163+ @info "Limited to $(length(eq_bou_problems)) problems for comprehensive testing"
164+
158165# Analysis
159166eq_bou_results = run_benchmarks(eq_bou_problems, optimizers)
167+
168+ # Calculate and display success rates
169+ successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal]
170+ successful_results = filter(row -> row.retcode in successful_codes, eq_bou_results)
171+ total_attempts = nrow(eq_bou_results)
172+ successful_attempts = nrow(successful_results)
173+ success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0
174+
175+ @info "SUCCESS RATE ANALYSIS:"
176+ @info "Total attempts: $(total_attempts)"
177+ @info "Successful attempts: $(successful_attempts)"
178+ @info "Success rate: $(success_rate)%"
179+
160180@info "after2"
161181
162182@df eq_bou_results scatter(:n_vars, :secs,
@@ -175,8 +195,22 @@ Next, we examine the same relationship for inequality-constrained problems.
175195neq_bou_problems = CUTEst.select_sif_problems(min_con=1, only_ineq_con=true, only_free_var=false)
176196@info "after5 - testing $(length(neq_bou_problems)) inequality-constrained problems"
177197
198+ # Limit to first 50 problems for 100GB memory systems
199+ neq_bou_problems = neq_bou_problems[1:min(50, length(neq_bou_problems))]
200+ @info "Limited to $(length(neq_bou_problems)) problems for comprehensive testing"
201+
178202# Analysis
179203neq_bou_results = run_benchmarks(neq_bou_problems, optimizers)
204+
205+ # Calculate and display success rates
206+ successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal]
207+ successful_results = filter(row -> row.retcode in successful_codes, neq_bou_results)
208+ total_attempts = nrow(neq_bou_results)
209+ successful_attempts = nrow(successful_results)
210+ success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0
211+
212+ @info "INEQUALITY CONSTRAINED SUCCESS RATE: $(success_rate)% ($(successful_attempts)/$(total_attempts))"
213+
180214@info "after6"
181215
182216@df neq_bou_results scatter(:n_vars, :secs,
0 commit comments