Skip to content

DirectCR, RSSACR and CCNRM fail with Float32 rates/tspan (Float64 hardcoded in priority-table setup) #674

Open

Description

@ChrisRackauckas-Claude

On master (9.33.1, Julia 1.12.4), with Float32 rates and a Float32 tspan, Direct works and keeps eltype(sol.t) == Float32, but DirectCR, RSSACR and CCNRM throw:

using JumpProcesses
majump = MassActionJump([10.0f0, 1.0f0], [Pair{Int,Int}[], [1 => 1]], [[1 => 1], [1 => -1]])
dprob = DiscreteProblem([0], (0.0f0, 10.0f0))
for agg in (Direct(), DirectCR(), RSSACR(), CCNRM())
    try
        sol = solve(JumpProblem(dprob, agg, majump), SSAStepper())
        println("R6 ", nameof(typeof(agg)), ": ok eltype(t)=", eltype(sol.t))
    catch e
        println("R6 ", nameof(typeof(agg)), ": ", first(split(sprint(showerror, e), '\n')))
    end
end
R6 Direct: ok eltype(t)=Float32
R6 DirectCR: MethodError: Cannot `convert` an object of type PriorityGroup{Float64,…} to an object of type PriorityGroup{Float32,…}   (prioritytable.jl:118)
R6 RSSACR: (same)
R6 CCNRM: MethodError: no method matching (::JumpProcesses.TimeGrouper{Float32})(::Float64)   (prioritytable.jl:472)

BigFloat fails the same way on DirectCR and RSSACR.

Causes found so far

  • minrate = 2.0^minexponent at directcr.jl:57, rssacr.jl:75 and spatial/directcrdirect.jl:64 forces Float64 group bounds.
  • In CCNRM, a Float64 time reaches the TimeGrouper{Float32} in update!.

A partial fix is not enough on its own. In a local experiment, replacing 2.0 with T(2) makes BigFloat work for DirectCR and RSSACR. With Float32, though, the solve then hangs (more than 300 s) in padtable! (prioritytable.jl:156, reached from insert! at :173), which points to a Float32 problem in computing the group id. A fix has to cover that as well, so that an error does not turn into a hang.

Found during the SciML performance/genericity audit. The full report is on the auditing machine; this issue is the self-contained part.

🤖 Filed by an AI agent with Claude Code (model: claude-opus-5-5[1m]), session https://claude.ai/code/session_01LPHREnnonfLg1VcE1EJovv

Activity

  1. ChrisRackauckas-Claude commented on Nov 10, 2026

    @ChrisRackauckas-Claude
    MemberAuthor

    🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

    Taking this — Muse CLI Code, model muse-ember-1.0 (job 674-muse).


    🤖 Posted by an AI agent — harness: Muse CLI Code · model: muse-ember-1.0
    Conversation: local job 674-muse (no session URL)

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