Skip to content

[ExaModelsMOI] tidy up the MOI wrapper - #290

Merged
sshin23 merged 3 commits into
madsuite-org:mainfrom
odow:od/tidy
Aug 15, 2026
Merged

[ExaModelsMOI] tidy up the MOI wrapper#290
sshin23 merged 3 commits into
madsuite-org:mainfrom
odow:od/tidy

Conversation

@odow

@odow odow commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

I'm taking a look to see if we can improve the JuMP -> ExaModels conversion. The first step is to tidy up the wrapper that is already there.

My other TODOs:

  • Enable MOI.Test.runtests
  • Add support for the incremental interface
    I think we can support MOI.add_constraint. We just need to keep the bin around, and then we can convert it to an add_con at runtime. This would save on a cache of the problem between the bridges and ExaModels. In my benchmarks below I have explicitly add_bridges = false.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.06878% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.42%. Comparing base (6f15038) to head (50a544f).
⚠️ Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
ext/ExaModelsMOI.jl 83.06% 32 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #290       +/-   ##
===========================================
- Coverage   80.80%   54.42%   -26.38%     
===========================================
  Files          20       25        +5     
  Lines        2021     3886     +1865     
===========================================
+ Hits         1633     2115      +482     
- Misses        388     1771     +1383     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results


Relative timing: current / main  (values < 1.0 are improvements)

================================================================================
  backend-instance-param          |      obj     cons     grad      jac     hess
================================================================================
  CUDA-OPF-case1354               |    1.009    0.986    0.993    0.986    0.993
  CUDA-OPF-case14                 |    1.004    0.986    0.994    0.991    0.996
  CUDA-OPF-case30000              |    0.984    0.986    0.994    0.991    1.001
  CUDA-chain-10                   |    1.028    0.996    0.995    1.007    1.027
  CUDA-chain-100                  |    1.014    0.996    0.994    1.001    0.991
  CUDA-chain-1000                 |    1.002    0.997    0.996    1.001    0.994
  CUDA-elec-10                    |    1.003    0.989    0.996    0.998    0.999
  CUDA-elec-100                   |    1.008    0.992    0.994    0.996    0.997
  CUDA-elec-1000                  |    0.908    0.993    0.994    0.996    3.745
  CUDA-rosenrock-1000             |    0.997    1.010    1.014    0.996    0.989
  CUDA-rosenrock-10000            |    0.998    1.007    1.013    1.003    0.985
  CUDA-rosenrock-100000           |    1.000    1.014    1.014    1.000    0.959
--------------------------------------------------------------------------------
  AMDGPU-OPF-case1354             |    0.991    1.005    1.003    1.019    1.015
  AMDGPU-OPF-case14               |    1.042    0.991    0.996    1.003    1.018
  AMDGPU-OPF-case30000            |    0.993    1.003    0.998    1.023    1.024
  AMDGPU-chain-10                 |    1.373    0.998    1.011    0.999    0.995
  AMDGPU-chain-100                |    1.007    1.004    1.010    0.998    0.998
  AMDGPU-chain-1000               |    1.005    1.003    1.017    0.988    0.992
  AMDGPU-elec-10                  |    1.005    1.005    1.013    1.006    0.990
  AMDGPU-elec-100                 |    1.006    1.002    1.011    1.011    1.003
  AMDGPU-elec-1000                |    1.008    1.017    1.126    1.005    0.993
  AMDGPU-rosenrock-1000           |    0.942    0.972    1.023    1.029    1.029
  AMDGPU-rosenrock-10000          |    1.075    1.024    1.028    1.045    1.019
  AMDGPU-rosenrock-100000         |    1.717    0.976    1.009    1.067    1.058
--------------------------------------------------------------------------------
  oneAPI-OPF-case1354             |    2.428    0.803    0.970    1.050    0.789
  oneAPI-OPF-case14               |    1.144    0.866    0.916    0.919    0.870
  oneAPI-OPF-case30000            |    0.914    1.059    1.562    0.413    0.944
  oneAPI-chain-10                 |    0.933    0.953    0.909    0.801    0.857
  oneAPI-chain-100                |    0.773    1.014    0.969    0.856    0.894
  oneAPI-chain-1000               |    1.333    0.869    0.771    1.184    0.899
  oneAPI-elec-10                  |    0.900    0.786    0.996    0.957    0.871
  oneAPI-elec-100                 |    1.017    1.050    0.897    1.085    0.811
  oneAPI-elec-1000                |    1.010    0.751    1.173    0.718    0.884
  oneAPI-rosenrock-1000           |    1.024    0.722    0.888    1.312    0.790
  oneAPI-rosenrock-10000          |    1.065    1.288    1.164    0.102    0.935
  oneAPI-rosenrock-100000         |    0.982    0.972    1.031    0.846    0.973
--------------------------------------------------------------------------------
  nothing-OPF-case1354            |    1.002    0.997    1.027    1.001    0.728
  nothing-OPF-case14              |    0.982    1.006    0.989    0.995    0.730
  nothing-OPF-case30000           |    1.006    0.999    1.011    0.986    0.998
  nothing-chain-10                |    1.022    1.006    1.026    1.015    1.001
  nothing-chain-100               |    0.990    0.959    0.994    1.073    0.720
  nothing-chain-1000              |    1.081    0.945    0.995    1.065    1.175
  nothing-elec-10                 |    1.001    0.991    0.999    1.041    0.981
  nothing-elec-100                |    1.009    0.995    1.000    1.001    0.945
  nothing-elec-1000               |    1.000    1.002    1.001    1.006    0.999
  nothing-rosenrock-1000          |    0.997    1.152    0.986    0.996    0.919
  nothing-rosenrock-10000         |    1.006    1.001    1.248    1.014    0.837
  nothing-rosenrock-100000        |    1.000    0.993    0.994    1.012    0.511
================================================================================

@odow

odow commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Before

julia> ret = benchmark(
           "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
           () -> ExaModels.Optimizer(NLPModelsIpopt.ipopt, KernelAbstractions.CPU()),
       )

This is Ipopt version 3.14.19, running with linear solver MUMPS 5.9.0.

Number of nonzeros in equality constraint Jacobian...:  1564906
Number of nonzeros in inequality constraint Jacobian.:   212038
Number of nonzeros in Lagrangian Hessian.............:  3116094

Total number of variables............................:   208047
                     variables with only lower bounds:        0
                variables with lower and upper bounds:   178047
                     variables with only upper bounds:        0
Total number of equality constraints.................:   201573
Total number of inequality constraints...............:   106019
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:    35233
        inequality constraints with only upper bounds:    70786

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  1.0023676e+06 1.81e+01 1.45e+02  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1  1.0045547e+06 1.79e+01 1.43e+02  -1.0 2.27e+01    -  1.54e-02 1.08e-02f  1
   2  1.0009457e+06 1.76e+01 1.42e+02  -1.0 2.36e+01    -  1.02e-02 1.79e-02f  1
   3  9.9701266e+05 1.70e+01 1.40e+02  -1.0 3.91e+01    -  1.45e-02 3.44e-02f  1
   4  9.9637283e+05 1.60e+01 1.34e+02  -1.0 9.99e+01    -  4.20e-02 6.10e-02f  1
   5  9.9646189e+05 1.52e+01 1.18e+02  -1.0 2.01e+02    -  1.20e-01 4.59e-02h  2
   6  9.9648410e+05 1.44e+01 9.74e+01  -1.0 2.65e+02    -  1.74e-01 5.39e-02h  2
   7  9.9648332e+05 1.39e+01 9.06e+01  -1.0 3.27e+02    -  7.01e-02 3.73e-02h  3
   8  9.9647644e+05 1.36e+01 8.47e+01  -1.0 3.64e+02    -  6.61e-02 2.18e-02h  3
   9  9.9646634e+05 1.34e+01 7.99e+01  -1.0 3.85e+02    -  5.73e-02 1.13e-02h  3
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10  9.9644649e+05 1.32e+01 7.42e+01  -1.0 3.95e+02    -  7.15e-02 1.79e-02h  3
  11  9.9643254e+05 1.30e+01 6.16e+01  -1.0 4.08e+02    -  1.71e-01 1.62e-02h  4
  12  9.9641393e+05 1.27e+01 5.38e+01  -1.0 4.53e+02    -  1.28e-01 2.02e-02h  5
  13  9.9640328e+05 1.25e+01 3.99e+01  -1.0 4.67e+02    -  2.64e-01 2.08e-02h  5
  14  9.9638764e+05 1.22e+01 3.04e+01  -1.0 5.03e+02    -  2.49e-01 2.17e-02h  5
  15  9.9628646e+05 1.04e+01 2.63e+01  -1.0 5.20e+02    -  1.33e-01 1.44e-01w  1
  16  9.9630330e+05 1.03e+01 2.63e+01  -1.0 5.13e+02    -  7.06e-04 9.06e-03w  1
  17  9.9662442e+05 8.88e+00 2.38e+01  -1.0 5.08e+02    -  7.71e-02 1.41e-01w  1
  18  9.9636234e+05 1.17e+01 2.67e+01  -1.0 5.15e+02    -  1.33e-01 3.61e-02h  2
  19  9.9636030e+05 1.13e+01 2.62e+01  -1.0 4.74e+02    -  1.34e-02 4.23e-02h  3
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  20  9.9638652e+05 1.09e+01 2.42e+01  -1.0 4.85e+02    -  1.19e-01 3.55e-02h  2
  21  9.9644034e+05 1.04e+01 2.30e+01  -1.0 4.94e+02    -  2.73e-02 4.36e-02h  2
  22  9.9658159e+05 9.66e+00 2.17e+01  -1.0 5.01e+02    -  9.90e-02 6.96e-02H  1
  23  9.9673962e+05 9.23e+00 2.08e+01  -1.0 5.08e+02    -  5.80e-02 4.48e-02h  2
  24  9.9696340e+05 8.75e+00 1.99e+01  -1.0 5.58e+02    -  6.40e-02 5.13e-02h  1
  25  9.9742751e+05 8.14e+00 1.88e+01  -1.0 5.04e+02    -  1.32e-01 6.97e-02h  1
  26  9.9826945e+05 7.58e+00 1.74e+01  -1.0 4.91e+02    -  4.34e-02 6.98e-02h  1
  27  9.9917219e+05 7.19e+00 1.67e+01  -1.0 5.66e+02    -  2.94e-02 5.08e-02h  1
  28  1.0003842e+06 6.84e+00 1.60e+01  -1.0 5.98e+02    -  3.02e-02 4.89e-02h  1
  29  1.0015995e+06 6.61e+00 1.56e+01  -1.0 6.23e+02    -  2.66e-02 3.37e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  30  1.0058385e+06 6.16e+00 1.48e+01  -1.0 5.59e+02    -  1.10e-02 6.74e-02h  1
  31  1.0097067e+06 5.83e+00 1.40e+01  -1.0 6.22e+02    -  5.19e-02 5.43e-02h  1
  32  1.0157265e+06 5.44e+00 1.32e+01  -1.0 5.55e+02    -  1.60e-02 6.75e-02h  1
  33  1.0193403e+06 5.23e+00 1.27e+01  -1.0 5.37e+02    -  4.09e-02 3.77e-02h  1
  34  1.0295229e+06 4.70e+00 1.14e+01  -1.0 5.07e+02    -  3.36e-02 1.02e-01h  1
  35  1.0358891e+06 4.39e+00 1.08e+01  -1.0 5.59e+02    -  1.24e-01 6.54e-02h  1
  36  1.0404043e+06 4.18e+00 1.02e+01  -1.0 5.36e+02    -  6.23e-02 4.94e-02h  1
  37  1.0504393e+06 3.72e+00 9.07e+00  -1.0 5.25e+02    -  7.61e-02 1.09e-01h  1
  38  1.0554845e+06 3.51e+00 8.70e+00  -1.0 4.95e+02    -  1.65e-01 5.79e-02h  1
  39  1.0638675e+06 3.17e+00 7.70e+00  -1.0 5.26e+02    -  1.67e-02 9.65e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  40  1.0730829e+06 2.80e+00 6.77e+00  -1.0 5.44e+02    -  7.61e-02 1.15e-01h  1
  41  1.0777150e+06 2.63e+00 6.39e+00  -1.0 5.68e+02    -  1.43e-01 6.34e-02h  1
  42  1.0834401e+06 2.41e+00 5.82e+00  -1.0 6.12e+02    -  1.97e-02 8.19e-02h  1
  43  1.0848374e+06 2.36e+00 5.71e+00  -1.0 6.10e+02    -  4.01e-02 2.15e-02h  1
  44  1.0880012e+06 2.24e+00 5.39e+00  -1.0 6.53e+02    -  9.25e-02 4.96e-02h  1
  45  1.0932907e+06 2.05e+00 4.92e+00  -1.0 7.02e+02    -  8.83e-02 8.62e-02h  1
  46  1.0973444e+06 1.90e+00 8.13e+00  -1.0 7.36e+02    -  1.14e-01 7.15e-02h  1
  47  1.1026513e+06 1.71e+00 4.96e+00  -1.0 7.62e+02    -  7.37e-02 9.88e-02h  1
  48  1.1072719e+06 1.56e+00 5.47e+00  -1.0 7.82e+02    -  1.01e-01 9.13e-02h  1
  49  1.1147944e+06 1.31e+00 6.29e+00  -1.0 7.98e+02    -  6.18e-02 1.57e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  50  1.1175246e+06 1.23e+00 8.18e+00  -1.0 7.55e+02    -  1.68e-01 6.44e-02h  1
  51  1.1254488e+06 9.93e-01 1.39e+01  -1.0 7.82e+02    -  2.44e-01 1.93e-01h  1
  52  1.1305180e+06 8.55e-01 8.52e+00  -1.0 7.03e+02    -  1.20e-01 1.39e-01h  1
  53  1.1329681e+06 8.01e-01 3.29e+01  -1.0 3.79e+02    -  1.84e-01 6.35e-02h  1
  54  1.1397919e+06 6.44e-01 9.79e+00  -1.0 5.22e+02    -  3.13e-02 1.96e-01h  1
  55  1.1413912e+06 6.07e-01 5.93e+01  -1.0 5.75e+02    -  3.10e-01 5.89e-02h  1
  56  1.1488195e+06 4.46e-01 6.56e+01  -1.0 4.72e+02    -  3.42e-01 2.65e-01h  1
  57  1.1567885e+06 2.77e-01 1.16e+02  -1.0 4.97e+02    -  5.76e-01 3.81e-01h  1
  58  1.1599348e+06 2.14e-01 1.74e+01  -1.0 4.97e+02    -  8.16e-02 2.28e-01h  1
  59  1.1700832e+06 1.44e-02 7.64e+00  -1.0 4.46e+02    -  9.90e-01 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  60  1.1701894e+06 1.47e-03 3.31e+01  -1.0 1.31e+02    -  9.96e-01 9.94e-01h  1
  61  1.1701698e+06 1.12e-04 2.26e-02  -1.0 5.52e+00    -  1.00e+00 1.00e+00f  1
  62  1.1663547e+06 1.28e-02 9.33e+01  -2.5 1.48e+02    -  2.00e-01 2.07e-01f  1
  63  1.1633118e+06 9.69e-03 1.35e+03  -2.5 9.89e+00  -2.0 1.21e-01 2.41e-01f  1
  64  1.1627437e+06 9.59e-03 4.74e+02  -2.5 1.69e+02    -  1.25e-01 3.76e-02f  1
  65  1.1606698e+06 1.14e-02 7.56e+02  -2.5 1.55e+02    -  1.03e-01 1.46e-01f  1
  66  1.1590679e+06 1.16e-02 5.82e+02  -2.5 1.06e+02    -  1.42e-01 1.31e-01f  1
  67  1.1580211e+06 1.10e-02 7.05e+02  -2.5 5.88e+01    -  6.60e-02 9.39e-02f  1
  68  1.1561062e+06 1.01e-02 5.73e+02  -2.5 5.46e+01    -  1.92e-01 1.93e-01f  1
  69  1.1550009e+06 8.98e-03 2.83e+02  -2.5 4.95e+01    -  1.70e-01 1.24e-01f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  70  1.1531837e+06 1.00e-02 8.22e+02  -2.5 4.59e+01    -  7.04e-02 2.23e-01f  1
  71  1.1525072e+06 9.47e-03 7.17e+02  -2.5 4.38e+01    -  9.83e-02 8.96e-02f  1
  72  1.1517588e+06 8.97e-03 9.04e+02  -2.5 5.37e+01    -  2.83e-02 1.09e-01f  1
  73  1.1508418e+06 8.61e-03 8.27e+02  -2.5 5.71e+01    -  1.37e-01 1.58e-01f  1
  74  1.1501436e+06 7.99e-03 7.17e+02  -2.5 5.08e+01    -  1.26e-01 1.23e-01f  1
  75  1.1498319e+06 7.52e-03 3.42e+02  -2.5 2.26e+01    -  2.02e-01 6.54e-02f  1
  76  1.1486711e+06 8.98e-03 4.27e+02  -2.5 2.12e+01    -  1.54e-01 2.41e-01f  1
  77  1.1485753e+06 8.73e-03 1.91e+02  -2.5 1.59e+02    -  1.67e-01 2.79e-02f  1
  78  1.1477342e+06 6.78e-03 3.69e+02  -2.5 1.73e+02    -  7.16e-02 2.37e-01f  1
  79  1.1469814e+06 5.16e-03 1.77e+02  -2.5 7.31e+01    -  3.24e-01 2.43e-01f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  80  1.1468699e+06 4.94e-03 8.15e+01  -2.5 2.50e+02    -  1.46e-01 4.29e-02f  1
  81  1.1464570e+06 5.22e-03 6.21e+01  -2.5 3.61e+02    -  1.79e-01 1.71e-01f  1
  82  1.1459789e+06 7.49e-03 1.39e+02  -2.5 2.04e+02    -  8.54e-02 2.33e-01f  1
  83  1.1455396e+06 9.93e-03 1.79e+02  -2.5 1.44e+02    -  1.13e-01 2.40e-01f  1
  84  1.1452977e+06 8.69e-03 8.09e+01  -2.5 2.60e+02    -  2.98e-01 1.69e-01h  1
  85  1.1449955e+06 1.16e-02 5.45e+01  -2.5 1.53e+02    -  2.61e-01 2.43e-01h  1
  86  1.1447407e+06 1.12e-02 4.70e+01  -2.5 9.83e+01    -  2.39e-01 2.62e-01h  1
  87  1.1446108e+06 1.02e-02 5.84e+01  -2.5 1.08e+02    -  5.97e-01 1.73e-01h  1
  88  1.1444436e+06 8.83e-03 1.18e+02  -2.5 1.51e+02    -  1.00e+00 2.49e-01h  1
  89  1.1440451e+06 1.82e-02 2.27e+01  -2.5 1.03e+02    -  7.77e-01 8.07e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  90  1.1439634e+06 7.72e-04 4.74e-03  -2.5 2.32e+01    -  1.00e+00 1.00e+00h  1
  91  1.1439634e+06 7.71e-06 6.60e-05  -2.5 1.18e+00    -  1.00e+00 1.00e+00h  1
  92  1.1436887e+06 5.79e-03 1.74e+01  -3.8 3.36e+02    -  2.14e-01 1.76e-01f  1
  93  1.1436168e+06 5.62e-03 5.81e+01  -3.8 1.86e+02    -  1.68e-01 5.65e-02h  1
  94  1.1433144e+06 4.92e-03 6.71e+00  -3.8 1.35e+02    -  9.32e-02 2.47e-01f  1
  95  1.1432405e+06 4.57e-03 6.22e+00  -3.8 1.90e+02    -  7.04e-02 7.11e-02h  1
  96  1.1431600e+06 4.19e-03 5.68e+00  -3.8 1.88e+02    -  1.02e-01 9.62e-02h  1
  97  1.1430670e+06 5.22e-03 2.12e+01  -3.8 2.61e+02    -  3.41e-02 1.11e-01h  1
  98  1.1430458e+06 5.20e-03 1.18e+01  -3.8 2.15e+02    -  1.28e-01 2.76e-02h  1
  99  1.1429785e+06 5.21e-03 1.30e+01  -3.8 1.35e+02    -  1.46e-01 1.00e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 100  1.1429333e+06 5.38e-03 1.01e+01  -3.8 2.89e+02    -  4.75e-02 5.89e-02h  1
 101  1.1428689e+06 6.94e-03 6.10e+00  -3.8 2.76e+02    -  7.02e-02 8.91e-02h  1
 102  1.1428079e+06 9.30e-03 1.83e+01  -3.8 2.79e+02    -  1.77e-01 9.81e-02h  1
 103  1.1426947e+06 1.63e-02 1.85e+01  -3.8 3.03e+02    -  2.17e-01 1.90e-01h  1
 104  1.1426814e+06 1.59e-02 3.00e+01  -3.8 1.71e+02    -  1.42e-01 2.85e-02h  1
 105  1.1426232e+06 1.48e-02 2.44e+01  -3.8 1.25e+02    -  1.34e-01 1.47e-01h  1
 106  1.1425801e+06 1.37e-02 3.66e+01  -3.8 1.05e+02    -  3.47e-01 1.48e-01h  1
 107  1.1425644e+06 1.23e-02 4.16e+01  -3.8 2.32e+00  -2.5 2.69e-01 1.02e-01h  1
 108  1.1425337e+06 9.73e-03 3.55e+01  -3.8 2.48e+00  -3.0 2.76e-01 2.09e-01h  1
 109  1.1425273e+06 9.57e-03 3.54e+01  -3.8 1.65e+02    -  7.49e-02 3.44e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 110  1.1424728e+06 4.50e-03 1.60e+01  -3.8 1.59e+00  -2.5 1.57e-01 5.30e-01h  1
 111  1.1424458e+06 2.45e-03 5.55e+00  -3.8 2.45e+00  -3.0 5.22e-01 4.60e-01h  1
 112  1.1424372e+06 1.97e-03 1.53e+01  -3.8 4.77e+00  -3.5 8.01e-01 2.07e-01h  1
 113  1.1424262e+06 3.71e-03 1.38e+01  -3.8 7.33e+00  -4.0 7.18e-01 2.65e-01h  1
 114  1.1424242e+06 3.90e-03 1.35e+01  -3.8 6.72e+02    -  2.67e-02 2.11e-02h  1
 115  1.1424210e+06 3.69e-03 1.29e+01  -3.8 1.10e+01  -4.4 3.00e-01 8.63e-02h  1
 116  1.1424138e+06 6.67e-03 1.10e+01  -3.8 1.72e+01  -4.9 3.42e-01 1.76e-01h  1
 117  1.1424121e+06 1.06e-02 1.07e+01  -3.8 3.20e+02    -  6.55e-02 3.12e-02h  1
 118  1.1424045e+06 1.05e-02 8.62e+00  -3.8 1.12e+02    -  1.86e-01 1.94e-01h  1
 119  1.1424019e+06 8.82e-03 7.07e+00  -3.8 1.83e+01  -5.4 4.62e-01 1.57e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 120  1.1423962e+06 3.72e-03 3.72e+00  -3.8 3.35e+00  -4.1 9.76e-01 5.76e-01h  1
 121  1.1423925e+06 1.64e-03 1.40e+00  -3.8 3.37e+00  -4.5 6.07e-01 6.80e-01h  1
 122  1.1423912e+06 1.62e-03 1.11e-03  -3.8 1.25e+00  -4.1 1.00e+00 1.00e+00h  1
 123  1.1423883e+06 4.68e-03 1.36e+00  -3.8 7.73e+01    -  3.48e-01 5.38e-01h  1
 124  1.1423878e+06 8.70e-03 4.30e-01  -3.8 2.52e+01    -  6.47e-01 5.56e-01h  1
 125  1.1423875e+06 2.65e-03 8.24e-04  -3.8 1.28e+01    -  1.00e+00 1.00e+00h  1
 126  1.1423876e+06 4.65e-04 2.78e-05  -3.8 2.85e+00    -  1.00e+00 1.00e+00h  1
 127  1.1423876e+06 3.05e-06 6.03e-07  -3.8 1.85e-01    -  1.00e+00 1.00e+00h  1
 128  1.1423766e+06 1.97e-03 7.77e-01  -5.7 5.35e+01    -  2.21e-01 1.96e-01f  1
 129  1.1423699e+06 6.09e-03 1.62e+00  -5.7 1.06e+02    -  8.61e-02 1.41e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 130  1.1423659e+06 7.53e-03 7.32e+00  -5.7 9.30e+01    -  2.82e-01 9.97e-02h  1
 131  1.1423588e+06 1.59e-02 5.62e+00  -5.7 9.70e+01    -  1.96e-01 2.04e-01h  1
 132  1.1423514e+06 2.06e-02 3.51e+00  -5.7 6.49e+01    -  2.35e-01 2.67e-01h  1
 133  1.1423476e+06 1.83e-02 1.35e+00  -5.7 3.98e+01    -  6.57e-02 1.73e-01h  1
 134  1.1423460e+06 1.67e-02 5.02e+00  -5.7 3.85e+01    -  3.76e-01 9.86e-02h  1
 135  1.1423432e+06 1.50e-02 3.76e+00  -5.7 5.17e+01    -  1.42e-01 1.90e-01h  1
 136  1.1423398e+06 1.03e-02 2.29e+00  -5.7 1.52e+01    -  3.53e-01 3.09e-01h  1
 137  1.1423380e+06 8.29e-03 1.72e+00  -5.7 1.11e+01    -  3.07e-01 2.38e-01h  1
 138  1.1423373e+06 7.37e-03 2.24e+00  -5.7 7.69e+00    -  3.76e-01 1.12e-01h  1
 139  1.1423355e+06 4.72e-03 1.38e+00  -5.7 7.71e+00    -  3.39e-01 3.59e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 140  1.1423332e+06 1.44e-03 8.71e-01  -5.7 5.42e+00    -  1.80e-01 6.95e-01h  1
 141  1.1423331e+06 1.26e-03 5.92e-01  -5.7 1.36e+01    -  4.37e-01 1.28e-01h  1
 142  1.1423327e+06 1.47e-03 3.16e-01  -5.7 7.19e+00    -  3.51e-01 4.24e-01h  1
 143  1.1423325e+06 2.56e-03 4.64e-01  -5.7 9.87e+00    -  9.37e-01 3.93e-01h  1
 144  1.1423324e+06 1.43e-03 2.83e-01  -5.7 3.76e+00    -  1.00e+00 4.44e-01h  1
 145  1.1423322e+06 1.39e-04 1.50e-05  -5.7 3.46e+00    -  1.00e+00 1.00e+00h  1
 146  1.1423322e+06 7.46e-06 1.37e-08  -5.7 3.20e-01    -  1.00e+00 1.00e+00h  1
 147  1.1423322e+06 2.86e-07 4.60e-08  -5.7 4.43e-02    -  1.00e+00 1.00e+00h  1
 148  1.1423320e+06 1.57e-04 1.02e-01  -8.6 9.07e+00    -  4.75e-01 3.44e-01h  1
 149  1.1423317e+06 4.07e-04 3.21e-02  -8.6 7.09e+00    -  5.73e-01 6.59e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 150  1.1423316e+06 3.76e-03 5.54e-02  -8.6 2.30e+01    -  5.52e-01 6.35e-01h  1
 151  1.1423316e+06 2.08e-03 1.23e-01  -8.6 7.72e+00    -  6.23e-01 9.03e-01h  1
 152  1.1423316e+06 8.74e-05 1.58e-02  -8.6 1.13e+00    -  9.21e-01 1.00e+00h  1
 153  1.1423316e+06 8.64e-05 1.56e-02  -8.6 1.69e+00    -  1.34e-02 1.20e-02h  1
 154  1.1423316e+06 9.38e-06 2.98e-08  -8.6 1.04e-01    -  1.00e+00 1.00e+00h  1
 155  1.1423316e+06 1.61e-07 8.88e-08  -8.6 3.46e-03  -4.6 1.00e+00 1.00e+00h  1
 156  1.1423316e+06 3.50e-06 4.72e-08  -8.6 5.51e-03  -5.1 1.00e+00 1.00e+00h  1
 157  1.1423316e+06 4.23e-06 4.19e-04  -8.6 1.65e-02  -5.5 1.00e+00 2.23e-01h  2
 158  1.1423316e+06 1.96e-06 5.04e-10  -8.6 2.89e-02    -  1.00e+00 1.00e+00h  1
 159  1.1423316e+06 1.45e-09 6.22e-11  -8.6 7.74e-04    -  1.00e+00 1.00e+00h  1

Number of Iterations....: 159

                                   (scaled)                 (unscaled)
Objective...............:   1.9832145291462974e+04    1.1423315687882672e+06
Dual infeasibility......:   6.2241615598986961e-11    3.5851170585016486e-09
Constraint violation....:   6.3242392659562663e-10    1.4521326155425562e-09
Variable bound violation:   1.4006111825892731e-07    1.4006111825892731e-07
Complementarity.........:   2.5060535939274425e-09    1.4434868701022069e-07
Overall NLP error.......:   2.5060535939274425e-09    1.4434868701022069e-07


Number of objective function evaluations             = 217
Number of objective gradient evaluations             = 160
Number of equality constraint evaluations            = 217
Number of inequality constraint evaluations          = 217
Number of equality constraint Jacobian evaluations   = 160
Number of inequality constraint Jacobian evaluations = 160
Number of Lagrangian Hessian evaluations             = 159
Total seconds in IPOPT                               = 84.406

EXIT: Optimal Solution Found.
(filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m", build_time = 5.5021750926971436, solver_setup_time = 5.975214149521236, solve_time = 84.409678791, total = 95.88706803321838, objective_value = 1.1423315687882672e6)

After

julia> ret = benchmark(
           "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
           () -> ExaModels.Optimizer(NLPModelsIpopt.ipopt, KernelAbstractions.CPU()),
       )
This is Ipopt version 3.14.19, running with linear solver MUMPS 5.9.0.

Number of nonzeros in equality constraint Jacobian...:   857046
Number of nonzeros in inequality constraint Jacobian.:   212038
Number of nonzeros in Lagrangian Hessian.............:  1558802

Total number of variables............................:   208047
                     variables with only lower bounds:        0
                variables with lower and upper bounds:   178047
                     variables with only upper bounds:        0
Total number of equality constraints.................:   201573
Total number of inequality constraints...............:   106019
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:    35233
        inequality constraints with only upper bounds:    70786

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  1.0023676e+06 1.81e+01 1.45e+02  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1  1.0045547e+06 1.79e+01 1.43e+02  -1.0 2.27e+01    -  1.54e-02 1.08e-02f  1
   2  1.0009457e+06 1.76e+01 1.42e+02  -1.0 2.36e+01    -  1.02e-02 1.79e-02f  1
   3  9.9701266e+05 1.70e+01 1.40e+02  -1.0 3.91e+01    -  1.45e-02 3.44e-02f  1
   4  9.9637283e+05 1.60e+01 1.34e+02  -1.0 9.99e+01    -  4.20e-02 6.10e-02f  1
   5  9.9655722e+05 1.45e+01 1.18e+02  -1.0 2.01e+02    -  1.20e-01 9.19e-02H  1
   6  9.9666461e+05 1.32e+01 9.82e+01  -1.0 3.24e+02    -  1.67e-01 9.21e-02H  1
   7  9.9667542e+05 1.30e+01 9.61e+01  -1.0 4.11e+02    -  2.12e-02 1.76e-02h  3
   8  9.9668313e+05 1.27e+01 9.03e+01  -1.0 4.25e+02    -  6.10e-02 2.10e-02h  2
   9  9.9669077e+05 1.25e+01 8.26e+01  -1.0 4.38e+02    -  8.54e-02 1.57e-02h  3
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10  9.9671026e+05 1.21e+01 6.26e+01  -1.0 4.46e+02    -  2.45e-01 3.05e-02h  3
  11  9.9671792e+05 1.19e+01 5.15e+01  -1.0 4.62e+02    -  1.80e-01 1.83e-02h  5
  12  9.9673142e+05 1.14e+01 4.47e+01  -1.0 4.78e+02    -  1.37e-01 3.91e-02h  4
  13  9.9676390e+05 1.11e+01 3.97e+01  -1.0 4.84e+02    -  1.18e-01 2.97e-02h  4
  14  9.9682942e+05 1.07e+01 3.49e+01  -1.0 4.92e+02    -  1.31e-01 3.97e-02h  3
  15  9.9692079e+05 1.03e+01 3.42e+01  -1.0 5.00e+02    -  1.49e-02 3.69e-02h  3
  16  9.9706534e+05 9.83e+00 3.26e+01  -1.0 5.05e+02    -  4.95e-02 4.25e-02h  2
  17  9.9741667e+05 9.13e+00 2.96e+01  -1.0 5.06e+02    -  9.67e-02 7.15e-02h  1
  18  9.9802783e+05 8.43e+00 2.77e+01  -1.0 5.03e+02    -  5.76e-02 7.58e-02h  1
  19  9.9866954e+05 7.99e+00 2.55e+01  -1.0 5.30e+02    -  1.01e-01 5.23e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  20  1.0001255e+06 7.49e+00 2.39e+01  -1.0 4.56e+02    -  6.78e-02 6.35e-02h  1
  21  1.0027685e+06 7.05e+00 2.27e+01  -1.0 4.46e+02    -  8.94e-03 5.76e-02h  1
  22  1.0085364e+06 6.44e+00 2.09e+01  -1.0 4.24e+02    -  5.50e-02 8.74e-02h  1
  23  1.0124938e+06 6.13e+00 2.00e+01  -1.0 4.62e+02    -  1.92e-02 4.77e-02h  1
  24  1.0165688e+06 5.85e+00 1.90e+01  -1.0 4.86e+02    -  7.05e-02 4.59e-02h  1
  25  1.0259453e+06 5.28e+00 1.74e+01  -1.0 5.35e+02    -  1.86e-02 9.80e-02h  1
  26  1.0332159e+06 4.88e+00 1.62e+01  -1.0 5.18e+02    -  5.62e-02 7.57e-02h  1
  27  1.0404020e+06 4.51e+00 1.49e+01  -1.0 5.14e+02    -  1.10e-01 7.44e-02h  1
  28  1.0527760e+06 3.94e+00 1.31e+01  -1.0 5.01e+02    -  7.83e-02 1.26e-01h  1
  29  1.0608036e+06 3.60e+00 1.20e+01  -1.0 4.59e+02    -  6.29e-02 8.82e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  30  1.0650830e+06 3.41e+00 1.14e+01  -1.0 4.17e+02    -  7.91e-02 5.06e-02h  1
  31  1.0680740e+06 3.29e+00 1.09e+01  -1.0 3.48e+02    -  7.47e-02 3.54e-02h  1
  32  1.0743155e+06 3.04e+00 9.98e+00  -1.0 3.80e+02    -  1.03e-01 7.78e-02h  1
  33  1.0842210e+06 2.65e+00 8.71e+00  -1.0 3.81e+02    -  1.27e-01 1.28e-01h  1
  34  1.0846779e+06 2.63e+00 8.68e+00  -1.0 3.98e+02    -  2.36e-03 6.04e-03h  1
  35  1.0926238e+06 2.33e+00 7.63e+00  -1.0 4.26e+02    -  4.60e-02 1.17e-01h  1
  36  1.0991401e+06 2.08e+00 6.92e+00  -1.0 4.48e+02    -  1.65e-01 1.07e-01h  1
  37  1.1040523e+06 1.89e+00 7.83e+00  -1.0 5.14e+02    -  1.54e-01 9.12e-02h  1
  38  1.1084726e+06 1.72e+00 6.44e+00  -1.0 5.74e+02    -  8.33e-02 9.05e-02h  1
  39  1.1133793e+06 1.53e+00 5.06e+00  -1.0 6.06e+02    -  6.61e-02 1.09e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  40  1.1174695e+06 1.38e+00 4.90e+00  -1.0 6.23e+02    -  1.33e-01 1.01e-01h  1
  41  1.1225784e+06 1.20e+00 5.10e+00  -1.0 6.75e+02    -  6.43e-02 1.33e-01h  1
  42  1.1250272e+06 1.11e+00 4.15e+00  -1.0 6.68e+02    -  1.26e-01 6.96e-02h  1
  43  1.1305697e+06 9.29e-01 3.03e+00  -1.0 6.99e+02    -  1.51e-01 1.66e-01h  1
  44  1.1359285e+06 7.60e-01 2.57e+00  -1.0 7.06e+02    -  1.81e-01 1.82e-01h  1
  45  1.1394450e+06 6.59e-01 2.47e+00  -1.0 6.58e+02    -  1.36e-01 1.33e-01h  1
  46  1.1415984e+06 6.12e-01 3.64e+01  -1.0 4.07e+02    -  2.04e-01 7.19e-02h  1
  47  1.1450193e+06 5.28e-01 4.10e+01  -1.0 6.36e+02    -  1.72e-01 1.38e-01h  1
  48  1.1530969e+06 3.54e-01 4.51e+00  -1.0 4.74e+02    -  2.60e-01 3.30e-01h  1
  49  1.1594459e+06 2.20e-01 1.23e+02  -1.0 4.97e+02    -  6.30e-01 3.81e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  50  1.1628055e+06 1.52e-01 5.67e+01  -1.0 5.77e+02    -  1.19e-01 3.08e-01h  1
  51  1.1701383e+06 1.90e-02 1.05e+01  -1.0 4.98e+02    -  9.90e-01 1.00e+00h  1
  52  1.1701782e+06 2.07e-03 7.42e+01  -1.0 2.12e+02    -  9.94e-01 1.00e+00h  1
  53  1.1701688e+06 3.51e-05 1.70e-02  -1.0 1.23e+01    -  1.00e+00 1.00e+00h  1
  54  1.1663519e+06 1.28e-02 9.58e+01  -2.5 1.48e+02    -  2.00e-01 2.07e-01f  1
  55  1.1633083e+06 9.70e-03 1.35e+03  -2.5 9.86e+00  -2.0 1.22e-01 2.41e-01f  1
  56  1.1627080e+06 9.61e-03 4.88e+02  -2.5 1.70e+02    -  1.26e-01 3.99e-02f  1
  57  1.1606394e+06 1.14e-02 7.63e+02  -2.5 1.54e+02    -  1.04e-01 1.46e-01f  1
  58  1.1590424e+06 1.15e-02 5.91e+02  -2.5 1.05e+02    -  1.41e-01 1.31e-01f  1
  59  1.1579958e+06 1.10e-02 7.11e+02  -2.5 5.87e+01    -  6.64e-02 9.41e-02f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  60  1.1560783e+06 1.01e-02 5.83e+02  -2.5 5.45e+01    -  1.92e-01 1.93e-01f  1
  61  1.1549744e+06 8.98e-03 2.74e+02  -2.5 4.93e+01    -  1.74e-01 1.24e-01f  1
  62  1.1531589e+06 1.00e-02 8.28e+02  -2.5 4.59e+01    -  6.60e-02 2.22e-01f  1
  63  1.1524947e+06 9.48e-03 7.17e+02  -2.5 4.37e+01    -  9.87e-02 8.83e-02f  1
  64  1.1518499e+06 8.98e-03 8.73e+02  -2.5 5.26e+01    -  2.50e-02 9.24e-02f  1
  65  1.1510544e+06 8.56e-03 7.46e+02  -2.5 5.77e+01    -  1.38e-01 1.35e-01f  1
  66  1.1503257e+06 8.01e-03 6.93e+02  -2.5 5.56e+01    -  1.09e-01 1.24e-01f  1
  67  1.1500436e+06 7.60e-03 3.27e+02  -2.5 2.93e+01    -  1.90e-01 5.75e-02f  1
  68  1.1488350e+06 9.73e-03 3.68e+02  -2.5 2.22e+01    -  1.83e-01 2.44e-01f  1
  69  1.1486408e+06 9.25e-03 1.99e+02  -2.5 5.87e+01    -  1.43e-01 4.92e-02f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  70  1.1478077e+06 7.20e-03 2.15e+02  -2.5 1.90e+02    -  1.89e-01 2.34e-01f  1
  71  1.1469791e+06 5.39e-03 2.80e+02  -2.5 8.93e+01    -  1.50e-01 2.56e-01f  1
  72  1.1468581e+06 5.13e-03 8.67e+01  -2.5 1.80e+02    -  2.35e-01 4.78e-02f  1
  73  1.1464674e+06 5.56e-03 3.16e+01  -2.5 3.59e+02    -  2.18e-01 1.63e-01f  1
  74  1.1460025e+06 7.98e-03 1.32e+02  -2.5 1.83e+02    -  3.68e-02 2.16e-01f  1
  75  1.1456601e+06 8.99e-03 1.36e+02  -2.5 1.49e+02    -  1.38e-01 1.88e-01f  1
  76  1.1453804e+06 7.88e-03 5.38e+01  -2.5 2.69e+02    -  2.93e-01 1.81e-01f  1
  77  1.1450750e+06 1.09e-02 3.10e+01  -2.5 1.67e+02    -  2.58e-01 2.31e-01h  1
  78  1.1447995e+06 1.08e-02 2.72e+01  -2.5 1.05e+02    -  2.46e-01 2.61e-01h  1
  79  1.1446626e+06 9.87e-03 7.96e+01  -2.5 1.13e+02    -  6.19e-01 1.68e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  80  1.1444849e+06 8.77e-03 1.31e+02  -2.5 1.58e+02    -  1.00e+00 2.44e-01h  1
  81  1.1440458e+06 2.03e-02 2.35e+01  -2.5 1.07e+02    -  7.49e-01 8.19e-01h  1
  82  1.1439636e+06 7.55e-04 4.90e-03  -2.5 2.41e+01    -  1.00e+00 1.00e+00h  1
  83  1.1439634e+06 9.58e-06 7.45e-05  -2.5 1.33e+00    -  1.00e+00 1.00e+00h  1
  84  1.1436887e+06 5.79e-03 1.74e+01  -3.8 3.36e+02    -  2.14e-01 1.76e-01f  1
  85  1.1436167e+06 5.62e-03 5.81e+01  -3.8 1.86e+02    -  1.68e-01 5.65e-02h  1
  86  1.1433143e+06 4.92e-03 6.72e+00  -3.8 1.35e+02    -  9.32e-02 2.47e-01f  1
  87  1.1432404e+06 4.57e-03 6.23e+00  -3.8 1.90e+02    -  7.05e-02 7.11e-02h  1
  88  1.1431600e+06 4.19e-03 5.69e+00  -3.8 1.88e+02    -  1.02e-01 9.63e-02h  1
  89  1.1430670e+06 5.22e-03 2.12e+01  -3.8 2.61e+02    -  3.41e-02 1.11e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  90  1.1430458e+06 5.20e-03 1.18e+01  -3.8 2.15e+02    -  1.28e-01 2.76e-02h  1
  91  1.1429784e+06 5.21e-03 1.30e+01  -3.8 1.35e+02    -  1.46e-01 1.00e-01h  1
  92  1.1429333e+06 5.38e-03 1.01e+01  -3.8 2.89e+02    -  4.75e-02 5.89e-02h  1
  93  1.1428688e+06 6.94e-03 5.95e+00  -3.8 2.76e+02    -  7.02e-02 8.91e-02h  1
  94  1.1428078e+06 9.30e-03 1.81e+01  -3.8 2.79e+02    -  1.77e-01 9.81e-02h  1
  95  1.1426946e+06 1.63e-02 1.83e+01  -3.8 3.03e+02    -  2.17e-01 1.90e-01h  1
  96  1.1426813e+06 1.59e-02 2.98e+01  -3.8 1.71e+02    -  1.42e-01 2.85e-02h  1
  97  1.1426231e+06 1.48e-02 2.42e+01  -3.8 1.25e+02    -  1.34e-01 1.47e-01h  1
  98  1.1425800e+06 1.37e-02 3.64e+01  -3.8 1.05e+02    -  3.47e-01 1.48e-01h  1
  99  1.1425643e+06 1.23e-02 4.14e+01  -3.8 2.32e+00  -2.5 2.69e-01 1.02e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 100  1.1425337e+06 9.72e-03 3.53e+01  -3.8 2.48e+00  -3.0 2.77e-01 2.09e-01h  1
 101  1.1424787e+06 5.52e-03 1.42e+01  -3.8 5.06e+00  -3.4 2.34e-01 4.37e-01h  1
 102  1.1424696e+06 7.17e-03 1.29e+01  -3.8 2.28e+02    -  4.85e-02 6.63e-02h  1
 103  1.1424582e+06 7.58e-03 1.23e+01  -3.8 1.05e+02    -  1.35e-01 9.94e-02h  1
 104  1.1424456e+06 6.12e-03 1.38e+01  -3.8 6.95e+00  -3.9 4.14e-01 1.94e-01h  1
 105  1.1424348e+06 4.96e-03 1.32e+01  -3.8 7.72e+00  -4.4 3.71e-01 1.87e-01h  1
 106  1.1424223e+06 4.28e-03 9.71e+00  -3.8 1.36e+01  -4.9 2.42e-01 2.56e-01h  1
 107  1.1424127e+06 8.13e-03 6.74e+00  -3.8 2.43e+01  -5.3 1.22e-01 2.44e-01h  1
 108  1.1424093e+06 8.78e-03 5.93e+00  -3.8 1.05e+01  -4.9 2.11e-01 1.56e-01h  1
 109  1.1424036e+06 6.78e-03 4.35e+00  -3.8 8.51e+01    -  1.83e-01 2.35e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 110  1.1424006e+06 5.56e-03 4.31e+00  -3.8 3.69e+01    -  4.45e-01 1.82e-01h  1
 111  1.1423907e+06 2.81e-03 2.64e+00  -3.8 9.48e+00  -5.4 3.61e-01 8.32e-01h  1
 112  1.1423881e+06 1.59e-03 1.99e+00  -3.8 2.83e+01    -  3.65e-01 7.92e-01h  1
 113  1.1423876e+06 4.46e-04 6.70e-04  -3.8 4.95e+00    -  1.00e+00 1.00e+00h  1
 114  1.1423876e+06 1.04e-04 7.23e-05  -3.8 1.11e+00    -  1.00e+00 1.00e+00h  1
 115  1.1423876e+06 1.23e-06 4.53e-07  -3.8 8.62e-02    -  1.00e+00 1.00e+00h  1
 116  1.1423766e+06 1.97e-03 7.76e-01  -5.7 5.35e+01    -  2.21e-01 1.96e-01f  1
 117  1.1423699e+06 6.10e-03 1.62e+00  -5.7 1.06e+02    -  8.61e-02 1.41e-01h  1
 118  1.1423659e+06 7.54e-03 7.32e+00  -5.7 9.30e+01    -  2.82e-01 9.98e-02h  1
 119  1.1423588e+06 1.59e-02 5.63e+00  -5.7 9.70e+01    -  1.96e-01 2.04e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 120  1.1423514e+06 2.05e-02 3.51e+00  -5.7 6.48e+01    -  2.35e-01 2.67e-01h  1
 121  1.1423476e+06 1.83e-02 1.35e+00  -5.7 3.98e+01    -  6.57e-02 1.73e-01h  1
 122  1.1423460e+06 1.67e-02 5.02e+00  -5.7 3.85e+01    -  3.76e-01 9.86e-02h  1
 123  1.1423432e+06 1.49e-02 3.76e+00  -5.7 5.17e+01    -  1.42e-01 1.90e-01h  1
 124  1.1423398e+06 1.03e-02 2.29e+00  -5.7 1.52e+01    -  3.53e-01 3.09e-01h  1
 125  1.1423380e+06 8.29e-03 1.72e+00  -5.7 1.11e+01    -  3.07e-01 2.38e-01h  1
 126  1.1423373e+06 7.37e-03 2.24e+00  -5.7 7.69e+00    -  3.76e-01 1.12e-01h  1
 127  1.1423355e+06 4.73e-03 1.39e+00  -5.7 7.71e+00    -  3.40e-01 3.58e-01h  1
 128  1.1423332e+06 1.44e-03 8.73e-01  -5.7 5.44e+00    -  1.78e-01 6.96e-01h  1
 129  1.1423331e+06 1.26e-03 5.92e-01  -5.7 1.34e+01    -  4.42e-01 1.26e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 130  1.1423327e+06 1.53e-03 3.12e-01  -5.7 7.31e+00    -  3.49e-01 4.27e-01h  1
 131  1.1423325e+06 2.53e-03 4.56e-01  -5.7 9.70e+00    -  9.36e-01 3.93e-01h  1
 132  1.1423324e+06 1.41e-03 2.83e-01  -5.7 3.77e+00    -  1.00e+00 4.46e-01h  1
 133  1.1423322e+06 1.37e-04 1.48e-05  -5.7 3.44e+00    -  1.00e+00 1.00e+00h  1
 134  1.1423322e+06 7.40e-06 1.36e-08  -5.7 3.21e-01    -  1.00e+00 1.00e+00h  1
 135  1.1423322e+06 2.83e-07 5.83e-09  -5.7 4.40e-02    -  1.00e+00 1.00e+00h  1
 136  1.1423320e+06 1.57e-04 1.02e-01  -8.6 9.07e+00    -  4.75e-01 3.44e-01h  1
 137  1.1423317e+06 4.07e-04 3.21e-02  -8.6 7.09e+00    -  5.73e-01 6.59e-01h  1
 138  1.1423316e+06 3.76e-03 5.54e-02  -8.6 2.30e+01    -  5.52e-01 6.35e-01h  1
 139  1.1423316e+06 2.08e-03 1.23e-01  -8.6 7.72e+00    -  6.23e-01 9.03e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 140  1.1423316e+06 8.74e-05 1.58e-02  -8.6 1.13e+00    -  9.21e-01 1.00e+00h  1
 141  1.1423316e+06 8.64e-05 1.56e-02  -8.6 1.69e+00    -  1.34e-02 1.20e-02h  1
 142  1.1423316e+06 9.38e-06 2.98e-08  -8.6 1.04e-01    -  1.00e+00 1.00e+00h  1
 143  1.1423316e+06 1.36e-06 3.71e-08  -8.6 3.43e-03  -5.0 1.00e+00 1.00e+00h  1
 144  1.1423316e+06 4.32e-06 3.55e-04  -8.6 3.52e-02  -5.4 5.76e-01 1.50e-01h  2
 145  1.1423316e+06 1.88e-06 1.60e-09  -8.6 2.83e-02    -  1.00e+00 1.00e+00h  1
 146  1.1423316e+06 1.06e-08 1.00e-10  -8.6 1.69e-03    -  1.00e+00 1.00e+00h  1
 147  1.1423316e+06 1.96e-11 9.98e-11  -8.6 1.34e-05    -  1.00e+00 1.00e+00h  1

Number of Iterations....: 147

                                   (scaled)                 (unscaled)
Objective...............:   1.9832145291463119e+04    1.1423315687882756e+06
Dual infeasibility......:   9.9805714555556197e-11    5.7488091584000368e-09
Constraint violation....:   1.9551687959612485e-11    1.9551687959612485e-11
Variable bound violation:   1.4006111825892731e-07    1.4006111825892731e-07
Complementarity.........:   2.5059581440739277e-09    1.4434318909865822e-07
Overall NLP error.......:   2.5059581440739277e-09    1.4434318909865822e-07


Number of objective function evaluations             = 190
Number of objective gradient evaluations             = 148
Number of equality constraint evaluations            = 190
Number of inequality constraint evaluations          = 190
Number of equality constraint Jacobian evaluations   = 148
Number of inequality constraint Jacobian evaluations = 148
Number of Lagrangian Hessian evaluations             = 147
Total seconds in IPOPT                               = 77.863

EXIT: Optimal Solution Found.
(filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m", build_time = 5.404294967651367, solver_setup_time = 4.61972975730896, solve_time = 77.86619114875793, total = 87.89021587371826, objective_value = 1.1423315687882756e6)

Code

using Revise
using JuMP
import ExaModels
import KernelAbstractions
import NLPModelsIpopt
import PowerModels

PowerModels.silence()
function benchmark(filename::String, optimizer)
    start_time = time()
    pm = PowerModels.instantiate_model(
        filename,
        PowerModels.ACPPowerModel,
        PowerModels.build_opf,
    )
    build_time = time()
    set_optimizer(pm.model, optimizer; with_bridge_type = nothing)
    optimize!(pm.model)
    finish_time = time()
    return (;
        filename,
        build_time = build_time - start_time,
        solver_setup_time = finish_time - build_time - solve_time(pm.model),
        solve_time = solve_time(pm.model),
        total = finish_time - start_time,
        objective_value = objective_value(pm.model),
    )
end

Comment thread ext/ExaModelsMOI.jl Outdated
@odow

odow commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

We should benchmark https://github.com/MadNLP/COPSBenchmark.jl

@sshin23

sshin23 commented Aug 6, 2026

Copy link
Copy Markdown
Member

@odow

odow commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

This is ticking along to be a nice win.

Two runs of the 30k benchmark:

ret = benchmark(
    "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
    () -> ExaModels.Optimizer(NLPModelsIpopt.ipopt, KernelAbstractions.CPU()),
)

Before

(;
    filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
    build_time = 7.070135116577148,
    solver_setup_time = 10.925534944793696,
    solve_time = 87.794706125,
    total = 105.79037618637085,
    objective_value = 1.1423315687882672e6,
)
(;
    filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
    build_time = 5.016787052154541,
    solver_setup_time = 5.8046203707885695,
    solve_time = 84.870095625,
    total = 95.69150304794312,
    objective_value = 1.1423315687882672e6,
)

After

(;
    filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
    build_time = 6.841040134429932,
    solver_setup_time = 9.776680946350098,
    solve_time = 80.09886598587036,
    total = 96.71658706665039,
    objective_value = 1.1423315687882756e6,
)
(;
    filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
    build_time = 5.235661029815674,
    solver_setup_time = 4.343807935714722,
    solve_time = 77.17140507698059,
    total = 86.75087404251099,
    objective_value = 1.1423315687882756e6,
)

odow added 2 commits August 12, 2026 09:51
The purpose of this rewrite is to:

 * simplify the implementation by removing the linked list
 * thoroughly document and comment the file to explain what is happening
 * add various improvements: split additive terms into separate constraint
   augmentations, support :(x - y), skip constants if they are 0.0,
   re-use variables in symbolic expressions
 * fix various bugs in the MOI wrapper
 * add many more tests
@odow
odow marked this pull request as ready for review August 11, 2026 21:52
@odow

odow commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Changed to the incremental MOI interface. Using this script. Note how it now uses solve_opf instead of explicitly forming the JuMP model.

import ExaModels
import NLPModelsIpopt
import PowerModels

PowerModels.silence()
function benchmark(filename::String, optimizer)
    start_time = time()
    ret = PowerModels.solve_opf(filename, PowerModels.ACPPowerModel, optimizer)
    total_time = time() - start_time
    return (;
        filename,
        total_time,
        solve_time = ret["solve_time"],
        overhead = total_time - ret["solve_time"],
        objective_value = ret["objective"],
    )
end
ret = benchmark(
    "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
    () -> ExaModels.Optimizer(NLPModelsIpopt.ipopt),
)

Before

(;
filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
total_time = 100.1766619682312,
solve_time = 84.832873959,
overhead = 15.343788009231204,
objective_value = 1.142331568788267e6,
)

After

(;
filename = "/Users/odow/git/exanauts/ExaModels/test/pglib/pglib_opf_case30000_goc.m",
total_time = 87.59836411476135, 
solve_time = 77.98521494865417,
overhead = 9.613149166107178,
objective_value = 1.1423315687882758e6,
)

@sshin23
sshin23 merged commit 7be82e3 into madsuite-org:main Aug 15, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants