Are you using the latest version of Convex.jl?
I get this:
julia> using Convex
julia> import SCS
julia> import SparseArrays
julia> function main(m, n)
A = SparseArrays.sprandn(m * (n - 1), m * n, 0.01);
B = SparseArrays.sprandn(m * (n - 1), m * n, 0.01);
@show SparseArrays.nnz(A) + SparseArrays.nnz(B)
x = Variable(m, n)
model = minimize(-x[end, end], [A * vec(x) == 0, B * vec(x) <= 0])
solve!(model, SCS.Optimizer)
return model
end
main (generic function with 1 method)
julia> @time main(30, 101)
SparseArrays.nnz(A) + SparseArrays.nnz(B) = 181890
[ Info: [Convex.jl] Compilation finished: 0.11 seconds, 21.368 MiB of memory allocated
------------------------------------------------------------------
SCS v3.2.4 - Splitting Conic Solver
(c) Brendan O'Donoghue, Stanford University, 2012
------------------------------------------------------------------
problem: variables n: 3030, constraints m: 6000
cones: z: primal zero / dual free vars: 3000
l: linear vars: 3000
settings: eps_abs: 1.0e-04, eps_rel: 1.0e-04, eps_infeas: 1.0e-07
alpha: 1.50, scale: 1.00e-01, adaptive_scale: 1
max_iters: 100000, normalize: 1, rho_x: 1.00e-06
acceleration_lookback: 10, acceleration_interval: 10
compiled with openmp parallelization enabled
lin-sys: sparse-direct-amd-qdldl
nnz(A): 181890, nnz(P): 0
------------------------------------------------------------------
iter | pri res | dua res | gap | obj | scale | time (s)
------------------------------------------------------------------
0| 3.55e-01 9.37e-01 1.71e-01 -8.56e-02 1.00e-01 5.11e+00
25| 1.90e-07 2.48e-08 3.77e-08 -1.88e-08 1.00e-01 5.40e+00
------------------------------------------------------------------
status: solved
timings: total: 5.40e+00s = setup: 5.08e+00s + solve: 3.21e-01s
lin-sys: 3.06e-01s, cones: 4.66e-04s, accel: 4.63e-04s
------------------------------------------------------------------
objective = -0.000000
------------------------------------------------------------------
5.571585 seconds (4.61 k allocations: 39.316 MiB)
Problem statistics
problem is DCP : true
number of variables : 1 (3_030 scalar elements)
number of constraints : 2 (6_000 scalar elements)
number of coefficients : 187_892
number of atoms : 12
Solution summary
termination status : OPTIMAL
primal status : FEASIBLE_POINT
dual status : FEASIBLE_POINT
objective value : -0.0
Expression graph
minimize
ββ Convex.NegateAtom (affine; real)
ββ index (affine; real)
ββ 30Γ101 real variable (id: 563β¦038)
subject to
ββ == constraint (affine)
β ββ + (affine; real)
β ββ * (affine; real)
β β ββ β¦
β β ββ β¦
β ββ Convex.NegateAtom (constant; negative)
β ββ β¦
ββ β€ constraint (affine)
ββ + (affine; real)
ββ * (affine; real)
β ββ β¦
β ββ β¦
ββ Convex.NegateAtom (constant; negative)
ββ β¦
julia> @time main(300, 101)
SparseArrays.nnz(A) + SparseArrays.nnz(B) = 18172888
[ Info: [Convex.jl] Compilation finished: 3.96 seconds, 1.998 GiB of memory allocated
------------------------------------------------------------------
SCS v3.2.4 - Splitting Conic Solver
(c) Brendan O'Donoghue, Stanford University, 2012
------------------------------------------------------------------
problem: variables n: 30300, constraints m: 60000
cones: z: primal zero / dual free vars: 30000
l: linear vars: 30000
settings: eps_abs: 1.0e-04, eps_rel: 1.0e-04, eps_infeas: 1.0e-07
alpha: 1.50, scale: 1.00e-01, adaptive_scale: 1
max_iters: 100000, normalize: 1, rho_x: 1.00e-06
acceleration_lookback: 10, acceleration_interval: 10
compiled with openmp parallelization enabled
lin-sys: sparse-direct-amd-qdldl
nnz(A): 18172888, nnz(P): 0
^C
where Convex compiles the problem in 4 seconds, but then SCS gets stuck trying to factor the matrix.
Is this your real problem? The problem is difficult to solve, even by a specialized linear optimizer like Gurobi. 0.01
seems small, but the problem is still quite βdenseβ.