1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-27 02:45:30 +01:00

use MKLDirect for G₂

This commit is contained in:
Marek Kaluba 2023-04-06 16:16:27 +02:00
parent 58f0ccb141
commit 56aed88416
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -1,6 +1,6 @@
using LinearAlgebra using LinearAlgebra
BLAS.set_num_threads(8) BLAS.set_num_threads(8)
using MKL_jll
ENV["OMP_NUM_THREADS"] = 4 ENV["OMP_NUM_THREADS"] = 4
using Groups using Groups
@ -84,16 +84,59 @@ unit = Δ
warm = nothing warm = nothing
solve_in_loop( let status = JuMP.OPTIMIZE_NOT_CALLED, warm = warm, eps = 1e-9
model, certified, λ = false, 0.0
wd, while status JuMP.OPTIMAL
varP; @time status, warm = PropertyT.solve(
logdir = "./log/G2/r=$HALFRADIUS/Adj-InfΔ", model,
optimizer = scs_optimizer(; scs_optimizer(;
eps = 1e-10, linear_solver = SCS.MKLDirectSolver,
max_iters = 50_000, eps = eps,
accel = 50, max_iters = 100_000,
alpha = 1.95, accel = 50,
), alpha = 1.95,
data = (elt = elt, unit = unit, halfradius = HALFRADIUS), ),
) warm,
)
@info "reconstructing the solution"
Q = @time let wd = wd, Ps = [JuMP.value.(P) for P in varP], eps = eps
PropertyT.__droptol!.(Ps, 100eps)
Qs = real.(sqrt.(Ps))
PropertyT.__droptol!.(Qs, eps)
PropertyT.reconstruct(Qs, wd)
end
@info "certifying the solution"
@time certified, λ = PropertyT.certify_solution(
elt,
unit,
JuMP.objective_value(model),
Q;
halfradius = HALFRADIUS,
augmented = true,
)
end
if certified && λ > 0
Κ(λ, S) = round(sqrt(2λ / length(S)), Base.RoundDown; digits = 5)
@info "Certified result: $G has property (T):" N λ Κ(λ, S)
else
@info "Could NOT certify the result:" certified λ
end
end
# solve_in_loop(
# model,
# wd,
# varP;
# logdir = "./log/G2/r=$HALFRADIUS/Adj-InfΔ",
# optimizer = scs_optimizer(;
# eps = 1e-10,
# max_iters = 50_000,
# accel = 50,
# alpha = 1.95,
# ),
# data = (elt = elt, unit = unit, halfradius = HALFRADIUS),
# )