Skip to content

Keep standalone reducer construction under the package license scope - #30

Open
lsimon125 wants to merge 1 commit into
MadGraphTeam:loopfrom
lsimon125:codex/loop-reducer-package-scope
Open

lsimon125 wants to merge 1 commit into
MadGraphTeam:loopfrom
lsimon125:codex/loop-reducer-package-scope

Conversation

@lsimon125

Copy link
Copy Markdown

Problem

Standalone runtime::PolynomialPlan::new parses Symbolica expressions after scalar primitive registration has dropped its temporary package guard. A first calling thread can retain a restricted user permit, causing a second thread to abort even though the pyAmpliCol package key is active. This blocks subsequent counterterm-tree generation in the one-loop preparation workflow.

Minimal Fix

Keep pyamplicol::unlock() alive for the constructor scope. No numerical formula, public API, dependency, or linker-side licence handling changes.

Add a two-thread reproducer covering double generic/fast/fast-tensor, double-double generic, and arbitrary-precision generic construction.

Validation

  • Before the guard: the reproducer terminates with SIGABRT with the package key active.
  • After the guard: both runtime_reduction tests pass, including the existing scalar-master/Laurent-order and sparse-result checks.
  • rustfmt --check and git diff --check pass.
cargo test --locked --offline --release -j 4 \
  -p rusticol-loop-reduction --test runtime_reduction

The before/after tests were run in the isolated MadNkLO integration based on loop at 36f43250. The reducer runtime, this test file, crate dependencies, and lockfile are unchanged between that base and this PR base. Full virtual generation and independent amplitude comparison remain separate acceptance gates; this PR does not claim they pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant