From 795c9f389fd3ed721645d14d85f324dcc87e9e14 Mon Sep 17 00:00:00 2001 From: Olivier Mattelaer Date: Thu, 10 Sep 2026 09:45:15 +0200 Subject: [PATCH] Sort the ALOHA tag in combine_name so Majorana MadLoop output links fa710f7ad added tag.sort() to get_routine_name, so ALOHA now writes a loop wavefunction that also carries a conjugation flag as FFS4C1L3_2.f. combine_name, which builds the corresponding CALL, was not given the same normalisation and still emits CALL FFS4L3C1_2, in the order the caller happened to assemble the flags (helas_call_writers inserts the loop tag at the front of the conjugation tags). Every Majorana loop line therefore calls a routine no file defines, and MadLoop output fails at link time: ld: symbol(s) not found for architecture arm64 "_mp_ffs4l3c1_2_", referenced from: _ml5_0_mp_coef_construction_1_ Nothing in the SM or EW test surface puts a conjugation flag on a loop line, so the default suites stayed green while all gluino and neutralino NLO output was broken. Sort the tag in combine_name as well, keeping fa710f7ad intact. With this, tests/parallel_tests/test_ML5MSSMQCD passes against the stored hard-coded references for g g > go go, u u~ > go go, g g > go go g, u u~ > go go g, g g > t1 t1~ g and g g > n1 n1; two of those are bypassed by default on recorded runtime and need -t to actually run. The MadLoop and FKS IOTest golden groups are unaffected. Co-Authored-By: Claude Opus 5 --- aloha/aloha_writers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aloha/aloha_writers.py b/aloha/aloha_writers.py index f1aa405748..909f91ffff 100755 --- a/aloha/aloha_writers.py +++ b/aloha/aloha_writers.py @@ -1741,6 +1741,13 @@ def myHash(target_string): else: return 'ALOHA_%s%s' % (str(hash(target_string.lower())).replace('-','m'), suffix) + if tag: + # same normalisation as get_routine_name, which sorts the tag before + # building the routine name; without it a loop wavefunction that also + # carries a conjugation flag is CALLed as FFS4L3C1_2 while ALOHA writes + # FFS4C1L3_2. + tag.sort() + if tag and any(t.startswith('P') for t in tag[:-1]): # propagator need to be the last entry for the tag for i,t in enumerate(tag):