Skip to content

[OptimizationMadNLP] strict Aqua persistent-task QA fails under Julia 1.10 --compiled-modules=no #1294

Description

@ChrisRackauckas-Claude

Summary

OptimizationMadNLP strict QA fails on clean origin/master when Julia is run with --compiled-modules=no. Aqua's persistent-task check precompiles a generated wrapper package, and the inherited startup flag exposes a MadNLP precompile-workload bug:

MethodError: no method matching lbt_forward(::Nothing)
  [1] __init__()
      @ MadNLP .../src/MadNLP.jl:23
  [2] macro expansion
      @ MadNLP .../src/precompile.jl:88

This is reproducible at Optimization.jl commit bc8e107fb5bc755b45e7cfe6f1a5cf73b544e45c, which was the current origin/master after git fetch origin.

Exact reproduction

Environment:

Julia 1.10.11
x86_64-linux-gnu, glibc, libgfortran 5
OptimizationMadNLP 2.3.0
MadNLP 0.10.1
Aqua 0.8.16
SciMLTesting 2.6.2
MUMPS_seq_jll 500.900.100+0
OpenBLAS32_jll 0.3.24+0

Command:

git fetch origin
git rev-parse HEAD origin/master
# both: bc8e107fb5bc755b45e7cfe6f1a5cf73b544e45c

OPTIMIZATION_TEST_GROUP=QA \
  julialauncher +1.10 --compiled-modules=no \
  --project=lib/OptimizationMadNLP \
  -e 'using Pkg; Pkg.test()'

Result:

Quality Assurance | 16 passed, 1 failed, 2 broken
Persistent tasks  | 1 failed

ERROR: LoadError: MethodError: no method matching lbt_forward(::Nothing)
Closest candidates are:
  lbt_forward(!Matched::AbstractString; clear, verbose, suffix_hint)

The same QA command without --compiled-modules=no passes (17 passed, 2 expected broken). A fully isolated depot and a cold Aqua wrapper also pass unless --compiled-modules=no is inherited.

Cause and history

This does not originate in Optimization.jl source.

MadNLP's PrecompileTools workload solves an NLP with the default sparse solver while MadNLP is being compiled. MadNLP made MUMPS the default and added MUMPS_seq_jll/OpenBLAS32_jll in MadNLP commit a332cb2589cfdebd4b58103ae230215c944da24a. Under --compiled-modules=no, the workload executes before JLL __init__ hooks have initialized their products, so native MUMPS/BLAS state is unavailable.

A formal git bisect of Aqua.has_persistent_tasks(MadNLP) under Julia 1.10 with --compiled-modules=no found a332cb2589cfdebd4b58103ae230215c944da24a as the first bad commit; its parent-side candidates pass. Initially it failed on unresolved dmumps_c. MadNLP commit 2d1428c212a2e12525e5c179ec41fae1145a34f9 then manually called MadNLP.__init__() inside src/precompile.jl; this changed the strict-precompile failure to the current lbt_forward(::Nothing) because OpenBLAS32_jll.libopenblas_path is still nothing at that phase.

All OptimizationMadNLP-compatible MadNLP releases (0.9.1, 0.9.2, 0.10.0, and 0.10.1) contain this path, so narrowing the existing compat cannot select a working allowed release.

On Julia 1.10, OpenBLAS32_jll resolves to 0.3.24+0; 0.3.25+0 and later require Julia 1.11. This is not a missing x86_64 artifact: outside the premature precompile-workload call, libopenblas_path is a valid string and the artifact exists. The primary defect is invoking the native-solver workload/__init__ before dependency initialization, not the OpenBLAS32 artifact itself.

Unreleased MadNLP main removed the manual __init__() call and disabled this workload in commit 6c334e7257ba1e11e33bc6f2967ef55544031b79, but there is no released compatible version containing that change.

Required fix

The fix belongs in MadNLP: make the native precompile workload safe when compiled modules are disabled (or omit that workload in this mode), add a regression test that precompiles under --compiled-modules=no, and release the repair. Optimization.jl should not disable Aqua's persistent-task test or catch/silence the initialization failure.

Clean-master reference: bc8e107

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions