Repository navigation
Fix Float32/BigFloat priority-table setup (issue #674) - #716
Closed
ChrisRackauckas-Claude wants to merge 2 commits into
Closed
ChrisRackauckas-Claude wants to merge 2 commits into
ChrisRackauckas-Claude wants to merge 2 commits into
Conversation
Aggregator constructors computed the table minimum rate as a Float64 (2.0^minexponent), forcing priority-group bounds to Float64 when T was Float32 or BigFloat. Compute the power of two in T instead. The PriorityTable constructor also collapsed to zero groups when the minimum rate was below eps(T) (Float32): priortogid maps values at or below eps to group 1, giving numgroups = 0 and maxpriority = 0, which made padtable! spin forever on 0 * 2. Clamp the table to its three base groups so maxpriority stays positive. CCNRM's PriorityTimeTable update received times of a wider type than the table's (t + randexp(rng)/rate is Float64 when T is Float32). Convert old and new times to the table's type before the TimeGrouper call. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Muse <noreply@meta.com> Agent-Harness: Muse CLI Code Agent-Model: muse-ember-1.0 Agent-Session: local job 674-muse (no session URL)
Cover Float32 PriorityTable and PriorityTimeTable behavior, the aggregator-style table construction (maxpriority below eps) that hung pre-fix, full Float32 solves for Direct/DirectCR/RSSACR/CCNRM, and BigFloat-tspan solves for DirectCR/RSSACR/CCNRM. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Muse <noreply@meta.com> Agent-Harness: Muse CLI Code Agent-Model: muse-ember-1.0 Agent-Session: local job 674-muse (no session URL)
Contributor
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
Benchmark Results (Julia lts)Time benchmarks
Memory benchmarks
|
ChrisRackauckas
marked this pull request as ready for review
November 10, 2026 11:50
ChrisRackauckas
marked this pull request as draft
November 10, 2026 11:52
Member
|
Thanks for this, and for tracking down the causes in #674. I've opened #718, which supersedes this PR. It ports the 🤖 Generated with Claude Code 2.1.321 (model: claude-opus-5-5) |
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.
DirectCR,RSSACRandCCNRMnow work with Float32 and BigFloat rates and tspans. TheT(2)^minexponentchange keeps the priority-table minimum rate in the aggregator's number type instead of Float64, thePriorityTableconstructor is clamped to its three base groups so a minimum rate beloweps(T)can no longer collapse the table to zero groups with zeromaxpriority(which sentpadtable!into an infinite0 * 2loop), andCCNRM's time-table update converts times to the table's type before binning. Float64 behavior is unchanged (the2.0literal is already Float64, the clamp is inactive, and the conversions are identity), which the unchanged Float64 suite confirms.Verification
Issue reproducer (
Float32rates and tspan) on master:Direct: ok,DirectCR: MethodError: Cannot convert PriorityGroup{Float64,...},RSSACR: MethodError(same),CCNRM: MethodError: no method matching (::TimeGrouper{Float32})(::Float64). With only theT(2)change it hung (interrupted after 300 s insideDirectCRJumpAggregationconstruction). With the full fix: all four printok eltype(t)=Float32.test/table_test.jl(Float32PriorityTableinsert/update/sample/grows, aggregator-style construction,PriorityTimeTableFloat64-time updates, full Float32 solves forDirect/DirectCR/RSSACR/CCNRM, BigFloat-tspan solves forDirectCR/RSSACR/CCNRM) on pre-fix sources: error (MethodErrorat thePriorityTimeTableupdate) and hang (aggregator-style construction); on fixed sources:Test Summary: | Pass Total | table | 56 56.GROUP=InterfaceI julia --project=. -e 'using Pkg; Pkg.test()':Testing JumpProcesses tests passed(Composition-Rejection Table Tests 56/56, SSA Aggregator Smoke 452/452, Variable Rate 314/314).GROUP=QA julia --project=. -e 'using Pkg; Pkg.test()':QA Tests | 20 20, tests passed.typoson the changed files: no findings.DirectCRDirectwith Float32 hopping constants and tspan (both grid kinds): solves complete,eltype(t)=Float32, mass conserved.Not verified
InterfaceIIgroup (spatial suite runs in CI) and the GPU groups; the docs build (no docstring or docs changes).Reviewer pushback
priortogid'sepsthreshold: I kept the threshold (rates belowepsare sampled exactly in group 1) and only guaranteed the constructor's documented minimum structure.convert(T, oldtime/newtime)inPriorityTimeTableupdate: for Float64 callers this is an identity op; for Float32 callers it bins by the stored (converted) value rather than the unconverted widened value.Closes #674
Risk assessment
GROUP=InterfaceIandGROUP=QAgreen🤖 Posted by an AI agent — harness: Muse CLI Code · model: muse-ember-1.0
Conversation: local job 674-muse (no session URL)