Skip to content

Commit b685196

Browse files
committed
[pptt] in CODEGEN, undo my two recent changes, i.e. essentially go back to upstream/master (i.e. do not undo PR madgraph5#754, this is needed, keep also madgraph5#764)
** NB bug madgraph5#872 xsec mismatch will show up again in the CI and in manual tests ** Revert "[pptt] in CODEGEN for CPPProcess.cc, add back the static_assert expecting nprocesses == 1 (part of the fix for madgraph5#872 in PR madgraph5#935; undo changes from PR madgraph5#754 and madgraph5#764)" This reverts commit b5576ad. Revert "[pptt] in CODEGEN model_handling.py, disable mirror processing again (undo PR madgraph5#754) to fix madgraph5#872" This reverts commit b28e04b.
1 parent 80b78f0 commit b685196

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_function_definitions.inc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,16 +448,12 @@ namespace mg5amcCpu
448448
{
449449
mgDebugInitialise();
450450

451-
// SANITY CHECKS for cudacpp code generation (see issues #272 and #343 and PRs #619, #626, #360, #396, #754 and #764)
452-
// NB (AV July 2024): cudacpp is presently unsable to handle mirror processes, so they should be disabled also in Fortran (see issue #872 and PR #935)
451+
// SANITY CHECKS for cudacpp code generation (see issues #272 and #343 and PRs #619, #626, #360, #396 and #754)
453452
// These variable are not used anywhere else in the code and their scope is limited to this sanity check
454453
{
455-
// SANITY CHECKS FOR NPROCESSES
456454
// nprocesses == 2 may happen for "mirror processes" such as P0_uux_ttx within pp_tt012j (see PR #754)
457455
constexpr int nprocesses = %(nproc)i;
458-
//static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); // AV: THIS IS WRONG AND LEADS TO BUG #872 (was introduced in PR #764 after PR #754)
459-
static_assert( nprocesses == 1, "Assume nprocesses == 1" ); // AV: SANITY CHECK AGAINST BUG #872 (fortran/cudacpp xsec mismatch in pp_tt012j)
460-
// SANITY CHECKS FOR PROCESS_ID
456+
static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" );
461457
constexpr int process_id = %(proc_id)i; // code generation source: %(proc_id_source)s
462458
static_assert( process_id == 1, "Assume process_id == 1" );
463459
}

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,14 +1419,14 @@ def generate_process_files(self):
14191419
"""Generate mgOnGpuConfig.h, CPPProcess.cc, CPPProcess.h, check_sa.cc, gXXX.cu links"""
14201420
###misc.sprint('Entering PLUGIN_OneProcessExporter.generate_process_files')
14211421
###if self.include_multi_channel:
1422-
### misc.sprint('self.include_multi_channel is already defined: this is madevent+second_exporter mode')
1423-
###else:
1424-
### misc.sprint('self.include_multi_channel is not yet defined: this is standalone_cudacpp mode') # see issue #473
1425-
###if not self.include_multi_channel: # OM this condition is likely wrong and need to be removed (added in PR #754; removed in PR #935 to fix #872)
1426-
if True: # AV fix fortran/cudacpp xsec mismatch in pp processes (added back in PR #935 to fix #872); also needed for standalone cudacpp in any case
1427-
if self.matrix_elements[0].get('has_mirror_process'):
1428-
self.matrix_elements[0].set('has_mirror_process', False)
1429-
self.nprocesses/=2
1422+
### misc.sprint('self.include_multi_channel is already defined: this is madevent+second_exporter mode') # FIXME? use self.in_madevent_mode instead?
1423+
if not self.include_multi_channel:
1424+
###misc.sprint('self.include_multi_channel is not yet defined: this is standalone_cudacpp mode') # see issue #473
1425+
# AV: needed for (moved to?) standalone_cudacpp mode (but do we need those lines at all???)
1426+
# OM: this condition is likely wrong and need to be removed
1427+
if self.matrix_elements[0].get('has_mirror_process'):
1428+
self.matrix_elements[0].set('has_mirror_process', False)
1429+
self.nprocesses/=2
14301430
super(PLUGIN_export_cpp.OneProcessExporterGPU, self).generate_process_files()
14311431
self.edit_CMakeLists()
14321432
self.edit_check_sa()

0 commit comments

Comments
 (0)