Repository navigation
Fix 32-bit Core CI failures - #354
Draft
ChrisRackauckas-Claude wants to merge 3 commits into
Draft
ChrisRackauckas-Claude wants to merge 3 commits into
ChrisRackauckas-Claude wants to merge 3 commits into
Conversation
Update fixed symbolic parameters through a copied parameter buffer. Use symbolic remaking for initialized parameters and other parameter forms. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-sol Agent-Job: 353-codex Agent-Session: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)
Verify the exact Sobol key names independently of hash-table traversal order. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-sol Agent-Job: 353-codex Agent-Session: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)
Schedule Threshold on both Julia architectures so its tests use a fresh process after Core. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-sol Agent-Job: 353-codex Agent-Session: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ignore this draft until reviewed by @ChrisRackauckas.
Bayesian likelihood evaluations pass a concrete buffer for fixed scalar ModelingToolkit parameters, which reuses initialization structure during Turing sampling and reduces memory use on x86. Parameters solved during initialization and other parameter forms use symbolic remaking. The sensitivity test compares the exact dictionary key set, and the threshold tests run in a dedicated process on each architecture.
Verification
The default-branch x86 job passed
Core/basics.jl(18/18), then ran out of memory duringbayesian_ensembleintest/ensemble.jl:94. Its stack shows Turing differentiating the likelihood while ModelingToolkitBase rebuilt initialization data. The same stack appears on the earliest matching job I found, on a commit that added benchmarking.On unmodified code, with 32-bit Julia 1.13.2 and the package versions recorded in the failing job, I ran:
env -u JULIA_HEAP_SIZE_HINT GROUP=Core JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=8 julia --project -e 'import Pkg; Pkg.test(; julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"], allow_reresolve=false, coverage=true, force_latest_compatible_version=false)'I ran the same
test/ensemble.jlon 32-bit Julia 1.13.3 before and after the patch.TEST_PROJECTselects the corresponding project with the same dependency versions.Unmodified, the process reported
fatal: error thrown and no exception handler available.andOutOfMemoryError(). I stopped its repeated fatal finalizer errors. With the patch, the output was:The first patched Core run passed the ensemble, then failed at
test/sensitivity.jl:38. The dictionary contained every expected key, but on 32-bit Julia its hash-table traversal returned a different order. The assertion now checks exact key equality with a set. Julia'sDictAPI.The combined x86 group then passed all 40 assertions and encountered a Julia runtime finalizer error during shutdown. The first diagnostic was
error in running finalizer: Core.MethodError(f=Base.close, args=(Core.Task(.... The process had 4,185,776 KiB of virtual mappings and spent several minutes dumping the task's symbolic cache, so I stopped it after recording the error. The owner of that finalizer is unverified. The threshold file runs in a fresh SciMLTesting group on x86 and x64, and remains part ofPkg.test()with the default group selection. Julia runtime source.I reran Core on 32-bit Julia and Threshold on both architectures with CI's runtime flags:
All three processes exited 0. The matrix generator emitted Core and Threshold on both architectures with
continue_on_error=false.Both formatting and spelling checks exited 0. A separate ForwardDiff probe for a parameter-dependent initialization recovered the analytic gradient
[2, 1]by either route. The second gradient call allocated 449,656 bytes with the symbolic map and 45,416 bytes with the parameter buffer.CI
The
CIworkflow completed successfully on the PR head. Core passed 28/28 on both architectures, Threshold passed 12/12 on both architectures, Datafit passed 11/11, and QA passed 21/21. All six jobs used Julia 1.13.4. Formatting, spelling, and both benchmark checks also passed. CI run · 32-bit Core job.The Downgrade job on Ubuntu 26.04 stopped before package tests when the dynamic loader tried to load GR's
libGRM.so. The log reportslibxml2.so.2: cannot open shared object file: No such file or directory. The passing baseline resolved the same Plots 1.38.13, GR 0.72.10, GR_jll 0.72.10+0, and Qt6Base_jll 6.5.3+1 versions. PR Downgrade log · Baseline Downgrade log.In a standalone Julia 1.10.12 environment with GR, GR_jll, and Qt6Base_jll pinned to those versions,
GR.version()returned"0.72.10". The downloaded GR artifact hash matched the PR log, andreadelf -dshowedNEEDED Shared library: [libxml2.so.2]forlibGRM.so. The local system provides that SONAME. This points to a system-library dependency in the GR binary on the new runner image. GR_jll repository · Ubuntu 26.04 runner image.The separate Documentation workflow was still running when these results were recorded. The default-branch documentation run logged a Carcione example error and a missing AlgebraicPetri dependency, then was cancelled after six hours. PR Documentation job · Baseline Documentation job.
Review scope
Review the guard for initialization-dependent parameters and the case where a solver receives a parameter buffer containing dual values. ModelingToolkitBase and SymbolicIndexingInterface are existing transitive dependencies and are both MIT-licensed. Local verification covers the reported Linux x86 lane and the package's Datafit and QA groups. The full Documentation and Downgrade workflows and other operating systems were outside local verification. The guarded parameter probe passed 6/6 on Julia 1.10.12 with the Downgrade dependency versions.
Closes #353
Risk assessment
bayesian_datafitandbayesian_ensemble. Public signatures are unchanged.🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)