diff --git a/bench/benchmark.jl b/bench/benchmark.jl index 228e03af5..47fdd727a 100644 --- a/bench/benchmark.jl +++ b/bench/benchmark.jl @@ -22,10 +22,14 @@ for (i, ((method, problem), optimizer)) in enumerate(bench) println("$i) ($method, $problem)") redirect_stdio(; stdout = devnull) do global df - solve_time_sec, memory_usage = benchmark(optimizer) - return push!(df, (method, problem, solve_time_sec, memory_usage)) + try + solve_time_sec, memory_usage = benchmark(optimizer) + return push!(df, (method, problem, solve_time_sec, memory_usage)) + catch + # -1 in the CSV file means that the method failed + return push!(df, (method, problem, -1.0, -1)) + end end end CSV.write("./benchmark.csv", df) -