From 38f5c2043558b52c63be27339850c9ae9c0d48d4 Mon Sep 17 00:00:00 2001 From: fpacaud Date: Sun, 10 Mar 2024 16:18:35 +0100 Subject: [PATCH] update documentation --- .ci/setup.jl | 7 +++---- docs/src/lib/kkt.md | 3 +-- docs/src/optim/biegler.md | 16 ++++++++++------ docs/src/optim/reducedspace.md | 6 +++--- docs/src/quickstart/cpu.md | 15 --------------- 5 files changed, 17 insertions(+), 30 deletions(-) diff --git a/.ci/setup.jl b/.ci/setup.jl index 9a9506ff..602ec6cf 100644 --- a/.ci/setup.jl +++ b/.ci/setup.jl @@ -1,10 +1,9 @@ using Pkg -Pkg.instantiate() - -using CUDA - argos_path = joinpath(@__DIR__, "..") Pkg.develop(path=argos_path) +Pkg.instantiate() + +using CUDA CUDA.set_runtime_version!(v"11.8") diff --git a/docs/src/lib/kkt.md b/docs/src/lib/kkt.md index 33459e0d..36daf00a 100644 --- a/docs/src/lib/kkt.md +++ b/docs/src/lib/kkt.md @@ -4,10 +4,9 @@ CurrentModule = Argos # KKT systems -Argos implements two KKT systems [`MadNLP.AbstractKKTSystem`](https://madnlp.github.io/MadNLP.jl/dev/lib/kkt/#MadNLP.AbstractKKTSystem) +Argos implements a MadNLP's KKT system [`MadNLP.AbstractKKTSystem`](https://madnlp.github.io/MadNLP.jl/dev/lib/kkt/#MadNLP.AbstractKKTSystem) whose operations can be deported on NVIDIA GPU. ```@docs BieglerKKTSystem -MixedAuglagKKTSystem ``` diff --git a/docs/src/optim/biegler.md b/docs/src/optim/biegler.md index 5192016d..363016d2 100644 --- a/docs/src/optim/biegler.md +++ b/docs/src/optim/biegler.md @@ -52,13 +52,17 @@ KKT = Argos.BieglerKKTSystem{Float64, Vector{Int}, Vector{Float64}, Matrix{Float and we instantiate MadNLP with: ```@example bieglermadnlp using MadNLP -# This syntax is a bit too involved and should be improved in the future. -madnlp_options = Dict{Symbol, Any}() -madnlp_options[:linear_solver] = MadNLP.LapackCPUSolver -opt_ipm, opt_linear, logger = MadNLP.load_options(; madnlp_options...) -KKT = Argos.BieglerKKTSystem{Float64, Vector{Int}, Vector{Float64}, Matrix{Float64}} -solver = MadNLP.MadNLPSolver{Float64, KKT}(model, opt_ipm, opt_linear; logger=logger) +T = Float64 +VI = Vector{Int} +VT = Vector{T} +MT = Matrix{T} +solver = MadNLP.MadNLPSolver( + model; + kkt_system=Argos.BieglerKKTSystem{T, VI, VT, MT}, + linear_solver=LapackCPUSolver, + callback=MadNLP.SparseCallback, +) ``` Note that we are again using Lapack as linear solver: indeed the resulting Biegler's KKT system is dense (we use the same condensification procedure as in the diff --git a/docs/src/optim/reducedspace.md b/docs/src/optim/reducedspace.md index e0692f14..908c7143 100644 --- a/docs/src/optim/reducedspace.md +++ b/docs/src/optim/reducedspace.md @@ -56,7 +56,7 @@ a dense linear solver (as Lapack): ```@example reducedmadnlp solver = MadNLP.MadNLPSolver( model; - kkt_system=MadNLP.DENSE_KKT_SYSTEM, + kkt_system=MadNLP.DenseKKTSystem, linear_solver=LapackCPUSolver, ) MadNLP.get_kkt(solver.kkt) @@ -72,7 +72,7 @@ only proportional to the number of variables (here, `5`): ```@example reducedmadnlp solver = MadNLP.MadNLPSolver( model; - kkt_system=MadNLP.DENSE_CONDENSED_KKT_SYSTEM, + kkt_system=MadNLP.DenseCondensedKKTSystem, linear_solver=LapackCPUSolver, ) MadNLP.get_kkt(solver.kkt) @@ -105,7 +105,7 @@ We recommend changing the default tolerance to be above the tolerance using MadNLPGPU solver = MadNLP.MadNLPSolver( model; - kkt_system=MadNLP.DENSE_CONDENSED_KKT_SYSTEM, + kkt_system=MadNLP.DenseCondensedKKTSystem, linear_solver=LapackGPUSolver, tol=1e=5, ) diff --git a/docs/src/quickstart/cpu.md b/docs/src/quickstart/cpu.md index 5978e9b1..07a488f9 100644 --- a/docs/src/quickstart/cpu.md +++ b/docs/src/quickstart/cpu.md @@ -36,21 +36,6 @@ datafile = joinpath(INSTANCES_DIR, "case118.m") ``` -## Full-space method - -!!! tip - At each iteration of the algorithm, - `FullSpace` solves the KKT system with a sparse linear solver. - By default, MadNLP is using Umfpack, but we recommend installing - [MadNLPHSL](https://madnlp.github.io/MadNLP.jl/dev/installation/#HSL-linear-solver) - and uses ma27 (`linear_solver=Ma27Solver`) or ma57 (`linear_solver=Ma57Solver`). - - -```@repl quickstart_cpu -Argos.run_opf(datafile, Argos.FullSpace()); - -``` - ## Biegler's method (linearize-then-reduce) !!! tip