Skip to content

Commit 44375cb

Browse files
d-burgclaude
andcommitted
TESTING - BUG FIX - Resolve the toroidal range before sing_lim!
develop added a guard requiring intr.nlow/nhigh to be assigned before sing_lim!, since set_psilim_via_dmlim truncates at (last_rational_q + dmlim)/n and so needs n, and fixed the ordering in runtests_parallel_integration.jl. This test file copied the old ordering from that file before the guard existed; the rebase carried it forward because the two files never overlap textually, so git merged them cleanly while the semantics diverged. Only the multi-threaded CI leg surfaced it: the Solovev testset does not truncate via dmlim, and the single-threaded legs skip the whole testset because effective_threads collapses to 1 there. No thread-invariance claim is affected — the failure was an exception during setup, not a comparison mismatch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 66c2030 commit 44375cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/runtests_thread_invariance.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ function _run_at_thread_cap(dir::String, parallel_threads::Int)
5757
equil = GP_TI.Equilibrium.setup_equilibrium(eq_config, rerun_input; override_psi_nodes=psi_nodes)
5858
end
5959
intr.wall_settings = GP_TI.Vacuum.WallShapeSettings(; (Symbol(k) => v for (k, v) in inputs["Wall"])...)
60-
GP_TI.ForceFreeStates.sing_lim!(intr, ctrl, equil)
60+
# The toroidal range must be resolved before sing_lim!: under set_psilim_via_dmlim it
61+
# truncates at (last_rational_q + dmlim)/n and so needs n.
6162
intr.nlow = ctrl.nn_low
6263
intr.nhigh = ctrl.nn_high
6364
intr.npert = 1
65+
GP_TI.ForceFreeStates.sing_lim!(intr, ctrl, equil)
6466
GP_TI.ForceFreeStates.sing_find!(intr, equil)
6567
intr.mlow = min(intr.nlow * equil.params.qmin, 0) - 4 - ctrl.delta_mlow
6668
intr.mhigh = trunc(Int, intr.nhigh * equil.params.qmax) + ctrl.delta_mhigh

0 commit comments

Comments
 (0)