Skip to content

Commit c5ab961

Browse files
committed
Update Uno to support ExaModels modeler
- Add (:collocation, :exa, :uno, :cpu) method to available methods - Update tests to include Uno with Exa modeler (8 combinations total) - Update method counts: 10 CPU methods + 2 GPU methods = 12 total - Update CHANGELOG to reflect Uno works with both ADNLP and Exa - Remove ADNLP-only restriction from documentation
1 parent 67b9d4a commit c5ab961

5 files changed

Lines changed: 16 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1313

1414
- **Uno solver integration**: Full support for the Uno nonlinear optimization solver
1515
- Added to solver registry with CPU-only support
16-
- Added method `(:collocation, :adnlp, :uno, :cpu)` to available methods
17-
- Uno only compatible with ADNLP modeler (not ExaModels)
16+
- Added methods `(:collocation, :adnlp, :uno, :cpu)` and `(:collocation, :exa, :uno, :cpu)` to available methods
17+
- Uno compatible with both ADNLP and Exa modelers
1818
- Comprehensive test coverage with Beam and Goddard problems
1919
- Extension error handling when `UnoSolver` package not loaded
2020

@@ -34,8 +34,8 @@ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3434
### Changed
3535

3636
- **Solver count**: Updated from 4 to 5 available solvers (Ipopt, MadNLP, Uno, MadNCL, Knitro)
37-
- **Method count**: Updated from 10 to 11 available methods (9 CPU + 2 GPU)
38-
- **Test structure**: Restructured canonical tests to use modeler-solver pairs, respecting Uno/ADNLP-only constraint
37+
- **Method count**: Updated from 10 to 12 available methods (10 CPU + 2 GPU)
38+
- **Test structure**: Restructured canonical tests to use modeler-solver pairs, Uno now works with both ADNLP and Exa
3939
- **Documentation**: Updated solver lists and examples throughout documentation to include Uno
4040

4141
---

docs/src/manual-solve.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ Each method is a **quadruplet** `(discretizer, modeler, solver, parameter)`:
100100
- `:exa`: uses [`ExaModels.ExaModel`](@extref) with SIMD optimization (GPU-capable)
101101

102102
3. **Solver** — which NLP solver to use:
103-
- `:ipopt`: [Ipopt](https://coin-or.github.io/Ipopt/) interior point solver
103+
- `:ipopt`: [Ipopt](https://coin-or.github.io/Ipopt/) interior point solver (CPU-only)
104104
- `:madnlp`: [MadNLP](https://madnlp.github.io/MadNLP.jl/) pure-Julia solver (GPU-capable)
105-
- `:uno`: [Uno](https://unosolver.readthedocs.io) unified nonlinear optimization solver (CPU-only, ADNLP-only)
105+
- `:uno`: [Uno](https://unosolver.readthedocs.io) unified nonlinear optimization solver (CPU-only)
106106
- `:madncl`: [MadNCL](https://github.com/MadNLP/MadNCL.jl) (GPU-capable)
107107
- `:knitro`: [Knitro](https://www.artelys.com/solvers/knitro/) commercial solver (license required)
108108

src/helpers/methods.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ function Base.methods()::Tuple{Vararg{Tuple{Symbol,Symbol,Symbol,Symbol}}}
4949
(:collocation, :adnlp, :knitro, :cpu),
5050
(:collocation, :exa, :ipopt, :cpu),
5151
(:collocation, :exa, :madnlp, :cpu),
52+
(:collocation, :exa, :uno, :cpu),
5253
(:collocation, :exa, :madncl, :cpu),
5354
(:collocation, :exa, :knitro, :cpu),
5455

test/suite/helpers/test_methods.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ function test_methods()
3737
Test.@test (:collocation, :adnlp, :knitro, :cpu) in methods
3838
Test.@test (:collocation, :exa, :ipopt, :cpu) in methods
3939
Test.@test (:collocation, :exa, :madnlp, :cpu) in methods
40+
Test.@test (:collocation, :exa, :uno, :cpu) in methods
4041
Test.@test (:collocation, :exa, :madncl, :cpu) in methods
4142
Test.@test (:collocation, :exa, :knitro, :cpu) in methods
4243

4344
# GPU methods (new functionality)
4445
Test.@test (:collocation, :exa, :madnlp, :gpu) in methods
4546
Test.@test (:collocation, :exa, :madncl, :gpu) in methods
4647

47-
# Total count: 9 CPU methods + 2 GPU methods = 11 methods
48-
Test.@test length(methods) == 11
48+
# Total count: 10 CPU methods + 2 GPU methods = 12 methods
49+
Test.@test length(methods) == 12
4950
end
5051

5152
Test.@testset "Parameter Distribution" begin
@@ -55,7 +56,7 @@ function test_methods()
5556
cpu_methods = filter(m -> m[4] == :cpu, methods)
5657
gpu_methods = filter(m -> m[4] == :gpu, methods)
5758

58-
Test.@test length(cpu_methods) == 9 # All original methods now with :cpu + Uno
59+
Test.@test length(cpu_methods) == 10 # All original methods now with :cpu + Uno
5960
Test.@test length(gpu_methods) == 2 # Only GPU-capable combinations
6061
end
6162

@@ -175,8 +176,8 @@ function test_methods()
175176
gpu_methods = filter(m -> m[4] == :gpu, methods)
176177

177178
# CPU methods should include all combinations except GPU-only
178-
Test.@test length(cpu_methods) == 9
179-
Test.@test length(gpu_methods) == 2
179+
Test.@test length(cpu_methods) == 10 # All original methods now with :cpu + Uno
180+
Test.@test length(gpu_methods) == 2 # Only GPU-capable combinations
180181

181182
# Total should match expected
182183
Test.@test length(methods) == length(cpu_methods) + length(gpu_methods)

test/suite/solve/test_canonical.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,17 @@ function test_canonical()
6363
),
6464
]
6565

66-
# Define modeler-solver pairs (Uno only works with ADNLP)
66+
# Define modeler-solver pairs (Uno works with both ADNLP and Exa)
6767
modeler_solver_pairs = [
6868
# ADNLP modeler with all solvers
6969
("ADNLP", "Ipopt", OptimalControl.ADNLP(), OptimalControl.Ipopt(print_level=0)),
7070
("ADNLP", "MadNLP", OptimalControl.ADNLP(), OptimalControl.MadNLP(print_level=MadNLP.ERROR)),
7171
("ADNLP", "Uno", OptimalControl.ADNLP(), OptimalControl.Uno(logger="SILENT")),
7272
("ADNLP", "MadNCL", OptimalControl.ADNLP(), OptimalControl.MadNCL(print_level=MadNLP.ERROR)),
73-
# Exa modeler with all solvers except Uno
73+
# Exa modeler with all solvers
7474
("Exa", "Ipopt", OptimalControl.Exa(), OptimalControl.Ipopt(print_level=0)),
7575
("Exa", "MadNLP", OptimalControl.Exa(), OptimalControl.MadNLP(print_level=MadNLP.ERROR)),
76+
("Exa", "Uno", OptimalControl.Exa(), OptimalControl.Uno(logger="SILENT")),
7677
("Exa", "MadNCL", OptimalControl.Exa(), OptimalControl.MadNCL(print_level=MadNLP.ERROR)),
7778
]
7879

0 commit comments

Comments
 (0)