From 37f67e552d82a6f9f8c4460fa076d37f1e3044fb Mon Sep 17 00:00:00 2001 From: seabbs-bot Date: Sat, 5 Dec 2026 01:57:10 +0000 Subject: [PATCH 1/2] Fill the growth Jacobian's last row through a two-range view Reactant cannot broadcast into a traced row viewed with an integer index, so the block fills from #1022 broke the growth registry scenario under Reactant. The coverage job also gives each case 1800 s, since coverage slows the wide coupled reverse compile past 600 s. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/reactant.yaml | 3 +++ src/operators/growth.jl | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reactant.yaml b/.github/workflows/reactant.yaml index e432b5649..bd54b4ca3 100644 --- a/.github/workflows/reactant.yaml +++ b/.github/workflows/reactant.yaml @@ -88,6 +88,9 @@ jobs: timeout-minutes: 300 env: REACTANT_BACKENDS: cpu + # Coverage slows compilation: the wide coupled reverse case at T = 400 + # compiles in about 290 s without it and passes 600 s with it. + REACTANT_TIMEOUT: 1800 steps: - uses: actions/checkout@v7 - uses: julia-actions/setup-julia@v3 diff --git a/src/operators/growth.jl b/src/operators/growth.jl index cc82f8c32..0a22f7196 100644 --- a/src/operators/growth.jl +++ b/src/operators/growth.jl @@ -602,13 +602,15 @@ function _eigen_jacobian( M = _primal_matrix(lin, gain, at, ρ, L, S) Dv = _fixed(_lagged(lin, gain, at, v, ρ, L)) # Filled block by block in an array like `M`, so that it takes the - # number type of the entries, tracked or not. + # number type of the entries, tracked or not. The last row is a view + # with two ranges: Reactant cannot write a traced row through a view + # indexed by an integer. T = promote_type(eltype(M), eltype(Dv)) J = similar(M, T, S + 1, S + 1) view(J, 1:S, 1:S) .= M - I view(J, 1:S, S + 1) .= .-Dv - view(J, S + 1, 1:S) .= one(T) - view(J, S + 1, (S + 1):(S + 1)) .= zero(T) + view(J, (S + 1):(S + 1), 1:S) .= one(T) + view(J, (S + 1):(S + 1), (S + 1):(S + 1)) .= zero(T) return ρ, v, _inverse(J) end From 8acb6bc07eeb18bfee223a0360fee1de5aaa83e7 Mon Sep 17 00:00:00 2001 From: seabbs-bot Date: Sat, 5 Dec 2026 03:27:18 +0000 Subject: [PATCH 2/2] Keep the growth Jacobian comment free of other package names Co-Authored-By: Claude Opus 5.5 --- src/operators/growth.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/operators/growth.jl b/src/operators/growth.jl index 0a22f7196..f56addb96 100644 --- a/src/operators/growth.jl +++ b/src/operators/growth.jl @@ -603,8 +603,8 @@ function _eigen_jacobian( Dv = _fixed(_lagged(lin, gain, at, v, ρ, L)) # Filled block by block in an array like `M`, so that it takes the # number type of the entries, tracked or not. The last row is a view - # with two ranges: Reactant cannot write a traced row through a view - # indexed by an integer. + # with two ranges: a traced array cannot take a row written through a + # view indexed by an integer. T = promote_type(eltype(M), eltype(Dv)) J = similar(M, T, S + 1, S + 1) view(J, 1:S, 1:S) .= M - I