Refusals and errors
This page lists every exception pyAmpliCol raises and every refusal key, with when it is raised and what to do about it.
- How a refusal reads
- Exception types
- Tree-level requests and processes
- Loading and evaluating
- Model sources
- One-loop requests: settings
- One-loop requests: model and process
- One-loop requests: engine conditions
- One-loop requests: native export
- See also
The diagnostic codes that pyamplicol model inspect reports for a UFO model (unsupported-spin, form-factors, …) are listed on UFO model coverage. Troubleshooting starts from a symptom instead: an installation or build error, a missing file, unexpected output, a slow run or an inaccurate value.
How a refusal reads
A refusal is an error raised instead of a value that pyAmpliCol cannot compute exactly. Its message starts with a key, such as coloured-width, says what was refused, and names the remedy after Instead:. The exception carries the key in its key attribute:
from pyamplicol import ModelSource, PyAmpliColError, generate
loop_sm = ModelSource.from_path("loop_sm")
try:
generate("g g > t t~ [QCD]", "artifacts/refused", model=loop_sm, mode="replace")
except PyAmpliColError as error:
print(error.key)
# coloured-width
On the command line a refusal ends the command with exit status 2 and the line ERROR pyamplicol.cli: coloured-width: ....
A dry run reports the refusals it can decide without generating, under unsupported_features, and lists every key of the one-loop engine with its remedy under estimated_coverage:
pyamplicol generate 'g g > t t~ [QCD]' gg_tt --model loop_sm --dry-run --json
The lists are loop_configuration_refusals, loop_admission_refusals, loop_internal_refusals, native_export_refusals and process_request_refusals. The dry run decides the settings, the model preparation and the widths; the other admission refusals, and all internal and export refusals, are decided only by the generation itself.
Exception types
Every error derives from PyAmpliColError, and every name below is imported from pyamplicol. Catch the narrowest type you can handle, and PyAmpliColError at the boundary of your program.
| Exception | Derives from | Raised when |
|---|---|---|
PyAmpliColError | Exception | the base of all errors below |
ConfigurationError | PyAmpliColError, ValueError | a setting is unknown or invalid, or a process expression contradicts the run card; messages lists every problem found |
ModelError | PyAmpliColError | a model cannot be loaded or compiled; a refused model source carries its key (Model sources) |
GenerationError | PyAmpliColError | a request cannot be generated; a refused one-loop request carries its key (a native-export refusal is the subclass NativeExportRefused) |
NoTreeDiagramError | GenerationError | a tree-level request has no diagram in the model (key no-tree-diagram; processes, coupling_orders) |
RequestFilterError | GenerationError | a setting of the request removed every diagram (key request-filter; processes, settings) |
ProcessIdCollisionError | GenerationError | a name is already taken by a process or an alias of the artifact (key process-id-collision; process_ids) |
ArtifactError | PyAmpliColError | an artifact is incomplete, damaged or missing |
CompatibilityError | ArtifactError | an artifact or a call does not fit this build, platform or process type, for example an artifact written by another pyAmpliCol build |
ReductionUnavailable | CompatibilityError | a named reduction backend cannot serve the call (key reduction-unavailable) |
EvaluationError | PyAmpliColError | an evaluation cannot be done; with on_failure="raise", a one-loop point no method served (failures holds its diagnostics) |
ProcessSelectionError | EvaluationError | a process name matches no process, or several (key process-not-served or process-ambiguous) |
DependencyError | PyAmpliColError | a native library or an optional dependency cannot be loaded |
NativePlatformError | DependencyError | this platform cannot load a native library at all, for example a glibc without a version the library needs; missing, required, found, library |
ResourceExhaustedError | PyAmpliColError | the process has run out of memory maps (resource == "memory maps") or of memory ("memory") for native code; in_use, limit |
SymbolTableError | PyAmpliColError | the Symbolica symbol table of this process cannot hold pyAmpliCol’s reserved symbols; the message names the cause |
SymbolTableForkError | SymbolTableError | this process was forked while its parent was reserving those symbols |
What to do:
ConfigurationError: correct the setting the message names;pyamplicol config templateprints every valid field (Run card).CompatibilityErrorfor an artifact or a prepared model of another build: generate or compile it again with the installed pyAmpliCol; nothing is converted.NativePlatformError: compare the glibc the message names withldd --version, then run on a system that has it or build from source (Installation).ResourceExhaustedError: start a new process (for example one per batch of artifacts), or raisevm.max_map_count.SymbolTableError: start a new process; if your program uses Symbolica itself, callpyamplicol.reserve_symbols()before it loads Symbolica states (Symbolica and licensing).
Refusals with a key arrive as these types: one-loop refusals as GenerationError (some also as ValueError), model-source refusals as ModelError, and madloop-syntax as a PyAmpliColError that is also a ValueError. Catch PyAmpliColError to see them all.
A one-loop point that no configured method serves does not raise by default: the result carries it with status "best-effort" or "failed" and lists it in result.warnings; result.emit_warnings() turns these into one NumericalAccuracyWarning (Numerical stability).
Tree-level requests and processes
| Key | Raised when | Remedy |
|---|---|---|
no-tree-diagram | A tree-level request has no Feynman diagram at any coupling order (NoTreeDiagramError); the message names a violated conservation law, or says that the process may be loop-induced. | A loop-induced process is served by a one-loop request: [noborn=QCD], or process.loop_coupling_orders. Inside a multiparticle request, members without a diagram are skipped with a warning instead. |
request-filter | The process has diagrams, but process.max_coupling_orders, process.max_quark_lines or the model’s expansion orders remove them all (RequestFilterError). | Relax the setting the message names; it says which one, or which ones together, would serve the request. |
process-id-collision | A generation or an append would give one process ID or alias ID to two processes of the artifact; nothing is written. | Name the process or alias differently (an unnamed request takes a name with a digest suffix); keep one alias per spelling. |
madloop-syntax | The process uses MG5_aMC syntax that is not served: decay chains, s-channel exclusions with $, @N, [real=QCD], [LOonly=QCD], amplitude limits other than QED=2 or QED<=2. | Use the served syntax ([QCD], [virt=QCD], [QCD QED], [noborn=QCD], QED=2, QCD^2<=4, / x), and generate each decay as a process of its own (Processes). |
dirac-weyl-closure | A tree-level request brings a vertex with both chiral projections between a massive and a massless fermion to a massless external fermion. | Keep the light fermion massive in the tree model, or use a one-loop request, whose tree-level part closes such a line at a vertex. |
vertex-orientation-unavailable | In compiled or eager mode, the model lists a vertex in one input order only, and the color-ordered merge needs the other; those diagrams would be lost. | Use the recurrence or on-the-fly execution mode, or a model that lists the vertex in both input orders. |
Loading and evaluating
| Key | Raised when | Remedy |
|---|---|---|
process-not-served | process= of Runtime.load matches no process of the artifact: no ID, alias, expression up to a reordering of each side, or group member. | Name a process that pyamplicol inspect lists for the artifact, or generate the process. |
process-ambiguous | process= matches several processes; the message lists their IDs. | Select by one of the IDs. |
reduction-unavailable | A named reduction backend (reduction="tirust" or "ninjars") cannot serve the call: missing from this build, not for this arithmetic or artifact. Raised before any point. | Use reduction="auto", which falls back and records why, or a backend and arithmetic that serve the call (Numerical stability). |
specialisation-guard (message prefix) | At load, in a parameter update or in a native interface: a value for a parameter that generation kept at its generation value because a term was dropped there (a coupling zero, a quantity real). The message names the parameter; a refused update changes nothing. | Keep the parameter at its generation value, or generate again with the new value (Evaluating matrix elements). |
counterterm-parameter-branch | At run time: set_model_parameters or a point’s scale makes zero a parameter expression that the counterterms took as nonzero. A binding raises; a point fails alone with the refusal as its reason. | Keep the parameter nonzero, or generate again with it fixed at zero (see Counterterm parameters). |
cms-five-flavour-massive-b | At run time: another value for a bottom mass that a complex-mass artifact fixed to zero. | Keep the bottom mass at zero (see Widths and the mass scheme). |
Model sources
These refusals are a ModelError, raised when the model is loaded or compiled.
| Key | Raised when | Remedy |
|---|---|---|
restriction-card-entries | A selected restriction card gives one SLHA entry two different values; of the shipped cards, restrict_parallel_test.dat of loop_qcd_qed_sm_Gmu. | Remove one of the two lines from the card, or select another restriction. |
ufo-python2 | The UFO model is Python-2 code. | Convert it with MG5_aMC (convert model <path>), or select the shipped copy by its name. |
ufo-value-writes | For a one-loop request, the UFO writes declared values after their constructors (X.value[k] += '...'). | Write each value in its constructor instead of appending to it after construction. |
ufo-counterterm-keys | For a one-loop request, a particle.counterterm key has fewer coupling powers than the model has orders, or nonzero powers past them. | Write one power per coupling order, in the order of coupling_orders.py, then the loop-group index. |
One-loop requests: settings
Settings and model declarations that the one-loop engine does not take, decided before any tree is built; a dry run reports them.
| Key | Raised when | Remedy |
|---|---|---|
loop-model-declaration | The model has no loop declaration and is not a shipped loop model (a modified copy included). | Add [loop.model] and [loop.model.scheme] to the run card, or select loop_sm, loop_qcd_qed_sm or loop_qcd_qed_sm_Gmu by name. |
loop-model-corrections | The corrections are not among those the declaration covers, for example [QED] on loop_sm. | Request covered corrections, or use loop_qcd_qed_sm or loop_qcd_qed_sm_Gmu for QED and QCD+QED. |
loop-model-completion | The declaration does not state complete UV counterterms and complete \(R_2\) rules. | Use a model and declaration with uv_complete and model_r2_complete. |
undeclared-corrections | The model does not expand the requested coupling order perturbatively. | Request corrections the model’s NLO UFO provides. |
tree-only-model | The model is a compiled tree model without its NLO UFO source. | Select the UFO source (loop_sm, loop_qcd_qed_sm, loop_qcd_qed_sm_Gmu, or your own). |
scale-parameter | The renormalization-scale parameter cannot be identified: it is fixed, or block LOOP does not hold exactly one adjustable parameter. | Keep the scale parameter adjustable: not in fixed_parameters, not fixed by the restriction. |
lc-electroweak-corrections | LC or NLC with QED or QCD+QED corrections, or any LC or NLC request on loop_qcd_qed_sm or loop_qcd_qed_sm_Gmu. | Use full color (color.accuracy = "full", the one-loop default). |
veto-external-particle | generation.particle_veto names an external particle of the process. | Veto internal particles only. |
real-mass-logarithms-declaration | The model declares pyamplicol_real_mass_logarithms with a value other than "principal" or "source". | Declare one of these two values, or remove the key. |
model-helper | A helper function of the model (function_library.py) is built at import, or uses syntax pyAmpliCol does not read (a lambda, a comprehension); the message names it. | Write the helper’s body as one literal expression of numbers, parameters, arithmetic, conditional expressions and cmath or math functions. |
squared-order-selection | process.squared_coupling_orders keeps no squared-order sector of a process, or names an order the model does not declare. | Give limits that some sector passes; the dry run lists the loop orders. |
colour-selectors | Helicity or color selectors at generation (selected_source_helicities, selected_color_sector_ids, max_color_sectors, reference_color_order) at NLC or full color. | Use the selectors at LC, or select at evaluation. |
fft-basis-trace | color.fft_basis = "trace" for a one-loop request. | Keep "adjoint", or set color.contraction = "direct". |
process-group-analysis | process.analyze_process_groups = "numerical" for a one-loop request. | Set it to "none"; process.flavor_blind and permutation aliases serve equal processes (Process grouping). |
direct-r2 | loop.r2_strategy = "direct". | Use "model": the \(R_2\) vertices of the model. |
relation-discovery | Numerical current relation discovery (generation.relation_discovery) for a one-loop request. | Set generation.relation_discovery.mode = "off". |
evaluator-backend | evaluator.backend other than "jit" for a one-loop request. | Use "jit". |
evaluator-tuning | Non-default evaluator tuning (evaluator.jit, .optimization, .recurrence, output_chunk_size) for a one-loop request. | Keep the default evaluator settings. |
covariant-multiplets | loop.preparation.covariant_multiplets for a one-loop request. | Remove it. |
One-loop requests: model and process
Structures of the model and the request that the generation refuses. Most are decided only by the generation, not by a dry run.
Loop-induced processes
A process is loop-induced when it has no tree-level amplitude within its coupling-order limits; process.loop_induced (auto, skip, only, include) routes it (One-loop matrix elements).
| Key | Raised when | Remedy |
|---|---|---|
loop-induced | A loop-induced process that the request does not serve: every one under "skip", and, under "auto", those of a multiparticle request that also has processes with a tree-level amplitude (skipped with a record; refused when none is left). | "auto" for a purely loop-induced request, "include" to serve both kinds side by side, "only" for the loop-induced ones alone. |
born-in-loop-induced-mode | A process with a tree-level amplitude under "only"; skipped with a record inside a multiparticle request. | "auto" or "skip" for the virtual correction. |
no-loop-amplitude | A loop-induced process whose loops reach no amplitude with the requested corrections, for example a a > a a [noborn=QCD]. | Request the corrections whose vertices its loops need, or limits that admit a loop. |
loop-induced-colour-accuracy | A loop-induced process at LC or NLC, from the command line, a run card or Python. | Use full color. |
Widths and the mass scheme
The default real on-shell scheme takes zero widths in tree currents; the complex-mass scheme ([loop.model.scheme] mass_scheme = "complex-mass") takes widths through complex masses (One-loop matrix elements).
| Key | Raised when | Remedy |
|---|---|---|
coloured-width | Real on-shell: a colored particle with a nonzero width in a tree current, for example the top in g g > t t~ at every loop_sm restriction but no_widths. | Fix the width to zero ([loop.preparation] fixed_parameters = {WT = "0"}), use restriction = "no_widths", or the complex-mass scheme. |
electroweak-width | Real on-shell, with electroweak corrections: any particle with a nonzero width in a tree current. | Fix the widths to zero in fixed_parameters, or use the complex-mass scheme. |
mass-scheme | mass_scheme is neither "real-on-shell" nor "complex-mass". | Use one of the two. |
complex-fixed-parameter | A value in [loop.preparation] fixed_parameters has an imaginary part. | Give real values; complex masses come from the complex-mass scheme. |
complex-mass-scheme | Complex-mass scheme on a model that MG5_aMC’s complex-mass transform cannot take (for example an external CMSParam). | Use the real on-shell scheme with zero widths, or a model within the transform’s assumptions. |
cms-internal-mass | Complex-mass scheme: a particle with a width whose mass is derived, such as the \(W\) mass of loop_sm. | Fix that width to zero (WW = "0" on loop_sm), or use a model whose mass is an input. |
cms-yukawa-input | Complex-mass scheme: the request fixes a Yukawa input. | Fix the mass instead, or use the real on-shell scheme. |
cms-external-width | Complex-mass scheme: an external particle with a nonzero width. | Set [loop] external_widths = "zero", or fix its width to zero in fixed_parameters. |
cms-revived-coupling | Complex-mass scheme: the restriction removed a coupling that is zero at the card’s values but not after the transform. | Compile the model with simplify = false, or choose another restriction. |
cms-model-helper | Complex-mass scheme: the request’s counterterms evaluate a function without a complex-mass continuation, the B0F of the four- and three-flavor QCD+QED models. | Use the real on-shell scheme with zero widths. |
cms-five-flavour-massive-b | Complex-mass scheme on loop_qcd_qed_sm or loop_qcd_qed_sm_Gmu: the request’s electroweak counterterms meet a nonzero bottom mass, where the model’s author states they are not valid. Raised at the dry run and generation. | Use a massless \(b\) (MB = "0"), the QCD corrections alone, or the real on-shell scheme (One-loop QCD+QED (electroweak)). |
Model structure
| Key | Raised when | Remedy |
|---|---|---|
lorentz-slot-arity | A vertex references a Lorentz tensor whose slots do not match its particles, and pyAmpliCol cannot repair it. | Use a model whose vertices name tensors of their own slots, or keep the vertex out with coupling-order limits or particle_veto. |
majorana-fermion | The model has a Majorana fermion. | Use a model without one. |
multi-fermion-contact | The request can reach a vertex with more than two fermions. | Keep it out with coupling-order limits or particle_veto. |
antiparticle-metadata | A particle and its antiparticle disagree in spin, mass, width, propagation, Goldstone flag, PDG sign, color or charges. | Correct the model’s antiparticle records. |
fermion-line-representation | The request can use a vertex joining a colored and a color-singlet fermion (a leptoquark). | Veto a particle of the vertex, or bound its coupling order. |
loop-vertex-outside-tree-model | A loop of the request uses a vertex that the restricted tree model removed, while its couplings do not vanish at the restriction. | Choose a restriction that keeps the vertex or makes its couplings vanish exactly, or keep it out of the loops with particle_veto or coupling-order limits. |
feynman-gauge | Massive vectors can run in the loops, and the model does not declare ‘t Hooft–Feynman gauge, or is a model prepared in another gauge. | Use an NLO UFO that declares gauge 1, as MG5_aMC’s loop models do, compiled from its source. |
Particle vetoes
| Key | Raised when | Remedy |
|---|---|---|
veto-unlabelled-counterterms | particle_veto removes a loop species of a requested correction, on a model some of whose counterterms of that correction declare no loop content (loop_qcd_qed_sm and loop_qcd_qed_sm_Gmu: photon-only QED corrections). | Request the complete corrections, without vetoing their loop species. |
anomalous-veto | particle_veto breaks an anomaly-free multiplet whose Levi-Civita counterterm a tree of the request can hold, for example vetoing d s b with a \(Z\) and gluons. | Veto whole multiplets, or set generation.allow_anomalous_veto = true to keep those counterterms anyway. |
Color
| Key | Raised when | Remedy |
|---|---|---|
colour-accuracy-nc-exact | LC or NLC over tree currents that are not exact in \(N_c\). A guard: requests that reach generation are split so that it holds. | Use full color. |
colour-declaration-coverage | LC or NLC, and a counterterm or field factor the request can insert is not covered by the model’s color declaration; loop_sm is covered. | Use full color, or a declaration that covers the vertex. |
forced-seed-fft-unserved | color.contraction = "symmetric-group-fft" where the FFT cannot serve: fewer than two permutable external gluons, LC, or declared correlations. | Use color.contraction = "auto" (the default) or "direct". |
selected-correlators | Declared color or spin correlations together with helicity or color selectors at LC. | Generate the correlations in an artifact without selectors, and the selection in another. |
subleading-colour-flows | A color-flow selection at generation none of whose flows reaches the leading power of \(N_c\); its LC value would be zero. | Add a leading flow to the selection, or select the flows at evaluation (color_flows=). |
interfering-colour-flows | A color-flow selection at generation with a flow that interferes at leading power with an unselected flow (two tree-level orders, for example QCD and photon exchange in u u~ > d d~). | Select the interfering flows together, or select at evaluation. |
External photons
| Key | Raised when | Remedy |
|---|---|---|
external-photon-scheme | Photons tagged as on-shell ([loop] external_photons, MG5_aMC’s !a!) with the electromagnetic correction, on a model or request that cannot couple them with \(\alpha(0)\). | Leave the photons untagged (external_photons = "none"), or use loop_qcd_qed_sm_Gmu with restriction = "a0". |
external-photon-legs | The external_photons list names a leg that is not an on-shell external photon. | List the one-based legs of the photons, or use "final", "all" or "none". |
Counterterm parameters
| Key | Raised when | Remedy |
|---|---|---|
counterterm-parameter-branch | A cond or reglog in a counterterm was taken on its nonzero side, and the card makes its argument vanish (for example a quark mass with simplify = false). Raised at generation, and at run time (Loading and evaluating). | Fix the parameter at generation ([loop.preparation] fixed_parameters = {MB = "0"}), keep it nonzero, or keep simplify = true so that the restriction fixes it. |
One-loop requests: engine conditions
Conditions the engine meets while generating a request it admitted. Each stops the generation instead of storing a value that could be wrong.
| Key | Raised when | Remedy |
|---|---|---|
fermion-sign | A fermion line of a loop has no relative sign under the engine’s rule. | Report the request; bound its coupling orders or veto the particle. |
reading-sign | A vertex has no sign between its tree reading and its loop reading. | Report the request. |
unlowered-counterterm | A counterterm that a tree of the request can hold cannot be lowered. | Report the request; bound its coupling orders. |
counterterm-coupling | A counterterm coupling cannot be expressed exactly. | Report the request. |
loop-kernel-catalogue | A vertex has no complete exact loop kernel. | Report the request; veto the particle or bound the coupling orders. |
block-colour-flow | Two blocks of one current have different color flows. | Report the request; bound its coupling orders or its corrections. |
counterterm-completeness | A divergent structure is covered neither by a counterterm nor by a proven zero. | Report the request: the model’s completeness does not hold for it. |
loop-induced-probe | With generation.loop_induced_probes = true, a loop-induced process fails its check of finiteness or gauge invariance. | Report the request; generation.allow_failed_probes = true stores it with the failure recorded. |
One-loop requests: native export
A one-loop artifact stores the inputs of every point in a form that the native runtime evaluates. A process that this form does not cover is refused as NativeExportRefused, a GenerationError; the message names the structure. No setting lifts these refusals: report the request.
| Key | Raised when |
|---|---|
mass-parameter | a mass is neither an external nor a derived model parameter |
parameter-read | a program reads a parameter that the tree program does not have |
parameter-kind | a model parameter of the tree or counterterm program is neither an external or derived parameter nor a coupling |
whole-rule-block | a whole-rule counterterm term sits on a block that is not a vector |
whole-rule-root | a whole-rule counterterm root term is scaled or a pole term |
observable-columns | correlations are stored for a process without native counterterm components |
plane-mismatch | a stored program evaluated in binary64 disagrees with its exact evaluator at the generation’s check; the message names the coupling, counterterm or kernel |
See also
- UFO model coverage: what a model may contain.
- Troubleshooting: from a symptom to its cause.
- One-loop matrix elements: what a one-loop request needs.
- Python: the calls that raise these errors.
- Support: how to report a request the engine refuses.