From 1f73238d15d5b6e94803fe0c9e1a0ae7880bec4d Mon Sep 17 00:00:00 2001 From: Daniele Massaro Date: Fri, 20 Feb 2026 11:47:03 +0100 Subject: [PATCH 1/2] Bump mg5amcnlo minimal version to v3.6.7 --- MG5aMC/mg5amcnlo | 2 +- epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MG5aMC/mg5amcnlo b/MG5aMC/mg5amcnlo index bfd34580eb..0e6c945573 160000 --- a/MG5aMC/mg5amcnlo +++ b/MG5aMC/mg5amcnlo @@ -1 +1 @@ -Subproject commit bfd34580eb59c2a027a502c89995e682a70a95b9 +Subproject commit 0e6c945573c8bab6246b9a172c219a7754125f51 diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/__init__.py b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/__init__.py index 381a7805fb..66aedf1ca9 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/__init__.py +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/__init__.py @@ -76,6 +76,6 @@ # NB! Do not use '(1,00,01)' here: leading zeros in decimal integer literals are not permitted in python (#1013) __version__ = (1,1,1) - minimal_mg5amcnlo_version = (3,6,4) + minimal_mg5amcnlo_version = (3,6,7) maximal_mg5amcnlo_version = (1000,1000,1000) - latest_validated_version = (3,6,5) + latest_validated_version = (3,6,7) From 365705c0c800df2a259b71bb7bb124a729bf1a37 Mon Sep 17 00:00:00 2001 From: Daniele Massaro Date: Fri, 20 Feb 2026 11:51:26 +0100 Subject: [PATCH 2/2] Regenerate processes --- .../ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt | 77 +++-- .../ee_mumu.mad/Cards/me5_configuration.txt | 34 +- .../ee_mumu.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt | 2 +- epochX/cudacpp/ee_mumu.mad/Source/.make_opts | 12 +- .../ee_mumu.mad/Source/DHELAS/makefile | 12 +- .../cudacpp/ee_mumu.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/ee_mumu.mad/Source/dsample.f | 4 +- epochX/cudacpp/ee_mumu.mad/Source/make_opts | 8 + epochX/cudacpp/ee_mumu.mad/Source/setrun.f | 84 +++++ .../ee_mumu.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_epem_mupmum/CPPProcess.cc | 2 +- .../SubProcesses/P1_epem_mupmum/CPPProcess.h | 2 +- .../SubProcesses/P1_epem_mupmum/auto_dsig.f | 11 +- .../SubProcesses/P1_epem_mupmum/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_epem_mupmum/matrix1.f | 4 +- .../ee_mumu.mad/SubProcesses/cluster.f | 6 +- .../ee_mumu.mad/SubProcesses/symmetry.f | 22 +- .../cudacpp/ee_mumu.mad/SubProcesses/unwgt.f | 3 +- .../ee_mumu.mad/bin/internal/banner.py | 2 +- .../ee_mumu.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../ee_mumu.mad/bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../ee_mumu.mad/bin/internal/extended_cmd.py | 33 +- .../cudacpp/ee_mumu.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../cudacpp/ee_mumu.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h | 2 +- .../cudacpp/ee_mumu.mad/src/Parameters_sm.cc | 2 +- .../cudacpp/ee_mumu.mad/src/Parameters_sm.h | 2 +- .../CODEGEN_cudacpp_ee_mumu_log.txt | 51 ++- .../P1_Sigma_sm_epem_mupmum/CPPProcess.cc | 2 +- .../P1_Sigma_sm_epem_mupmum/CPPProcess.h | 2 +- epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h | 2 +- .../cudacpp/ee_mumu.sa/src/Parameters_sm.cc | 2 +- epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h | 2 +- .../gg_tt.mad/CODEGEN_mad_gg_tt_log.txt | 77 +++-- .../gg_tt.mad/Cards/me5_configuration.txt | 34 +- .../cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/gg_tt.mad/MGMEVersion.txt | 2 +- epochX/cudacpp/gg_tt.mad/Source/.make_opts | 12 +- .../cudacpp/gg_tt.mad/Source/DHELAS/makefile | 12 +- .../cudacpp/gg_tt.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/gg_tt.mad/Source/dsample.f | 4 +- epochX/cudacpp/gg_tt.mad/Source/make_opts | 8 + epochX/cudacpp/gg_tt.mad/Source/setrun.f | 84 +++++ .../gg_tt.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_ttx/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttx/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttx/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttx/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttx/matrix1.f | 4 +- .../cudacpp/gg_tt.mad/SubProcesses/cluster.f | 6 +- .../cudacpp/gg_tt.mad/SubProcesses/symmetry.f | 22 +- epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f | 3 +- .../cudacpp/gg_tt.mad/bin/internal/banner.py | 2 +- .../cudacpp/gg_tt.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../gg_tt.mad/bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../gg_tt.mad/bin/internal/extended_cmd.py | 33 +- .../cudacpp/gg_tt.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- epochX/cudacpp/gg_tt.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h | 2 +- epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc | 2 +- epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h | 2 +- .../gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt | 47 ++- .../P1_Sigma_sm_gg_ttx/CPPProcess.cc | 2 +- .../P1_Sigma_sm_gg_ttx/CPPProcess.h | 2 +- epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h | 2 +- epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc | 2 +- epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h | 2 +- .../gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt | 79 +++-- .../gg_tt01g.mad/Cards/me5_configuration.txt | 34 +- .../gg_tt01g.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt | 2 +- epochX/cudacpp/gg_tt01g.mad/Source/.make_opts | 12 +- .../gg_tt01g.mad/Source/DHELAS/makefile | 12 +- .../gg_tt01g.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/gg_tt01g.mad/Source/dsample.f | 4 +- epochX/cudacpp/gg_tt01g.mad/Source/make_opts | 8 + epochX/cudacpp/gg_tt01g.mad/Source/setrun.f | 84 +++++ .../gg_tt01g.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_ttx/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttx/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttx/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttx/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttx/matrix1.f | 4 +- .../SubProcesses/P2_gg_ttxg/CPPProcess.cc | 2 +- .../SubProcesses/P2_gg_ttxg/CPPProcess.h | 2 +- .../SubProcesses/P2_gg_ttxg/auto_dsig.f | 11 +- .../SubProcesses/P2_gg_ttxg/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_gg_ttxg/matrix1.f | 4 +- .../gg_tt01g.mad/SubProcesses/cluster.f | 6 +- .../gg_tt01g.mad/SubProcesses/symmetry.f | 22 +- .../cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f | 3 +- .../gg_tt01g.mad/bin/internal/banner.py | 2 +- .../gg_tt01g.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../gg_tt01g.mad/bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../gg_tt01g.mad/bin/internal/extended_cmd.py | 33 +- .../gg_tt01g.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../cudacpp/gg_tt01g.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h | 2 +- .../cudacpp/gg_tt01g.mad/src/Parameters_sm.cc | 2 +- .../cudacpp/gg_tt01g.mad/src/Parameters_sm.h | 2 +- .../gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt | 77 +++-- .../gg_ttg.mad/Cards/me5_configuration.txt | 34 +- .../gg_ttg.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt | 2 +- epochX/cudacpp/gg_ttg.mad/Source/.make_opts | 12 +- .../cudacpp/gg_ttg.mad/Source/DHELAS/makefile | 12 +- .../cudacpp/gg_ttg.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/gg_ttg.mad/Source/dsample.f | 4 +- epochX/cudacpp/gg_ttg.mad/Source/make_opts | 8 + epochX/cudacpp/gg_ttg.mad/Source/setrun.f | 84 +++++ .../gg_ttg.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_ttxg/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttxg/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttxg/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttxg/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttxg/matrix1.f | 4 +- .../cudacpp/gg_ttg.mad/SubProcesses/cluster.f | 6 +- .../gg_ttg.mad/SubProcesses/symmetry.f | 22 +- .../cudacpp/gg_ttg.mad/SubProcesses/unwgt.f | 3 +- .../cudacpp/gg_ttg.mad/bin/internal/banner.py | 2 +- .../gg_ttg.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../gg_ttg.mad/bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../gg_ttg.mad/bin/internal/extended_cmd.py | 33 +- .../cudacpp/gg_ttg.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../cudacpp/gg_ttg.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h | 2 +- .../cudacpp/gg_ttg.mad/src/Parameters_sm.cc | 2 +- epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h | 2 +- .../gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt | 49 ++- .../P1_Sigma_sm_gg_ttxg/CPPProcess.cc | 2 +- .../P1_Sigma_sm_gg_ttxg/CPPProcess.h | 2 +- epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h | 2 +- epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc | 2 +- epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h | 2 +- .../gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt | 77 +++-- .../gg_ttgg.mad/Cards/me5_configuration.txt | 34 +- .../gg_ttgg.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt | 2 +- epochX/cudacpp/gg_ttgg.mad/Source/.make_opts | 12 +- .../gg_ttgg.mad/Source/DHELAS/makefile | 12 +- .../cudacpp/gg_ttgg.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/gg_ttgg.mad/Source/dsample.f | 4 +- epochX/cudacpp/gg_ttgg.mad/Source/make_opts | 8 + epochX/cudacpp/gg_ttgg.mad/Source/setrun.f | 84 +++++ .../gg_ttgg.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_ttxgg/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttxgg/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttxgg/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttxgg/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttxgg/matrix1.f | 4 +- .../gg_ttgg.mad/SubProcesses/cluster.f | 6 +- .../gg_ttgg.mad/SubProcesses/symmetry.f | 22 +- .../cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f | 3 +- .../gg_ttgg.mad/bin/internal/banner.py | 2 +- .../gg_ttgg.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../gg_ttgg.mad/bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../gg_ttgg.mad/bin/internal/extended_cmd.py | 33 +- .../cudacpp/gg_ttgg.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../cudacpp/gg_ttgg.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h | 2 +- .../cudacpp/gg_ttgg.mad/src/Parameters_sm.cc | 2 +- .../cudacpp/gg_ttgg.mad/src/Parameters_sm.h | 2 +- .../CODEGEN_cudacpp_gg_ttgg_log.txt | 47 ++- .../P1_Sigma_sm_gg_ttxgg/CPPProcess.cc | 2 +- .../P1_Sigma_sm_gg_ttxgg/CPPProcess.h | 2 +- epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h | 2 +- .../cudacpp/gg_ttgg.sa/src/Parameters_sm.cc | 2 +- epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h | 2 +- .../gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt | 79 +++-- .../gg_ttggg.mad/Cards/me5_configuration.txt | 34 +- .../gg_ttggg.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt | 2 +- epochX/cudacpp/gg_ttggg.mad/Source/.make_opts | 12 +- .../gg_ttggg.mad/Source/DHELAS/makefile | 12 +- .../gg_ttggg.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/gg_ttggg.mad/Source/dsample.f | 4 +- epochX/cudacpp/gg_ttggg.mad/Source/make_opts | 8 + epochX/cudacpp/gg_ttggg.mad/Source/setrun.f | 84 +++++ .../gg_ttggg.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_ttxggg/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttxggg/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttxggg/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttxggg/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttxggg/matrix1.f | 4 +- .../gg_ttggg.mad/SubProcesses/cluster.f | 6 +- .../gg_ttggg.mad/SubProcesses/symmetry.f | 22 +- .../cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f | 3 +- .../gg_ttggg.mad/bin/internal/banner.py | 2 +- .../gg_ttggg.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../gg_ttggg.mad/bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../gg_ttggg.mad/bin/internal/extended_cmd.py | 33 +- .../gg_ttggg.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../cudacpp/gg_ttggg.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h | 2 +- .../cudacpp/gg_ttggg.mad/src/Parameters_sm.cc | 2 +- .../cudacpp/gg_ttggg.mad/src/Parameters_sm.h | 2 +- .../CODEGEN_cudacpp_gg_ttggg_log.txt | 49 ++- .../P1_Sigma_sm_gg_ttxggg/CPPProcess.cc | 2 +- .../P1_Sigma_sm_gg_ttxggg/CPPProcess.h | 2 +- epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h | 2 +- .../cudacpp/gg_ttggg.sa/src/Parameters_sm.cc | 2 +- .../cudacpp/gg_ttggg.sa/src/Parameters_sm.h | 2 +- .../gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt | 77 +++-- .../gq_ttq.mad/Cards/me5_configuration.txt | 34 +- .../gq_ttq.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt | 2 +- epochX/cudacpp/gq_ttq.mad/Source/.make_opts | 12 +- .../cudacpp/gq_ttq.mad/Source/DHELAS/makefile | 12 +- .../cudacpp/gq_ttq.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/gq_ttq.mad/Source/dsample.f | 4 +- epochX/cudacpp/gq_ttq.mad/Source/make_opts | 8 + epochX/cudacpp/gq_ttq.mad/Source/setrun.f | 84 +++++ .../gq_ttq.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gu_ttxu/CPPProcess.cc | 2 +- .../SubProcesses/P1_gu_ttxu/CPPProcess.h | 2 +- .../SubProcesses/P1_gu_ttxu/auto_dsig.f | 11 +- .../SubProcesses/P1_gu_ttxu/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gu_ttxu/matrix1.f | 4 +- .../SubProcesses/P1_gux_ttxux/CPPProcess.cc | 2 +- .../SubProcesses/P1_gux_ttxux/CPPProcess.h | 2 +- .../SubProcesses/P1_gux_ttxux/auto_dsig.f | 11 +- .../SubProcesses/P1_gux_ttxux/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gux_ttxux/matrix1.f | 4 +- .../cudacpp/gq_ttq.mad/SubProcesses/cluster.f | 6 +- .../gq_ttq.mad/SubProcesses/symmetry.f | 22 +- .../cudacpp/gq_ttq.mad/SubProcesses/unwgt.f | 3 +- .../cudacpp/gq_ttq.mad/bin/internal/banner.py | 2 +- .../gq_ttq.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../gq_ttq.mad/bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../gq_ttq.mad/bin/internal/extended_cmd.py | 33 +- .../cudacpp/gq_ttq.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../cudacpp/gq_ttq.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h | 2 +- .../cudacpp/gq_ttq.mad/src/Parameters_sm.cc | 2 +- epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h | 2 +- .../gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt | 57 ++-- .../P1_Sigma_sm_gu_ttxu/CPPProcess.cc | 2 +- .../P1_Sigma_sm_gu_ttxu/CPPProcess.h | 2 +- .../P1_Sigma_sm_gux_ttxux/CPPProcess.cc | 2 +- .../P1_Sigma_sm_gux_ttxux/CPPProcess.h | 2 +- epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h | 2 +- epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc | 2 +- epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h | 2 +- .../CODEGEN_mad_heft_gg_bb_log.txt | 77 +++-- .../Cards/me5_configuration.txt | 34 +- .../heft_gg_bb.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt | 2 +- .../cudacpp/heft_gg_bb.mad/Source/.make_opts | 12 +- .../heft_gg_bb.mad/Source/DHELAS/makefile | 12 +- .../heft_gg_bb.mad/Source/MODEL/makefile | 5 + .../cudacpp/heft_gg_bb.mad/Source/dsample.f | 4 +- .../cudacpp/heft_gg_bb.mad/Source/make_opts | 8 + epochX/cudacpp/heft_gg_bb.mad/Source/setrun.f | 84 +++++ .../heft_gg_bb.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_bbx/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_bbx/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_bbx/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_bbx/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_bbx/matrix1.f | 4 +- .../heft_gg_bb.mad/SubProcesses/cluster.f | 6 +- .../heft_gg_bb.mad/SubProcesses/symmetry.f | 22 +- .../heft_gg_bb.mad/SubProcesses/unwgt.f | 3 +- .../heft_gg_bb.mad/bin/internal/banner.py | 2 +- .../heft_gg_bb.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../bin/internal/extended_cmd.py | 33 +- .../heft_gg_bb.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../heft_gg_bb.mad/bin/internal/misc.py | 58 +++- .../cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h | 2 +- .../heft_gg_bb.mad/src/Parameters_heft.cc | 2 +- .../heft_gg_bb.mad/src/Parameters_heft.h | 2 +- .../CODEGEN_cudacpp_heft_gg_bb_log.txt | 59 ++-- .../P1_Sigma_heft_gg_bbx/CPPProcess.cc | 2 +- .../P1_Sigma_heft_gg_bbx/CPPProcess.h | 2 +- .../cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h | 2 +- .../heft_gg_bb.sa/src/Parameters_heft.cc | 2 +- .../heft_gg_bb.sa/src/Parameters_heft.h | 2 +- .../CODEGEN_mad_nobm_pp_ttW_log.txt | 79 +++-- .../Cards/me5_configuration.txt | 34 +- .../nobm_pp_ttW.mad/Cards/proc_card_mg5.dat | 7 +- .../cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt | 2 +- .../cudacpp/nobm_pp_ttW.mad/Source/.make_opts | 12 +- .../nobm_pp_ttW.mad/Source/DHELAS/makefile | 12 +- .../nobm_pp_ttW.mad/Source/MODEL/makefile | 5 + .../cudacpp/nobm_pp_ttW.mad/Source/dsample.f | 4 +- .../cudacpp/nobm_pp_ttW.mad/Source/make_opts | 8 + .../cudacpp/nobm_pp_ttW.mad/Source/setrun.f | 84 +++++ .../SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P0_dux_ttxwm/CPPProcess.cc | 2 +- .../SubProcesses/P0_dux_ttxwm/CPPProcess.h | 2 +- .../SubProcesses/P0_dux_ttxwm/auto_dsig.f | 11 +- .../SubProcesses/P0_dux_ttxwm/auto_dsig1.f | 94 +++--- .../SubProcesses/P0_dux_ttxwm/matrix1.f | 4 +- .../SubProcesses/P0_udx_ttxwp/CPPProcess.cc | 2 +- .../SubProcesses/P0_udx_ttxwp/CPPProcess.h | 2 +- .../SubProcesses/P0_udx_ttxwp/auto_dsig.f | 11 +- .../SubProcesses/P0_udx_ttxwp/auto_dsig1.f | 94 +++--- .../SubProcesses/P0_udx_ttxwp/matrix1.f | 4 +- .../SubProcesses/P1_dux_ttxwmg/CPPProcess.cc | 2 +- .../SubProcesses/P1_dux_ttxwmg/CPPProcess.h | 2 +- .../SubProcesses/P1_dux_ttxwmg/auto_dsig.f | 11 +- .../SubProcesses/P1_dux_ttxwmg/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_dux_ttxwmg/matrix1.f | 4 +- .../SubProcesses/P1_gd_ttxwmu/CPPProcess.cc | 2 +- .../SubProcesses/P1_gd_ttxwmu/CPPProcess.h | 2 +- .../SubProcesses/P1_gd_ttxwmu/auto_dsig.f | 11 +- .../SubProcesses/P1_gd_ttxwmu/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gd_ttxwmu/matrix1.f | 4 +- .../SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc | 2 +- .../SubProcesses/P1_gdx_ttxwpux/CPPProcess.h | 2 +- .../SubProcesses/P1_gdx_ttxwpux/auto_dsig.f | 11 +- .../SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gdx_ttxwpux/matrix1.f | 4 +- .../SubProcesses/P1_gu_ttxwpd/CPPProcess.cc | 2 +- .../SubProcesses/P1_gu_ttxwpd/CPPProcess.h | 2 +- .../SubProcesses/P1_gu_ttxwpd/auto_dsig.f | 11 +- .../SubProcesses/P1_gu_ttxwpd/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gu_ttxwpd/matrix1.f | 4 +- .../SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc | 2 +- .../SubProcesses/P1_gux_ttxwmdx/CPPProcess.h | 2 +- .../SubProcesses/P1_gux_ttxwmdx/auto_dsig.f | 11 +- .../SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gux_ttxwmdx/matrix1.f | 4 +- .../SubProcesses/P1_udx_ttxwpg/CPPProcess.cc | 2 +- .../SubProcesses/P1_udx_ttxwpg/CPPProcess.h | 2 +- .../SubProcesses/P1_udx_ttxwpg/auto_dsig.f | 11 +- .../SubProcesses/P1_udx_ttxwpg/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_udx_ttxwpg/matrix1.f | 4 +- .../nobm_pp_ttW.mad/SubProcesses/cluster.f | 6 +- .../nobm_pp_ttW.mad/SubProcesses/symmetry.f | 22 +- .../nobm_pp_ttW.mad/SubProcesses/unwgt.f | 3 +- .../nobm_pp_ttW.mad/bin/internal/banner.py | 2 +- .../nobm_pp_ttW.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../bin/internal/extended_cmd.py | 33 +- .../nobm_pp_ttW.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../nobm_pp_ttW.mad/bin/internal/misc.py | 58 +++- .../src/HelAmps_sm_no_b_mass.h | 2 +- .../src/Parameters_sm_no_b_mass.cc | 2 +- .../src/Parameters_sm_no_b_mass.h | 2 +- .../CODEGEN_mad_pp_tt012j_log.txt | 81 +++-- .../pp_tt012j.mad/Cards/me5_configuration.txt | 34 +- .../pp_tt012j.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt | 2 +- .../cudacpp/pp_tt012j.mad/Source/.make_opts | 12 +- .../pp_tt012j.mad/Source/DHELAS/makefile | 12 +- .../pp_tt012j.mad/Source/MODEL/makefile | 5 + epochX/cudacpp/pp_tt012j.mad/Source/dsample.f | 4 +- epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 8 + epochX/cudacpp/pp_tt012j.mad/Source/setrun.f | 84 +++++ .../pp_tt012j.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P0_gg_ttx/CPPProcess.cc | 2 +- .../SubProcesses/P0_gg_ttx/CPPProcess.h | 2 +- .../SubProcesses/P0_gg_ttx/auto_dsig.f | 11 +- .../SubProcesses/P0_gg_ttx/auto_dsig1.f | 94 +++--- .../SubProcesses/P0_gg_ttx/matrix1.f | 4 +- .../SubProcesses/P0_uux_ttx/CPPProcess.cc | 2 +- .../SubProcesses/P0_uux_ttx/CPPProcess.h | 2 +- .../SubProcesses/P0_uux_ttx/auto_dsig.f | 11 +- .../SubProcesses/P0_uux_ttx/auto_dsig1.f | 94 +++--- .../SubProcesses/P0_uux_ttx/matrix1.f | 4 +- .../SubProcesses/P1_gg_ttxg/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttxg/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttxg/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttxg/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttxg/matrix1.f | 4 +- .../SubProcesses/P1_gu_ttxu/CPPProcess.cc | 2 +- .../SubProcesses/P1_gu_ttxu/CPPProcess.h | 2 +- .../SubProcesses/P1_gu_ttxu/auto_dsig.f | 11 +- .../SubProcesses/P1_gu_ttxu/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gu_ttxu/matrix1.f | 4 +- .../SubProcesses/P1_gux_ttxux/CPPProcess.cc | 2 +- .../SubProcesses/P1_gux_ttxux/CPPProcess.h | 2 +- .../SubProcesses/P1_gux_ttxux/auto_dsig.f | 11 +- .../SubProcesses/P1_gux_ttxux/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gux_ttxux/matrix1.f | 4 +- .../SubProcesses/P1_uux_ttxg/CPPProcess.cc | 2 +- .../SubProcesses/P1_uux_ttxg/CPPProcess.h | 2 +- .../SubProcesses/P1_uux_ttxg/auto_dsig.f | 11 +- .../SubProcesses/P1_uux_ttxg/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_uux_ttxg/matrix1.f | 4 +- .../SubProcesses/P2_gg_ttxgg/CPPProcess.cc | 2 +- .../SubProcesses/P2_gg_ttxgg/CPPProcess.h | 2 +- .../SubProcesses/P2_gg_ttxgg/auto_dsig.f | 11 +- .../SubProcesses/P2_gg_ttxgg/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_gg_ttxgg/matrix1.f | 4 +- .../SubProcesses/P2_gg_ttxuux/CPPProcess.cc | 2 +- .../SubProcesses/P2_gg_ttxuux/CPPProcess.h | 2 +- .../SubProcesses/P2_gg_ttxuux/auto_dsig.f | 11 +- .../SubProcesses/P2_gg_ttxuux/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_gg_ttxuux/matrix1.f | 4 +- .../SubProcesses/P2_gu_ttxgu/CPPProcess.cc | 2 +- .../SubProcesses/P2_gu_ttxgu/CPPProcess.h | 2 +- .../SubProcesses/P2_gu_ttxgu/auto_dsig.f | 11 +- .../SubProcesses/P2_gu_ttxgu/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_gu_ttxgu/matrix1.f | 4 +- .../SubProcesses/P2_gux_ttxgux/CPPProcess.cc | 2 +- .../SubProcesses/P2_gux_ttxgux/CPPProcess.h | 2 +- .../SubProcesses/P2_gux_ttxgux/auto_dsig.f | 11 +- .../SubProcesses/P2_gux_ttxgux/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_gux_ttxgux/matrix1.f | 4 +- .../SubProcesses/P2_uc_ttxuc/CPPProcess.cc | 2 +- .../SubProcesses/P2_uc_ttxuc/CPPProcess.h | 2 +- .../SubProcesses/P2_uc_ttxuc/auto_dsig.f | 11 +- .../SubProcesses/P2_uc_ttxuc/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_uc_ttxuc/matrix1.f | 4 +- .../SubProcesses/P2_ucx_ttxucx/CPPProcess.cc | 2 +- .../SubProcesses/P2_ucx_ttxucx/CPPProcess.h | 2 +- .../SubProcesses/P2_ucx_ttxucx/auto_dsig.f | 11 +- .../SubProcesses/P2_ucx_ttxucx/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_ucx_ttxucx/matrix1.f | 4 +- .../SubProcesses/P2_uu_ttxuu/CPPProcess.cc | 2 +- .../SubProcesses/P2_uu_ttxuu/CPPProcess.h | 2 +- .../SubProcesses/P2_uu_ttxuu/auto_dsig.f | 11 +- .../SubProcesses/P2_uu_ttxuu/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_uu_ttxuu/matrix1.f | 4 +- .../SubProcesses/P2_uux_ttxccx/CPPProcess.cc | 2 +- .../SubProcesses/P2_uux_ttxccx/CPPProcess.h | 2 +- .../SubProcesses/P2_uux_ttxccx/auto_dsig.f | 11 +- .../SubProcesses/P2_uux_ttxccx/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_uux_ttxccx/matrix1.f | 4 +- .../SubProcesses/P2_uux_ttxgg/CPPProcess.cc | 2 +- .../SubProcesses/P2_uux_ttxgg/CPPProcess.h | 2 +- .../SubProcesses/P2_uux_ttxgg/auto_dsig.f | 11 +- .../SubProcesses/P2_uux_ttxgg/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_uux_ttxgg/matrix1.f | 4 +- .../SubProcesses/P2_uux_ttxuux/CPPProcess.cc | 2 +- .../SubProcesses/P2_uux_ttxuux/CPPProcess.h | 2 +- .../SubProcesses/P2_uux_ttxuux/auto_dsig.f | 11 +- .../SubProcesses/P2_uux_ttxuux/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_uux_ttxuux/matrix1.f | 4 +- .../P2_uxcx_ttxuxcx/CPPProcess.cc | 2 +- .../SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h | 2 +- .../SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f | 11 +- .../SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_uxcx_ttxuxcx/matrix1.f | 4 +- .../P2_uxux_ttxuxux/CPPProcess.cc | 2 +- .../SubProcesses/P2_uxux_ttxuxux/CPPProcess.h | 2 +- .../SubProcesses/P2_uxux_ttxuxux/auto_dsig.f | 11 +- .../SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f | 94 +++--- .../SubProcesses/P2_uxux_ttxuxux/matrix1.f | 4 +- .../pp_tt012j.mad/SubProcesses/cluster.f | 6 +- .../pp_tt012j.mad/SubProcesses/symmetry.f | 22 +- .../pp_tt012j.mad/SubProcesses/unwgt.f | 3 +- .../pp_tt012j.mad/bin/internal/banner.py | 2 +- .../pp_tt012j.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../bin/internal/extended_cmd.py | 33 +- .../pp_tt012j.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../pp_tt012j.mad/bin/internal/misc.py | 58 +++- epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h | 2 +- .../pp_tt012j.mad/src/Parameters_sm.cc | 2 +- .../cudacpp/pp_tt012j.mad/src/Parameters_sm.h | 2 +- .../CODEGEN_mad_smeft_gg_tttt_log.txt | 79 +++-- .../Cards/me5_configuration.txt | 34 +- .../smeft_gg_tttt.mad/Cards/proc_card_mg5.dat | 7 +- .../cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt | 2 +- .../smeft_gg_tttt.mad/Source/.make_opts | 12 +- .../smeft_gg_tttt.mad/Source/DHELAS/makefile | 12 +- .../smeft_gg_tttt.mad/Source/MODEL/makefile | 5 + .../smeft_gg_tttt.mad/Source/dsample.f | 4 +- .../smeft_gg_tttt.mad/Source/make_opts | 8 + .../cudacpp/smeft_gg_tttt.mad/Source/setrun.f | 84 +++++ .../SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_ttxttx/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttxttx/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttxttx/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttxttx/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttxttx/matrix1.f | 4 +- .../smeft_gg_tttt.mad/SubProcesses/cluster.f | 6 +- .../smeft_gg_tttt.mad/SubProcesses/symmetry.f | 22 +- .../smeft_gg_tttt.mad/SubProcesses/unwgt.f | 3 +- .../smeft_gg_tttt.mad/bin/internal/banner.py | 2 +- .../smeft_gg_tttt.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../bin/internal/extended_cmd.py | 33 +- .../smeft_gg_tttt.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../smeft_gg_tttt.mad/bin/internal/misc.py | 58 +++- .../HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h | 2 +- ...Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc | 2 +- .../Parameters_SMEFTsim_topU3l_MwScheme_UFO.h | 2 +- .../CODEGEN_cudacpp_smeft_gg_tttt_log.txt | 63 ++-- .../CPPProcess.cc | 2 +- .../CPPProcess.h | 2 +- .../HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h | 2 +- ...Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc | 2 +- .../Parameters_SMEFTsim_topU3l_MwScheme_UFO.h | 2 +- .../CODEGEN_mad_susy_gg_t1t1_log.txt | 75 ++--- .../Cards/me5_configuration.txt | 34 +- .../susy_gg_t1t1.mad/Cards/proc_card_mg5.dat | 7 +- .../cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt | 2 +- .../susy_gg_t1t1.mad/Source/.make_opts | 12 +- .../susy_gg_t1t1.mad/Source/DHELAS/makefile | 12 +- .../susy_gg_t1t1.mad/Source/MODEL/makefile | 5 + .../cudacpp/susy_gg_t1t1.mad/Source/dsample.f | 4 +- .../cudacpp/susy_gg_t1t1.mad/Source/make_opts | 8 + .../cudacpp/susy_gg_t1t1.mad/Source/setrun.f | 84 +++++ .../SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_t1t1x/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_t1t1x/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_t1t1x/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_t1t1x/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_t1t1x/matrix1.f | 4 +- .../susy_gg_t1t1.mad/SubProcesses/cluster.f | 6 +- .../susy_gg_t1t1.mad/SubProcesses/symmetry.f | 22 +- .../susy_gg_t1t1.mad/SubProcesses/unwgt.f | 3 +- .../susy_gg_t1t1.mad/bin/internal/banner.py | 2 +- .../susy_gg_t1t1.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../bin/internal/extended_cmd.py | 33 +- .../susy_gg_t1t1.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../susy_gg_t1t1.mad/bin/internal/misc.py | 58 +++- .../susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h | 2 +- .../src/Parameters_MSSM_SLHA2.cc | 2 +- .../src/Parameters_MSSM_SLHA2.h | 2 +- .../CODEGEN_cudacpp_susy_gg_t1t1_log.txt | 47 ++- .../CPPProcess.cc | 2 +- .../P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h | 2 +- .../susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h | 2 +- .../src/Parameters_MSSM_SLHA2.cc | 2 +- .../src/Parameters_MSSM_SLHA2.h | 2 +- .../CODEGEN_mad_susy_gg_tt_log.txt | 75 ++--- .../Cards/me5_configuration.txt | 34 +- .../susy_gg_tt.mad/Cards/proc_card_mg5.dat | 7 +- epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt | 2 +- .../cudacpp/susy_gg_tt.mad/Source/.make_opts | 12 +- .../susy_gg_tt.mad/Source/DHELAS/makefile | 12 +- .../susy_gg_tt.mad/Source/MODEL/makefile | 5 + .../cudacpp/susy_gg_tt.mad/Source/dsample.f | 4 +- .../cudacpp/susy_gg_tt.mad/Source/make_opts | 8 + epochX/cudacpp/susy_gg_tt.mad/Source/setrun.f | 84 +++++ .../susy_gg_tt.mad/SubProcesses/MGVersion.txt | 2 +- .../SubProcesses/P1_gg_ttx/CPPProcess.cc | 2 +- .../SubProcesses/P1_gg_ttx/CPPProcess.h | 2 +- .../SubProcesses/P1_gg_ttx/auto_dsig.f | 11 +- .../SubProcesses/P1_gg_ttx/auto_dsig1.f | 94 +++--- .../SubProcesses/P1_gg_ttx/matrix1.f | 4 +- .../susy_gg_tt.mad/SubProcesses/cluster.f | 6 +- .../susy_gg_tt.mad/SubProcesses/symmetry.f | 22 +- .../susy_gg_tt.mad/SubProcesses/unwgt.f | 3 +- .../susy_gg_tt.mad/bin/internal/banner.py | 2 +- .../susy_gg_tt.mad/bin/internal/cluster.py | 312 ++++++++++++++++-- .../bin/internal/combine_runs.py | 62 +++- .../bin/internal/common_run_interface.py | 63 +++- .../bin/internal/dmtcp_condor_driver.sh | 84 +++++ .../bin/internal/dmtcp_condor_preexec.sh | 7 + .../bin/internal/dmtcp_slurm_driver.sh | 72 ++++ .../bin/internal/extended_cmd.py | 33 +- .../susy_gg_tt.mad/bin/internal/files.py | 15 +- .../bin/internal/madevent_interface.py | 49 ++- .../susy_gg_tt.mad/bin/internal/misc.py | 58 +++- .../susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h | 2 +- .../src/Parameters_MSSM_SLHA2.cc | 2 +- .../src/Parameters_MSSM_SLHA2.h | 2 +- .../CODEGEN_cudacpp_susy_gg_tt_log.txt | 49 ++- .../P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc | 2 +- .../P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h | 2 +- .../susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h | 2 +- .../src/Parameters_MSSM_SLHA2.cc | 2 +- .../susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h | 2 +- 621 files changed, 14603 insertions(+), 3967 deletions(-) create mode 100644 epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_slurm_driver.sh create mode 100644 epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_driver.sh create mode 100644 epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh create mode 100644 epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh diff --git a/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt b/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt index 9b585dc4d8..4a5cfe13ff 100644 --- a/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt +++ b/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate e+ e- > mu+ mu- No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004334926605224609  +DEBUG: model prefixing takes 0.0013425350189208984  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -149,21 +144,21 @@ INFO: Checking for minimal orders which gives processes. INFO: Please specify coupling orders to bypass this step. INFO: Trying process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Process has 2 diagrams -1 processes with 2 diagrams generated in 0.003 s +1 processes with 2 diagrams generated in 0.002 s Total: 1 processes with 2 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_ee_mumu --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_ee_mumu INFO: remove old information in CODEGEN_mad_ee_mumu DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Processing color information for process: e+ e- > mu+ mu- @1 @@ -178,19 +173,19 @@ INFO: Finding symmetric diagrams for subprocess group epem_mupmum DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s -Wrote files for 8 helas calls in 0.056 s +Generated helas calls for 1 subprocesses (2 diagrams) in 0.002 s +Wrote files for 8 helas calls in 0.025 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates FFV4 routines -ALOHA: aloha creates 3 routines in 0.147 s +ALOHA: aloha creates 3 routines in 0.055 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates FFV4 routines ALOHA: aloha creates FFV2_4 routines -ALOHA: aloha creates 7 routines in 0.209 s +ALOHA: aloha creates 7 routines in 0.067 s FFV1 FFV1 FFV2 @@ -199,32 +194,32 @@ ALOHA: aloha creates 7 routines in 0.209 s FFV4 FFV2_4 FFV2_4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README Run "open index.html" to see more information about this process. quit -real 0m2.336s -user 0m1.738s -sys 0m0.448s -Code generation completed in 3 seconds +real 0m0.967s +user 0m0.794s +sys 0m0.126s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -237,7 +232,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -245,11 +240,12 @@ Code generation completed in 3 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -266,7 +262,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -274,11 +270,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat index 5ff1e10ea7..ebf807b5ec 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt b/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt +++ b/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/Source/.make_opts b/epochX/cudacpp/ee_mumu.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/.make_opts +++ b/epochX/cudacpp/ee_mumu.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/makefile b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/ee_mumu.mad/Source/MODEL/makefile b/epochX/cudacpp/ee_mumu.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/ee_mumu.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/ee_mumu.mad/Source/dsample.f b/epochX/cudacpp/ee_mumu.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/dsample.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/ee_mumu.mad/Source/make_opts b/epochX/cudacpp/ee_mumu.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/make_opts +++ b/epochX/cudacpp/ee_mumu.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/ee_mumu.mad/Source/setrun.f b/epochX/cudacpp/ee_mumu.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/setrun.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc index 2450ec54f8..1609deb214 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h index c9d280d0f6..61b38aacf4 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f index 4975b37edd..d8922870d0 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f index 5d78423547..e5f0600e14 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -228,7 +228,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -464,52 +464,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f index f1b361e2e0..291fe208fb 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -311,7 +311,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_runs.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h b/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h index ac2bc669f2..ae68a9ce10 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc index 293d7dff0c..62d40c6150 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h index 07eb4c280e..e4f0010c47 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt b/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt index 841d1a4ff8..46b9b4ab59 100644 --- a/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt +++ b/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt @@ -1,8 +1,5 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode -('WARNING: loading of madgraph too slow!!!', 0.9418234825134277) +('WARNING: loading of madgraph too slow!!!', 0.5426583290100098) Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * @@ -16,11 +13,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +43,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -58,7 +53,7 @@ generate e+ e- > mu+ mu- No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004073143005371094  +DEBUG: model prefixing takes 0.001287698745727539  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,13 +145,13 @@ INFO: Checking for minimal orders which gives processes. INFO: Please specify coupling orders to bypass this step. INFO: Trying process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Process has 2 diagrams -1 processes with 2 diagrams generated in 0.003 s +1 processes with 2 diagrams generated in 0.002 s Total: 1 processes with 2 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_ee_mumu Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Processing color information for process: e+ e- > mu+ mu- @1 @@ -165,17 +160,17 @@ INFO: Processing color information for process: e+ e- > mu+ mu- @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/. -Generated helas calls for 1 subprocesses (2 diagrams) in 0.003 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/. +Generated helas calls for 1 subprocesses (2 diagrams) in 0.001 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates FFV4 routines ALOHA: aloha creates FFV2_4 routines -ALOHA: aloha creates 4 routines in 0.184 s +ALOHA: aloha creates 4 routines in 0.073 s FFV1 FFV1 FFV2 @@ -184,17 +179,17 @@ ALOHA: aloha creates 4 routines in 0.184 s FFV4 FFV2_4 FFV2_4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. quit -real 0m1.411s -user 0m1.293s -sys 0m0.100s -Code generation completed in 2 seconds +real 0m0.750s +user 0m0.665s +sys 0m0.048s +Code generation completed in 1 seconds diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc index af61f3ea74..3ea7c1f86e 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h index c9d280d0f6..61b38aacf4 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h b/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h index ac2bc669f2..ae68a9ce10 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc index 293d7dff0c..62d40c6150 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h index 07eb4c280e..e4f0010c47 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt b/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt index aa295f096d..642351f044 100644 --- a/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt +++ b/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.005468606948852539  +DEBUG: model prefixing takes 0.0013353824615478516  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,21 +145,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.006 s +1 processes with 3 diagrams generated in 0.003 s Total: 1 processes with 3 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_gg_tt INFO: remove old information in CODEGEN_mad_gg_tt DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 @@ -179,46 +174,46 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s -Wrote files for 10 helas calls in 0.060 s +Generated helas calls for 1 subprocesses (3 diagrams) in 0.002 s +Wrote files for 10 helas calls in 0.026 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 2 routines in 0.103 s +ALOHA: aloha creates 2 routines in 0.041 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 4 routines in 0.087 s +ALOHA: aloha creates 4 routines in 0.035 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/README Run "open index.html" to see more information about this process. quit -real 0m2.087s -user 0m1.661s -sys 0m0.421s -Code generation completed in 2 seconds +real 0m0.908s +user 0m0.761s +sys 0m0.127s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -231,7 +226,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -239,11 +234,12 @@ Code generation completed in 2 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -260,7 +256,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -268,11 +264,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat index aa36c92dd6..fcf2ae4e59 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt b/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.mad/Source/.make_opts b/epochX/cudacpp/gg_tt.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/makefile b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_tt.mad/Source/MODEL/makefile b/epochX/cudacpp/gg_tt.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_tt.mad/Source/dsample.f b/epochX/cudacpp/gg_tt.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/dsample.f +++ b/epochX/cudacpp/gg_tt.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/gg_tt.mad/Source/make_opts b/epochX/cudacpp/gg_tt.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_tt.mad/Source/setrun.f b/epochX/cudacpp/gg_tt.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/setrun.f +++ b/epochX/cudacpp/gg_tt.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index 55167ebaf3..1d4b8da7e1 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h index 26652fc739..9e012c02f7 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f index 91dadaaa8f..e5073c233a 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f index 2b1fafdacd..f6bf4ceb6e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f index 8364fcea1f..ef0ed8f31b 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -293,7 +293,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/combine_runs.py b/epochX/cudacpp/gg_tt.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/files.py b/epochX/cudacpp/gg_tt.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py b/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h index 5eccb401d8..70bb73b9bc 100644 --- a/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc index 5ac5c9f343..98b3ff1188 100644 --- a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h index bf3b9d908f..9b7f59f933 100644 --- a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt b/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt index 8bf68db24a..d37b096fe5 100644 --- a/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt +++ b/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004604816436767578  +DEBUG: model prefixing takes 0.0013613700866699219  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,13 +145,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.006 s +1 processes with 3 diagrams generated in 0.003 s Total: 1 processes with 3 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_tt Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 @@ -165,30 +160,30 @@ INFO: Processing color information for process: g g > t t~ @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/. -Generated helas calls for 1 subprocesses (3 diagrams) in 0.005 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/. +Generated helas calls for 1 subprocesses (3 diagrams) in 0.002 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 2 routines in 0.234 s +ALOHA: aloha creates 2 routines in 0.041 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. quit -real 0m0.641s -user 0m0.567s -sys 0m0.067s +real 0m0.214s +user 0m0.181s +sys 0m0.029s Code generation completed in 0 seconds diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc index 2b06bb84d0..81674b19ba 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h index 26652fc739..9e012c02f7 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h index 5eccb401d8..70bb73b9bc 100644 --- a/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc index 5ac5c9f343..98b3ff1188 100644 --- a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h index bf3b9d908f..9b7f59f933 100644 --- a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt b/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt index 4e98bb4620..a14ac9a7ff 100644 --- a/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt +++ b/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004599094390869141  +DEBUG: model prefixing takes 0.0013644695281982422  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,7 +145,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.009 s +1 processes with 3 diagrams generated in 0.003 s Total: 1 processes with 3 diagrams add process g g > t t~ g INFO: Checking for minimal orders which gives processes. @@ -158,21 +153,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g WEIGHTED<=3 @2 INFO: Process has 16 diagrams -1 processes with 16 diagrams generated in 0.020 s +1 processes with 16 diagrams generated in 0.007 s Total: 2 processes with 19 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt01g --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_gg_tt01g INFO: remove old information in CODEGEN_mad_gg_tt01g DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g WEIGHTED<=3 @2 INFO: Processing color information for process: g g > t t~ g @2 @@ -200,22 +195,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1577]  -Generated helas calls for 2 subprocesses (19 diagrams) in 0.036 s -Wrote files for 46 helas calls in 0.146 s +Generated helas calls for 2 subprocesses (19 diagrams) in 0.017 s +Wrote files for 46 helas calls in 0.067 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 5 routines in 0.245 s +ALOHA: aloha creates 5 routines in 0.091 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 10 routines in 0.278 s +ALOHA: aloha creates 10 routines in 0.084 s VVV1 VVV1 FFV1 @@ -225,32 +220,32 @@ ALOHA: aloha creates 10 routines in 0.278 s VVVV1 VVVV3 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/README Run "open index.html" to see more information about this process. quit -real 0m2.922s -user 0m2.428s -sys 0m0.480s -Code generation completed in 3 seconds +real 0m1.176s +user 0m0.979s +sys 0m0.179s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -263,7 +258,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -271,11 +266,12 @@ Code generation completed in 3 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -292,7 +288,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -300,11 +296,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat index ed8b6d7e05..145799df23 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt b/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts b/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/makefile b/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/MODEL/makefile b/epochX/cudacpp/gg_tt01g.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/gg_tt01g.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/dsample.f b/epochX/cudacpp/gg_tt01g.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/dsample.f +++ b/epochX/cudacpp/gg_tt01g.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/make_opts b/epochX/cudacpp/gg_tt01g.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt01g.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/setrun.f b/epochX/cudacpp/gg_tt01g.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/setrun.f +++ b/epochX/cudacpp/gg_tt01g.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index 55167ebaf3..1d4b8da7e1 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h index 26652fc739..9e012c02f7 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f index 91dadaaa8f..e5073c233a 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f index 2b1fafdacd..f6bf4ceb6e 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f index 8364fcea1f..ef0ed8f31b 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -293,7 +293,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc index f6e0894592..7d1ad98ae5 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h index a0fbcbb773..0ada239186 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f index da6df09770..c7aa2cb989 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f index b43e90a6ae..58d76b16ec 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f index 42ed3e5e61..288a885444 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,7 +309,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_runs.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h index e98508161d..b6f854cc04 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt b/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt index 97235153d9..b0c090586a 100644 --- a/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt +++ b/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004189252853393555  +DEBUG: model prefixing takes 0.0013353824615478516  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,21 +145,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g WEIGHTED<=3 @1 INFO: Process has 16 diagrams -1 processes with 16 diagrams generated in 0.016 s +1 processes with 16 diagrams generated in 0.008 s Total: 1 processes with 16 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttg --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_gg_ttg INFO: remove old information in CODEGEN_mad_gg_ttg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g WEIGHTED<=3 @1 INFO: Processing color information for process: g g > t t~ g @1 @@ -179,22 +174,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxg DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (16 diagrams) in 0.030 s -Wrote files for 36 helas calls in 0.090 s +Generated helas calls for 1 subprocesses (16 diagrams) in 0.013 s +Wrote files for 36 helas calls in 0.042 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 5 routines in 0.225 s +ALOHA: aloha creates 5 routines in 0.099 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 10 routines in 0.238 s +ALOHA: aloha creates 10 routines in 0.082 s VVV1 VVV1 FFV1 @@ -204,32 +199,32 @@ ALOHA: aloha creates 10 routines in 0.238 s VVVV1 VVVV3 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/README Run "open index.html" to see more information about this process. quit -real 0m2.355s -user 0m1.970s -sys 0m0.377s -Code generation completed in 3 seconds +real 0m1.082s +user 0m0.929s +sys 0m0.130s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -242,7 +237,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -250,11 +245,12 @@ Code generation completed in 3 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -271,7 +267,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -279,11 +275,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat index fcef7100c0..5eabcc562e 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt b/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/Source/.make_opts b/epochX/cudacpp/gg_ttg.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_ttg.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/makefile b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_ttg.mad/Source/MODEL/makefile b/epochX/cudacpp/gg_ttg.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/gg_ttg.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_ttg.mad/Source/dsample.f b/epochX/cudacpp/gg_ttg.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/dsample.f +++ b/epochX/cudacpp/gg_ttg.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/gg_ttg.mad/Source/make_opts b/epochX/cudacpp/gg_ttg.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttg.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_ttg.mad/Source/setrun.f b/epochX/cudacpp/gg_ttg.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/setrun.f +++ b/epochX/cudacpp/gg_ttg.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc index 7f29af7755..b8886a84b3 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h index 1b49cac30b..feb1bd2b09 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f index d515f03f86..60f5129ab6 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f index b68e4b8cb6..fe97823092 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f index c889ca8138..21be95d5b0 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,7 +309,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_runs.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h index e98508161d..b6f854cc04 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt b/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt index 4fba5c78a3..82b81fdce9 100644 --- a/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt +++ b/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004650592803955078  +DEBUG: model prefixing takes 0.0013451576232910156  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,13 +145,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g WEIGHTED<=3 @1 INFO: Process has 16 diagrams -1 processes with 16 diagrams generated in 0.016 s +1 processes with 16 diagrams generated in 0.008 s Total: 1 processes with 16 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_ttg Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g WEIGHTED<=3 @1 INFO: Processing color information for process: g g > t t~ g @1 @@ -165,18 +160,18 @@ INFO: Processing color information for process: g g > t t~ g @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/. -Generated helas calls for 1 subprocesses (16 diagrams) in 0.028 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/. +Generated helas calls for 1 subprocesses (16 diagrams) in 0.013 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 5 routines in 0.219 s +ALOHA: aloha creates 5 routines in 0.091 s VVV1 VVV1 FFV1 @@ -186,17 +181,17 @@ ALOHA: aloha creates 5 routines in 0.219 s VVVV1 VVVV3 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. quit -real 0m0.640s -user 0m0.570s -sys 0m0.064s -Code generation completed in 1 seconds +real 0m0.291s +user 0m0.259s +sys 0m0.023s +Code generation completed in 0 seconds diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc index 3897ffd9b4..39cefd15a5 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h index 1b49cac30b..feb1bd2b09 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h index e98508161d..b6f854cc04 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt b/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt index 1057582ab2..e3eb9190aa 100644 --- a/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt +++ b/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004447460174560547  +DEBUG: model prefixing takes 0.0013310909271240234  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,21 +145,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Process has 123 diagrams -1 processes with 123 diagrams generated in 0.154 s +1 processes with 123 diagrams generated in 0.058 s Total: 1 processes with 123 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttgg --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_gg_ttgg INFO: remove old information in CODEGEN_mad_gg_ttgg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ g g @1 @@ -179,22 +174,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxgg DEBUG: len(subproc_diagrams_for_config) =  105 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 11, 11: 12, 12: 13, 13: 14, 14: 15, 15: 16, 16: 17, 17: 18, 18: 19, 19: 20, 20: 21, 21: 22, 22: 23, 23: 24, 24: 25, 25: 26, 26: 27, 27: 28, 28: 29, 29: 30, 30: 31, 31: 33, 32: 34, 33: 35, 34: 36, 35: 37, 36: 38, 37: 39, 38: 40, 39: 41, 40: 42, 41: 43, 42: 44, 43: 45, 44: 46, 45: 47, 46: 49, 47: 50, 48: 51, 49: 52, 50: 53, 51: 54, 52: 55, 53: 56, 54: 57, 55: 59, 56: 60, 57: 61, 58: 62, 59: 63, 60: 64, 61: 65, 62: 66, 63: 67, 64: 68, 65: 69, 66: 70, 67: 71, 68: 72, 69: 73, 70: 75, 71: 76, 72: 77, 73: 78, 74: 79, 75: 80, 76: 81, 77: 82, 78: 83, 79: 84, 80: 85, 81: 86, 82: 87, 83: 88, 84: 89, 85: 90, 86: 91, 87: 92, 88: 94, 89: 95, 90: 96, 91: 97, 92: 98, 93: 99, 94: 101, 95: 102, 96: 103, 97: 104, 98: 105, 99: 106, 100: 108, 101: 109, 102: 110, 103: 111, 104: 112, 105: 113} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 7: 6, 8: 7, 9: 8, 10: 9, 11: 10, 12: 11, 13: 12, 14: 13, 15: 14, 16: 15, 17: 16, 18: 17, 19: 18, 20: 19, 21: 20, 22: 21, 23: 22, 24: 23, 25: 24, 26: 25, 27: 26, 28: 27, 29: 28, 30: 29, 31: 30, 33: 31, 34: 32, 35: 33, 36: 34, 37: 35, 38: 36, 39: 37, 40: 38, 41: 39, 42: 40, 43: 41, 44: 42, 45: 43, 46: 44, 47: 45, 49: 46, 50: 47, 51: 48, 52: 49, 53: 50, 54: 51, 55: 52, 56: 53, 57: 54, 59: 55, 60: 56, 61: 57, 62: 58, 63: 59, 64: 60, 65: 61, 66: 62, 67: 63, 68: 64, 69: 65, 70: 66, 71: 67, 72: 68, 73: 69, 75: 70, 76: 71, 77: 72, 78: 73, 79: 74, 80: 75, 81: 76, 82: 77, 83: 78, 84: 79, 85: 80, 86: 81, 87: 82, 88: 83, 89: 84, 90: 85, 91: 86, 92: 87, 94: 88, 95: 89, 96: 90, 97: 91, 98: 92, 99: 93, 101: 94, 102: 95, 103: 96, 104: 97, 105: 98, 106: 99, 108: 100, 109: 101, 110: 102, 111: 103, 112: 104, 113: 105} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (123 diagrams) in 0.342 s -Wrote files for 222 helas calls in 0.520 s +Generated helas calls for 1 subprocesses (123 diagrams) in 0.149 s +Wrote files for 222 helas calls in 0.221 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.260 s +ALOHA: aloha creates 5 routines in 0.088 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.209 s +ALOHA: aloha creates 10 routines in 0.091 s VVV1 VVV1 FFV1 @@ -207,32 +202,32 @@ ALOHA: aloha creates 10 routines in 0.209 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/README Run "open index.html" to see more information about this process. quit -real 0m3.743s -user 0m3.220s -sys 0m0.493s -Code generation completed in 3 seconds +real 0m1.569s +user 0m1.394s +sys 0m0.154s +Code generation completed in 2 seconds ************************************************************ * * * W E L C O M E to * @@ -245,7 +240,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -253,11 +248,12 @@ Code generation completed in 3 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -274,7 +270,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -282,11 +278,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat index 75757ce320..3d71607ccb 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt b/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts b/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/makefile b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/MODEL/makefile b/epochX/cudacpp/gg_ttgg.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/dsample.f b/epochX/cudacpp/gg_ttgg.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/dsample.f +++ b/epochX/cudacpp/gg_ttgg.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/setrun.f b/epochX/cudacpp/gg_ttgg.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/setrun.f +++ b/epochX/cudacpp/gg_ttgg.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc index 6664e7c6fc..7176b5fb85 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h index 7b57d7c763..2af5afa7e1 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f index 90297dd728..3d1ed9e619 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f index ab30d5c85e..b8993a4683 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f index a52833d8fe..1f98d5ff50 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -341,7 +341,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_runs.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h index 928367303f..8edd09b089 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt b/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt index 1fffa7b56f..5cf1f959a7 100644 --- a/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt +++ b/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.006587028503417969  +DEBUG: model prefixing takes 0.0013327598571777344  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,13 +145,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Process has 123 diagrams -1 processes with 123 diagrams generated in 0.232 s +1 processes with 123 diagrams generated in 0.058 s Total: 1 processes with 123 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_ttgg Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ g g @1 @@ -165,18 +160,18 @@ INFO: Processing color information for process: g g > t t~ g g @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/. -Generated helas calls for 1 subprocesses (123 diagrams) in 0.330 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/. +Generated helas calls for 1 subprocesses (123 diagrams) in 0.150 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.217 s +ALOHA: aloha creates 5 routines in 0.085 s VVV1 VVV1 FFV1 @@ -189,17 +184,17 @@ ALOHA: aloha creates 5 routines in 0.217 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. quit -real 0m1.276s -user 0m1.214s -sys 0m0.051s +real 0m0.518s +user 0m0.479s +sys 0m0.032s Code generation completed in 1 seconds diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc index d43252d697..d69e17e801 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h index 7b57d7c763..2af5afa7e1 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h index 928367303f..8edd09b089 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt b/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt index 8a0470d8c7..97c4af5ab7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt +++ b/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ g g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004680633544921875  +DEBUG: model prefixing takes 0.001363992691040039  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,27 +145,27 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=5: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Process has 1240 diagrams -1 processes with 1240 diagrams generated in 1.461 s +1 processes with 1240 diagrams generated in 0.736 s Total: 1 processes with 1240 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttggg --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_gg_ttggg INFO: remove old information in CODEGEN_mad_gg_ttggg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Processing color information for process: g g > t t~ g g g @1 INFO: Creating files in directory P1_gg_ttxggg INFO: Computing Color-Flow optimization [15120 term] -INFO: Color-Flow passed to 1630 term in 5s. Introduce 3030 contraction +INFO: Color-Flow passed to 1630 term in 2s. Introduce 3030 contraction DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h @@ -181,22 +176,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxggg DEBUG: len(subproc_diagrams_for_config) =  945 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 4, 4: 5, 5: 7, 6: 8, 7: 14, 8: 15, 9: 16, 10: 18, 11: 19, 12: 20, 13: 22, 14: 23, 15: 24, 16: 26, 17: 27, 18: 28, 19: 29, 20: 30, 21: 31, 22: 33, 23: 34, 24: 35, 25: 36, 26: 37, 27: 38, 28: 39, 29: 40, 30: 41, 31: 42, 32: 43, 33: 44, 34: 45, 35: 46, 36: 47, 37: 49, 38: 50, 39: 51, 40: 52, 41: 53, 42: 54, 43: 55, 44: 56, 45: 57, 46: 58, 47: 59, 48: 60, 49: 61, 50: 62, 51: 63, 52: 65, 53: 66, 54: 67, 55: 68, 56: 69, 57: 70, 58: 71, 59: 72, 60: 73, 61: 74, 62: 75, 63: 76, 64: 77, 65: 78, 66: 79, 67: 81, 68: 82, 69: 83, 70: 84, 71: 85, 72: 86, 73: 87, 74: 88, 75: 89, 76: 91, 77: 92, 78: 93, 79: 94, 80: 95, 81: 96, 82: 97, 83: 98, 84: 99, 85: 101, 86: 102, 87: 103, 88: 104, 89: 105, 90: 106, 91: 107, 92: 108, 93: 109, 94: 110, 95: 111, 96: 112, 97: 113, 98: 114, 99: 115, 100: 116, 101: 117, 102: 118, 103: 119, 104: 120, 105: 121, 106: 124, 107: 125, 108: 126, 109: 127, 110: 128, 111: 129, 112: 130, 113: 131, 114: 132, 115: 133, 116: 134, 117: 135, 118: 136, 119: 137, 120: 138, 121: 140, 122: 141, 123: 143, 124: 144, 125: 145, 126: 146, 127: 147, 128: 148, 129: 149, 130: 150, 131: 151, 132: 152, 133: 153, 134: 154, 135: 155, 136: 156, 137: 157, 138: 159, 139: 160, 140: 161, 141: 162, 142: 163, 143: 164, 144: 165, 145: 166, 146: 167, 147: 168, 148: 169, 149: 170, 150: 171, 151: 172, 152: 173, 153: 175, 154: 176, 155: 177, 156: 178, 157: 179, 158: 180, 159: 181, 160: 182, 161: 183, 162: 184, 163: 185, 164: 186, 165: 187, 166: 188, 167: 189, 168: 190, 169: 191, 170: 192, 171: 193, 172: 194, 173: 195, 174: 196, 175: 197, 176: 198, 177: 199, 178: 200, 179: 201, 180: 202, 181: 203, 182: 204, 183: 205, 184: 206, 185: 207, 186: 208, 187: 209, 188: 210, 189: 211, 190: 212, 191: 213, 192: 214, 193: 215, 194: 216, 195: 217, 196: 218, 197: 220, 198: 221, 199: 222, 200: 223, 201: 224, 202: 225, 203: 227, 204: 228, 205: 229, 206: 230, 207: 231, 208: 232, 209: 234, 210: 235, 211: 247, 212: 248, 213: 249, 214: 250, 215: 251, 216: 252, 217: 253, 218: 254, 219: 255, 220: 256, 221: 257, 222: 258, 223: 259, 224: 260, 225: 261, 226: 263, 227: 264, 228: 266, 229: 267, 230: 268, 231: 269, 232: 270, 233: 271, 234: 272, 235: 273, 236: 274, 237: 275, 238: 276, 239: 277, 240: 278, 241: 279, 242: 280, 243: 282, 244: 283, 245: 284, 246: 285, 247: 286, 248: 287, 249: 288, 250: 289, 251: 290, 252: 291, 253: 292, 254: 293, 255: 294, 256: 295, 257: 296, 258: 298, 259: 299, 260: 300, 261: 301, 262: 302, 263: 303, 264: 304, 265: 305, 266: 306, 267: 307, 268: 308, 269: 309, 270: 310, 271: 311, 272: 312, 273: 313, 274: 314, 275: 315, 276: 316, 277: 317, 278: 318, 279: 319, 280: 320, 281: 321, 282: 322, 283: 323, 284: 324, 285: 325, 286: 326, 287: 327, 288: 328, 289: 329, 290: 330, 291: 331, 292: 332, 293: 333, 294: 334, 295: 335, 296: 336, 297: 337, 298: 338, 299: 339, 300: 340, 301: 341, 302: 343, 303: 344, 304: 345, 305: 346, 306: 347, 307: 348, 308: 350, 309: 351, 310: 352, 311: 353, 312: 354, 313: 355, 314: 357, 315: 358, 316: 370, 317: 371, 318: 372, 319: 373, 320: 374, 321: 375, 322: 377, 323: 378, 324: 379, 325: 380, 326: 381, 327: 382, 328: 383, 329: 384, 330: 385, 331: 386, 332: 387, 333: 388, 334: 389, 335: 390, 336: 391, 337: 393, 338: 394, 339: 395, 340: 396, 341: 397, 342: 398, 343: 399, 344: 400, 345: 401, 346: 402, 347: 403, 348: 404, 349: 405, 350: 406, 351: 407, 352: 409, 353: 410, 354: 411, 355: 412, 356: 413, 357: 414, 358: 415, 359: 416, 360: 417, 361: 418, 362: 419, 363: 420, 364: 421, 365: 422, 366: 423, 367: 425, 368: 426, 369: 427, 370: 428, 371: 429, 372: 430, 373: 431, 374: 432, 375: 433, 376: 434, 377: 435, 378: 437, 379: 438, 380: 440, 381: 441, 382: 447, 383: 448, 384: 449, 385: 450, 386: 451, 387: 452, 388: 453, 389: 454, 390: 455, 391: 457, 392: 458, 393: 459, 394: 460, 395: 461, 396: 462, 397: 463, 398: 464, 399: 465, 400: 467, 401: 468, 402: 469, 403: 470, 404: 471, 405: 472, 406: 473, 407: 474, 408: 475, 409: 477, 410: 478, 411: 479, 412: 480, 413: 481, 414: 482, 415: 484, 416: 485, 417: 486, 418: 487, 419: 488, 420: 489, 421: 493, 422: 494, 423: 495, 424: 496, 425: 497, 426: 498, 427: 500, 428: 501, 429: 502, 430: 503, 431: 504, 432: 505, 433: 506, 434: 507, 435: 508, 436: 509, 437: 510, 438: 511, 439: 512, 440: 513, 441: 514, 442: 516, 443: 517, 444: 518, 445: 519, 446: 520, 447: 521, 448: 522, 449: 523, 450: 524, 451: 525, 452: 526, 453: 527, 454: 528, 455: 529, 456: 530, 457: 532, 458: 533, 459: 534, 460: 535, 461: 536, 462: 537, 463: 538, 464: 539, 465: 540, 466: 541, 467: 542, 468: 543, 469: 544, 470: 545, 471: 546, 472: 548, 473: 549, 474: 550, 475: 551, 476: 552, 477: 553, 478: 554, 479: 555, 480: 556, 481: 557, 482: 558, 483: 560, 484: 561, 485: 563, 486: 564, 487: 570, 488: 571, 489: 572, 490: 573, 491: 574, 492: 575, 493: 576, 494: 577, 495: 578, 496: 580, 497: 581, 498: 582, 499: 583, 500: 584, 501: 585, 502: 586, 503: 587, 504: 588, 505: 590, 506: 591, 507: 592, 508: 593, 509: 594, 510: 595, 511: 596, 512: 597, 513: 598, 514: 600, 515: 601, 516: 602, 517: 603, 518: 604, 519: 605, 520: 607, 521: 608, 522: 609, 523: 610, 524: 611, 525: 612, 526: 616, 527: 617, 528: 618, 529: 619, 530: 620, 531: 621, 532: 623, 533: 624, 534: 625, 535: 626, 536: 627, 537: 628, 538: 629, 539: 630, 540: 631, 541: 632, 542: 633, 543: 634, 544: 635, 545: 636, 546: 637, 547: 639, 548: 640, 549: 641, 550: 642, 551: 643, 552: 644, 553: 645, 554: 646, 555: 647, 556: 648, 557: 649, 558: 650, 559: 651, 560: 652, 561: 653, 562: 655, 563: 656, 564: 657, 565: 658, 566: 659, 567: 660, 568: 661, 569: 662, 570: 663, 571: 664, 572: 665, 573: 666, 574: 667, 575: 668, 576: 669, 577: 671, 578: 672, 579: 673, 580: 674, 581: 675, 582: 676, 583: 677, 584: 678, 585: 679, 586: 680, 587: 681, 588: 683, 589: 684, 590: 686, 591: 687, 592: 693, 593: 694, 594: 695, 595: 696, 596: 697, 597: 698, 598: 699, 599: 700, 600: 701, 601: 703, 602: 704, 603: 705, 604: 706, 605: 707, 606: 708, 607: 709, 608: 710, 609: 711, 610: 713, 611: 714, 612: 715, 613: 716, 614: 717, 615: 718, 616: 719, 617: 720, 618: 721, 619: 723, 620: 724, 621: 725, 622: 726, 623: 727, 624: 728, 625: 730, 626: 731, 627: 732, 628: 733, 629: 734, 630: 735, 631: 739, 632: 740, 633: 741, 634: 742, 635: 743, 636: 744, 637: 745, 638: 746, 639: 747, 640: 748, 641: 749, 642: 750, 643: 751, 644: 752, 645: 753, 646: 754, 647: 755, 648: 756, 649: 757, 650: 758, 651: 759, 652: 760, 653: 761, 654: 762, 655: 763, 656: 764, 657: 765, 658: 766, 659: 767, 660: 768, 661: 769, 662: 770, 663: 771, 664: 773, 665: 774, 666: 775, 667: 776, 668: 777, 669: 778, 670: 780, 671: 781, 672: 782, 673: 783, 674: 784, 675: 785, 676: 789, 677: 790, 678: 791, 679: 792, 680: 793, 681: 794, 682: 795, 683: 796, 684: 797, 685: 798, 686: 799, 687: 800, 688: 801, 689: 802, 690: 803, 691: 804, 692: 805, 693: 806, 694: 807, 695: 808, 696: 809, 697: 810, 698: 811, 699: 812, 700: 813, 701: 814, 702: 815, 703: 816, 704: 817, 705: 818, 706: 819, 707: 820, 708: 821, 709: 823, 710: 824, 711: 825, 712: 826, 713: 827, 714: 828, 715: 830, 716: 831, 717: 832, 718: 833, 719: 834, 720: 835, 721: 839, 722: 840, 723: 842, 724: 843, 725: 845, 726: 846, 727: 852, 728: 853, 729: 854, 730: 855, 731: 856, 732: 857, 733: 858, 734: 859, 735: 860, 736: 862, 737: 863, 738: 864, 739: 865, 740: 866, 741: 867, 742: 868, 743: 869, 744: 870, 745: 872, 746: 873, 747: 874, 748: 875, 749: 876, 750: 877, 751: 878, 752: 879, 753: 880, 754: 882, 755: 883, 756: 884, 757: 885, 758: 886, 759: 887, 760: 889, 761: 890, 762: 891, 763: 892, 764: 893, 765: 894, 766: 895, 767: 896, 768: 898, 769: 899, 770: 901, 771: 902, 772: 908, 773: 909, 774: 910, 775: 911, 776: 912, 777: 913, 778: 914, 779: 915, 780: 916, 781: 918, 782: 919, 783: 920, 784: 921, 785: 922, 786: 923, 787: 924, 788: 925, 789: 926, 790: 928, 791: 929, 792: 930, 793: 931, 794: 932, 795: 933, 796: 934, 797: 935, 798: 936, 799: 938, 800: 939, 801: 940, 802: 941, 803: 942, 804: 943, 805: 945, 806: 946, 807: 947, 808: 948, 809: 949, 810: 950, 811: 951, 812: 952, 813: 954, 814: 955, 815: 957, 816: 958, 817: 964, 818: 965, 819: 966, 820: 967, 821: 968, 822: 969, 823: 970, 824: 971, 825: 972, 826: 974, 827: 975, 828: 976, 829: 977, 830: 978, 831: 979, 832: 980, 833: 981, 834: 982, 835: 984, 836: 985, 837: 986, 838: 987, 839: 988, 840: 989, 841: 990, 842: 991, 843: 992, 844: 994, 845: 995, 846: 996, 847: 997, 848: 998, 849: 999, 850: 1001, 851: 1002, 852: 1003, 853: 1004, 854: 1005, 855: 1006, 856: 1007, 857: 1008, 858: 1010, 859: 1011, 860: 1013, 861: 1014, 862: 1019, 863: 1020, 864: 1022, 865: 1023, 866: 1025, 867: 1026, 868: 1031, 869: 1032, 870: 1034, 871: 1035, 872: 1037, 873: 1038, 874: 1046, 875: 1047, 876: 1048, 877: 1049, 878: 1050, 879: 1051, 880: 1052, 881: 1053, 882: 1054, 883: 1055, 884: 1056, 885: 1057, 886: 1058, 887: 1059, 888: 1060, 889: 1061, 890: 1062, 891: 1063, 892: 1065, 893: 1066, 894: 1067, 895: 1068, 896: 1069, 897: 1070, 898: 1071, 899: 1072, 900: 1073, 901: 1074, 902: 1075, 903: 1076, 904: 1077, 905: 1078, 906: 1079, 907: 1080, 908: 1081, 909: 1082, 910: 1084, 911: 1085, 912: 1086, 913: 1087, 914: 1088, 915: 1089, 916: 1090, 917: 1091, 918: 1092, 919: 1093, 920: 1094, 921: 1095, 922: 1096, 923: 1097, 924: 1098, 925: 1099, 926: 1100, 927: 1101, 928: 1103, 929: 1104, 930: 1105, 931: 1106, 932: 1107, 933: 1108, 934: 1110, 935: 1111, 936: 1112, 937: 1113, 938: 1114, 939: 1115, 940: 1117, 941: 1118, 942: 1119, 943: 1120, 944: 1121, 945: 1122} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 4: 3, 5: 4, 7: 5, 8: 6, 14: 7, 15: 8, 16: 9, 18: 10, 19: 11, 20: 12, 22: 13, 23: 14, 24: 15, 26: 16, 27: 17, 28: 18, 29: 19, 30: 20, 31: 21, 33: 22, 34: 23, 35: 24, 36: 25, 37: 26, 38: 27, 39: 28, 40: 29, 41: 30, 42: 31, 43: 32, 44: 33, 45: 34, 46: 35, 47: 36, 49: 37, 50: 38, 51: 39, 52: 40, 53: 41, 54: 42, 55: 43, 56: 44, 57: 45, 58: 46, 59: 47, 60: 48, 61: 49, 62: 50, 63: 51, 65: 52, 66: 53, 67: 54, 68: 55, 69: 56, 70: 57, 71: 58, 72: 59, 73: 60, 74: 61, 75: 62, 76: 63, 77: 64, 78: 65, 79: 66, 81: 67, 82: 68, 83: 69, 84: 70, 85: 71, 86: 72, 87: 73, 88: 74, 89: 75, 91: 76, 92: 77, 93: 78, 94: 79, 95: 80, 96: 81, 97: 82, 98: 83, 99: 84, 101: 85, 102: 86, 103: 87, 104: 88, 105: 89, 106: 90, 107: 91, 108: 92, 109: 93, 110: 94, 111: 95, 112: 96, 113: 97, 114: 98, 115: 99, 116: 100, 117: 101, 118: 102, 119: 103, 120: 104, 121: 105, 124: 106, 125: 107, 126: 108, 127: 109, 128: 110, 129: 111, 130: 112, 131: 113, 132: 114, 133: 115, 134: 116, 135: 117, 136: 118, 137: 119, 138: 120, 140: 121, 141: 122, 143: 123, 144: 124, 145: 125, 146: 126, 147: 127, 148: 128, 149: 129, 150: 130, 151: 131, 152: 132, 153: 133, 154: 134, 155: 135, 156: 136, 157: 137, 159: 138, 160: 139, 161: 140, 162: 141, 163: 142, 164: 143, 165: 144, 166: 145, 167: 146, 168: 147, 169: 148, 170: 149, 171: 150, 172: 151, 173: 152, 175: 153, 176: 154, 177: 155, 178: 156, 179: 157, 180: 158, 181: 159, 182: 160, 183: 161, 184: 162, 185: 163, 186: 164, 187: 165, 188: 166, 189: 167, 190: 168, 191: 169, 192: 170, 193: 171, 194: 172, 195: 173, 196: 174, 197: 175, 198: 176, 199: 177, 200: 178, 201: 179, 202: 180, 203: 181, 204: 182, 205: 183, 206: 184, 207: 185, 208: 186, 209: 187, 210: 188, 211: 189, 212: 190, 213: 191, 214: 192, 215: 193, 216: 194, 217: 195, 218: 196, 220: 197, 221: 198, 222: 199, 223: 200, 224: 201, 225: 202, 227: 203, 228: 204, 229: 205, 230: 206, 231: 207, 232: 208, 234: 209, 235: 210, 247: 211, 248: 212, 249: 213, 250: 214, 251: 215, 252: 216, 253: 217, 254: 218, 255: 219, 256: 220, 257: 221, 258: 222, 259: 223, 260: 224, 261: 225, 263: 226, 264: 227, 266: 228, 267: 229, 268: 230, 269: 231, 270: 232, 271: 233, 272: 234, 273: 235, 274: 236, 275: 237, 276: 238, 277: 239, 278: 240, 279: 241, 280: 242, 282: 243, 283: 244, 284: 245, 285: 246, 286: 247, 287: 248, 288: 249, 289: 250, 290: 251, 291: 252, 292: 253, 293: 254, 294: 255, 295: 256, 296: 257, 298: 258, 299: 259, 300: 260, 301: 261, 302: 262, 303: 263, 304: 264, 305: 265, 306: 266, 307: 267, 308: 268, 309: 269, 310: 270, 311: 271, 312: 272, 313: 273, 314: 274, 315: 275, 316: 276, 317: 277, 318: 278, 319: 279, 320: 280, 321: 281, 322: 282, 323: 283, 324: 284, 325: 285, 326: 286, 327: 287, 328: 288, 329: 289, 330: 290, 331: 291, 332: 292, 333: 293, 334: 294, 335: 295, 336: 296, 337: 297, 338: 298, 339: 299, 340: 300, 341: 301, 343: 302, 344: 303, 345: 304, 346: 305, 347: 306, 348: 307, 350: 308, 351: 309, 352: 310, 353: 311, 354: 312, 355: 313, 357: 314, 358: 315, 370: 316, 371: 317, 372: 318, 373: 319, 374: 320, 375: 321, 377: 322, 378: 323, 379: 324, 380: 325, 381: 326, 382: 327, 383: 328, 384: 329, 385: 330, 386: 331, 387: 332, 388: 333, 389: 334, 390: 335, 391: 336, 393: 337, 394: 338, 395: 339, 396: 340, 397: 341, 398: 342, 399: 343, 400: 344, 401: 345, 402: 346, 403: 347, 404: 348, 405: 349, 406: 350, 407: 351, 409: 352, 410: 353, 411: 354, 412: 355, 413: 356, 414: 357, 415: 358, 416: 359, 417: 360, 418: 361, 419: 362, 420: 363, 421: 364, 422: 365, 423: 366, 425: 367, 426: 368, 427: 369, 428: 370, 429: 371, 430: 372, 431: 373, 432: 374, 433: 375, 434: 376, 435: 377, 437: 378, 438: 379, 440: 380, 441: 381, 447: 382, 448: 383, 449: 384, 450: 385, 451: 386, 452: 387, 453: 388, 454: 389, 455: 390, 457: 391, 458: 392, 459: 393, 460: 394, 461: 395, 462: 396, 463: 397, 464: 398, 465: 399, 467: 400, 468: 401, 469: 402, 470: 403, 471: 404, 472: 405, 473: 406, 474: 407, 475: 408, 477: 409, 478: 410, 479: 411, 480: 412, 481: 413, 482: 414, 484: 415, 485: 416, 486: 417, 487: 418, 488: 419, 489: 420, 493: 421, 494: 422, 495: 423, 496: 424, 497: 425, 498: 426, 500: 427, 501: 428, 502: 429, 503: 430, 504: 431, 505: 432, 506: 433, 507: 434, 508: 435, 509: 436, 510: 437, 511: 438, 512: 439, 513: 440, 514: 441, 516: 442, 517: 443, 518: 444, 519: 445, 520: 446, 521: 447, 522: 448, 523: 449, 524: 450, 525: 451, 526: 452, 527: 453, 528: 454, 529: 455, 530: 456, 532: 457, 533: 458, 534: 459, 535: 460, 536: 461, 537: 462, 538: 463, 539: 464, 540: 465, 541: 466, 542: 467, 543: 468, 544: 469, 545: 470, 546: 471, 548: 472, 549: 473, 550: 474, 551: 475, 552: 476, 553: 477, 554: 478, 555: 479, 556: 480, 557: 481, 558: 482, 560: 483, 561: 484, 563: 485, 564: 486, 570: 487, 571: 488, 572: 489, 573: 490, 574: 491, 575: 492, 576: 493, 577: 494, 578: 495, 580: 496, 581: 497, 582: 498, 583: 499, 584: 500, 585: 501, 586: 502, 587: 503, 588: 504, 590: 505, 591: 506, 592: 507, 593: 508, 594: 509, 595: 510, 596: 511, 597: 512, 598: 513, 600: 514, 601: 515, 602: 516, 603: 517, 604: 518, 605: 519, 607: 520, 608: 521, 609: 522, 610: 523, 611: 524, 612: 525, 616: 526, 617: 527, 618: 528, 619: 529, 620: 530, 621: 531, 623: 532, 624: 533, 625: 534, 626: 535, 627: 536, 628: 537, 629: 538, 630: 539, 631: 540, 632: 541, 633: 542, 634: 543, 635: 544, 636: 545, 637: 546, 639: 547, 640: 548, 641: 549, 642: 550, 643: 551, 644: 552, 645: 553, 646: 554, 647: 555, 648: 556, 649: 557, 650: 558, 651: 559, 652: 560, 653: 561, 655: 562, 656: 563, 657: 564, 658: 565, 659: 566, 660: 567, 661: 568, 662: 569, 663: 570, 664: 571, 665: 572, 666: 573, 667: 574, 668: 575, 669: 576, 671: 577, 672: 578, 673: 579, 674: 580, 675: 581, 676: 582, 677: 583, 678: 584, 679: 585, 680: 586, 681: 587, 683: 588, 684: 589, 686: 590, 687: 591, 693: 592, 694: 593, 695: 594, 696: 595, 697: 596, 698: 597, 699: 598, 700: 599, 701: 600, 703: 601, 704: 602, 705: 603, 706: 604, 707: 605, 708: 606, 709: 607, 710: 608, 711: 609, 713: 610, 714: 611, 715: 612, 716: 613, 717: 614, 718: 615, 719: 616, 720: 617, 721: 618, 723: 619, 724: 620, 725: 621, 726: 622, 727: 623, 728: 624, 730: 625, 731: 626, 732: 627, 733: 628, 734: 629, 735: 630, 739: 631, 740: 632, 741: 633, 742: 634, 743: 635, 744: 636, 745: 637, 746: 638, 747: 639, 748: 640, 749: 641, 750: 642, 751: 643, 752: 644, 753: 645, 754: 646, 755: 647, 756: 648, 757: 649, 758: 650, 759: 651, 760: 652, 761: 653, 762: 654, 763: 655, 764: 656, 765: 657, 766: 658, 767: 659, 768: 660, 769: 661, 770: 662, 771: 663, 773: 664, 774: 665, 775: 666, 776: 667, 777: 668, 778: 669, 780: 670, 781: 671, 782: 672, 783: 673, 784: 674, 785: 675, 789: 676, 790: 677, 791: 678, 792: 679, 793: 680, 794: 681, 795: 682, 796: 683, 797: 684, 798: 685, 799: 686, 800: 687, 801: 688, 802: 689, 803: 690, 804: 691, 805: 692, 806: 693, 807: 694, 808: 695, 809: 696, 810: 697, 811: 698, 812: 699, 813: 700, 814: 701, 815: 702, 816: 703, 817: 704, 818: 705, 819: 706, 820: 707, 821: 708, 823: 709, 824: 710, 825: 711, 826: 712, 827: 713, 828: 714, 830: 715, 831: 716, 832: 717, 833: 718, 834: 719, 835: 720, 839: 721, 840: 722, 842: 723, 843: 724, 845: 725, 846: 726, 852: 727, 853: 728, 854: 729, 855: 730, 856: 731, 857: 732, 858: 733, 859: 734, 860: 735, 862: 736, 863: 737, 864: 738, 865: 739, 866: 740, 867: 741, 868: 742, 869: 743, 870: 744, 872: 745, 873: 746, 874: 747, 875: 748, 876: 749, 877: 750, 878: 751, 879: 752, 880: 753, 882: 754, 883: 755, 884: 756, 885: 757, 886: 758, 887: 759, 889: 760, 890: 761, 891: 762, 892: 763, 893: 764, 894: 765, 895: 766, 896: 767, 898: 768, 899: 769, 901: 770, 902: 771, 908: 772, 909: 773, 910: 774, 911: 775, 912: 776, 913: 777, 914: 778, 915: 779, 916: 780, 918: 781, 919: 782, 920: 783, 921: 784, 922: 785, 923: 786, 924: 787, 925: 788, 926: 789, 928: 790, 929: 791, 930: 792, 931: 793, 932: 794, 933: 795, 934: 796, 935: 797, 936: 798, 938: 799, 939: 800, 940: 801, 941: 802, 942: 803, 943: 804, 945: 805, 946: 806, 947: 807, 948: 808, 949: 809, 950: 810, 951: 811, 952: 812, 954: 813, 955: 814, 957: 815, 958: 816, 964: 817, 965: 818, 966: 819, 967: 820, 968: 821, 969: 822, 970: 823, 971: 824, 972: 825, 974: 826, 975: 827, 976: 828, 977: 829, 978: 830, 979: 831, 980: 832, 981: 833, 982: 834, 984: 835, 985: 836, 986: 837, 987: 838, 988: 839, 989: 840, 990: 841, 991: 842, 992: 843, 994: 844, 995: 845, 996: 846, 997: 847, 998: 848, 999: 849, 1001: 850, 1002: 851, 1003: 852, 1004: 853, 1005: 854, 1006: 855, 1007: 856, 1008: 857, 1010: 858, 1011: 859, 1013: 860, 1014: 861, 1019: 862, 1020: 863, 1022: 864, 1023: 865, 1025: 866, 1026: 867, 1031: 868, 1032: 869, 1034: 870, 1035: 871, 1037: 872, 1038: 873, 1046: 874, 1047: 875, 1048: 876, 1049: 877, 1050: 878, 1051: 879, 1052: 880, 1053: 881, 1054: 882, 1055: 883, 1056: 884, 1057: 885, 1058: 886, 1059: 887, 1060: 888, 1061: 889, 1062: 890, 1063: 891, 1065: 892, 1066: 893, 1067: 894, 1068: 895, 1069: 896, 1070: 897, 1071: 898, 1072: 899, 1073: 900, 1074: 901, 1075: 902, 1076: 903, 1077: 904, 1078: 905, 1079: 906, 1080: 907, 1081: 908, 1082: 909, 1084: 910, 1085: 911, 1086: 912, 1087: 913, 1088: 914, 1089: 915, 1090: 916, 1091: 917, 1092: 918, 1093: 919, 1094: 920, 1095: 921, 1096: 922, 1097: 923, 1098: 924, 1099: 925, 1100: 926, 1101: 927, 1103: 928, 1104: 929, 1105: 930, 1106: 931, 1107: 932, 1108: 933, 1110: 934, 1111: 935, 1112: 936, 1113: 937, 1114: 938, 1115: 939, 1117: 940, 1118: 941, 1119: 942, 1120: 943, 1121: 944, 1122: 945} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (1240 diagrams) in 4.922 s -Wrote files for 2281 helas calls in 12.874 s +Generated helas calls for 1 subprocesses (1240 diagrams) in 2.353 s +Wrote files for 2281 helas calls in 5.643 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.262 s +ALOHA: aloha creates 5 routines in 0.108 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.209 s +ALOHA: aloha creates 10 routines in 0.083 s VVV1 VVV1 FFV1 @@ -209,32 +204,32 @@ ALOHA: aloha creates 10 routines in 0.209 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/README Run "open index.html" to see more information about this process. quit -real 0m24.502s -user 0m23.817s -sys 0m0.560s -Code generation completed in 25 seconds +real 0m11.306s +user 0m11.067s +sys 0m0.189s +Code generation completed in 12 seconds ************************************************************ * * * W E L C O M E to * @@ -247,7 +242,7 @@ Code generation completed in 25 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -255,11 +250,12 @@ Code generation completed in 25 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -276,7 +272,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -284,11 +280,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat index 334c1a5eed..e036ef501d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt b/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts b/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/makefile b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/MODEL/makefile b/epochX/cudacpp/gg_ttggg.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/dsample.f b/epochX/cudacpp/gg_ttggg.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/dsample.f +++ b/epochX/cudacpp/gg_ttggg.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/setrun.f b/epochX/cudacpp/gg_ttggg.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/setrun.f +++ b/epochX/cudacpp/gg_ttggg.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc index 85e7f8f09c..f69100c6ee 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h index 201a432a8a..2434771406 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f index f6423572b9..c19906383f 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f index 8ea4803639..bf73f35dab 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f index 7e5b2ef035..84bfceca5f 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -405,7 +405,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_runs.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h index 928367303f..8edd09b089 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt b/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt index 1e5ae77627..5d86e73d8a 100644 --- a/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt +++ b/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +52,7 @@ generate g g > t t~ g g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.00429987907409668  +DEBUG: model prefixing takes 0.0013489723205566406  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -150,13 +145,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=5: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Process has 1240 diagrams -1 processes with 1240 diagrams generated in 1.542 s +1 processes with 1240 diagrams generated in 0.693 s Total: 1 processes with 1240 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_ttggg Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Processing color information for process: g g > t t~ g g g @1 @@ -165,18 +160,18 @@ INFO: Processing color information for process: g g > t t~ g g g @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/. -Generated helas calls for 1 subprocesses (1240 diagrams) in 5.109 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/. +Generated helas calls for 1 subprocesses (1240 diagrams) in 2.320 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.251 s +ALOHA: aloha creates 5 routines in 0.100 s VVV1 VVV1 FFV1 @@ -189,17 +184,17 @@ ALOHA: aloha creates 5 routines in 0.251 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. quit -real 0m9.777s -user 0m9.652s -sys 0m0.091s -Code generation completed in 10 seconds +real 0m4.398s +user 0m4.341s +sys 0m0.041s +Code generation completed in 4 seconds diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc index 2f17add993..7702238989 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h index 201a432a8a..2434771406 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h index 928367303f..8edd09b089 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt b/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt index 9da6d23305..fde1a01a59 100644 --- a/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt +++ b/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -56,7 +51,7 @@ set zerowidth_tchannel F define q = u c d s u~ c~ d~ s~ INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0045053958892822266  +DEBUG: model prefixing takes 0.0013422966003417969  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -165,21 +160,21 @@ INFO: Crossed process found for g u~ > t t~ u~, reuse diagrams. INFO: Crossed process found for g c~ > t t~ c~, reuse diagrams. INFO: Crossed process found for g d~ > t t~ d~, reuse diagrams. INFO: Crossed process found for g s~ > t t~ s~, reuse diagrams. -8 processes with 40 diagrams generated in 0.064 s +8 processes with 40 diagrams generated in 0.029 s Total: 8 processes with 40 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gq_ttq --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_gq_ttq INFO: remove old information in CODEGEN_mad_gq_ttq DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g u > t t~ u WEIGHTED<=3 @1 INFO: Processing color information for process: g u > t t~ u @1 @@ -213,47 +208,47 @@ INFO: Finding symmetric diagrams for subprocess group gux_ttxux DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1577]  -Generated helas calls for 2 subprocesses (10 diagrams) in 0.025 s -Wrote files for 32 helas calls in 0.130 s +Generated helas calls for 2 subprocesses (10 diagrams) in 0.011 s +Wrote files for 32 helas calls in 0.058 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVV1 routines -ALOHA: aloha creates 2 routines in 0.129 s +ALOHA: aloha creates 2 routines in 0.042 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVV1 routines -ALOHA: aloha creates 4 routines in 0.113 s +ALOHA: aloha creates 4 routines in 0.036 s FFV1 FFV1 FFV1 FFV1 VVV1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/README Run "open index.html" to see more information about this process. quit -real 0m2.433s -user 0m1.873s -sys 0m0.483s -Code generation completed in 2 seconds +real 0m1.038s +user 0m0.839s +sys 0m0.178s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -266,7 +261,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -274,11 +269,12 @@ Code generation completed in 2 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -295,7 +291,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -303,11 +299,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat index 690bc4cee3..1d8ed53f7c 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt b/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/Source/.make_opts b/epochX/cudacpp/gq_ttq.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/.make_opts +++ b/epochX/cudacpp/gq_ttq.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/makefile b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gq_ttq.mad/Source/MODEL/makefile b/epochX/cudacpp/gq_ttq.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/gq_ttq.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/gq_ttq.mad/Source/dsample.f b/epochX/cudacpp/gq_ttq.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/dsample.f +++ b/epochX/cudacpp/gq_ttq.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/gq_ttq.mad/Source/make_opts b/epochX/cudacpp/gq_ttq.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/make_opts +++ b/epochX/cudacpp/gq_ttq.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/gq_ttq.mad/Source/setrun.f b/epochX/cudacpp/gq_ttq.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/setrun.f +++ b/epochX/cudacpp/gq_ttq.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc index 7d4745918b..564ade2968 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h index bd42537623..a1341e6f07 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f index eb529d7fa1..916595cb2c 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f index 32cde06ca3..a93cb9fd64 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -490,52 +490,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f index aaabfc3894..856e5d93df 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -327,7 +327,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc index 414284b61a..2237dcfed3 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h index dd4aae8a06..23ec192192 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f index cb7c1a28ac..2fa22e09db 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f index f5b70c35a5..84a0fb25e9 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -490,52 +490,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f index 7c9b27572c..04f08387b8 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -327,7 +327,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_runs.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h b/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h index ccd4511df5..ce938dca1a 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc index a21fd9c50a..907b4259dc 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h index 070387d889..fd839a0e75 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt b/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt index b398650d7c..fb6e35fe34 100644 --- a/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt +++ b/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -56,7 +51,7 @@ set zerowidth_tchannel F define q = u c d s u~ c~ d~ s~ INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.005805015563964844  +DEBUG: model prefixing takes 0.0013251304626464844  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -165,13 +160,13 @@ INFO: Crossed process found for g u~ > t t~ u~, reuse diagrams. INFO: Crossed process found for g c~ > t t~ c~, reuse diagrams. INFO: Crossed process found for g d~ > t t~ d~, reuse diagrams. INFO: Crossed process found for g s~ > t t~ s~, reuse diagrams. -8 processes with 40 diagrams generated in 0.120 s +8 processes with 40 diagrams generated in 0.029 s Total: 8 processes with 40 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gq_ttq Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g u > t t~ u WEIGHTED<=3 @1 INFO: Processing color information for process: g u > t t~ u @1 @@ -188,40 +183,40 @@ INFO: Combined process g s~ > t t~ s~ WEIGHTED<=3 @1 with process g u~ > t t~ u~ DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/. +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/. DEBUG: Entering PLUGIN_ProcessExporter.generate_subprocess_directory (create the directory) [output.py at line 222]  DEBUG: type(subproc_group)= [output.py at line 223]  DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=1 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/. -Generated helas calls for 2 subprocesses (10 diagrams) in 0.036 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/. +Generated helas calls for 2 subprocesses (10 diagrams) in 0.011 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVV1 routines -ALOHA: aloha creates 2 routines in 0.107 s +ALOHA: aloha creates 2 routines in 0.041 s FFV1 FFV1 FFV1 FFV1 VVV1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. quit -real 0m0.735s -user 0m0.649s -sys 0m0.076s -Code generation completed in 1 seconds +real 0m0.263s +user 0m0.233s +sys 0m0.024s +Code generation completed in 0 seconds diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc index e57428e73e..64babc58b7 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h index bd42537623..a1341e6f07 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc index 57dd4fee2d..2b42523d28 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h index dd4aae8a06..23ec192192 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h b/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h index ccd4511df5..ce938dca1a 100644 --- a/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc index a21fd9c50a..907b4259dc 100644 --- a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h index 070387d889..fd839a0e75 100644 --- a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt b/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt index 0f8d6ccdac..8fdcde26e6 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,14 +42,15 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model heft INFO: Restrict model heft with file models/heft/restrict_default.dat . DEBUG: Simplifying conditional expressions  @@ -122,21 +117,21 @@ Defined multiparticle all = g u c d s u~ c~ d~ s~ a ve vm vt e- mu- ve~ vm~ vt~ generate g g > b b~ HIW<=1 INFO: Trying process: g g > b b~ HIG<=1 HIW<=1 @1 INFO: Process has 4 diagrams -1 processes with 4 diagrams generated in 0.008 s +1 processes with 4 diagrams generated in 0.002 s Total: 1 processes with 4 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_heft_gg_bb --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_heft_gg_bb INFO: remove old information in CODEGEN_mad_heft_gg_bb DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > b b~ HIG<=1 HIW<=1 @1 INFO: Processing color information for process: g g > b b~ HIG<=1 HIW<=1 @1 @@ -151,52 +146,52 @@ INFO: Finding symmetric diagrams for subprocess group gg_bbx DEBUG: len(subproc_diagrams_for_config) =  4 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (4 diagrams) in 0.010 s -Wrote files for 12 helas calls in 0.076 s +Generated helas calls for 1 subprocesses (4 diagrams) in 0.003 s +Wrote files for 12 helas calls in 0.028 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVS3 routines ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFS2 routines -ALOHA: aloha creates 4 routines in 0.236 s +ALOHA: aloha creates 4 routines in 0.072 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVS3 routines ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFS2 routines -ALOHA: aloha creates 8 routines in 0.188 s +ALOHA: aloha creates 8 routines in 0.068 s VVS3 VVV1 FFV1 FFV1 FFV1 FFS2 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./HelAmps_heft.h -INFO: Created file HelAmps_heft.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./HelAmps_heft.h +INFO: Created file HelAmps_heft.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.cc INFO: Created files Parameters_heft.h and Parameters_heft.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/README Run "open index.html" to see more information about this process. quit -real 0m2.310s -user 0m1.838s -sys 0m0.466s -Code generation completed in 2 seconds +real 0m0.965s +user 0m0.806s +sys 0m0.143s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -209,7 +204,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -217,11 +212,12 @@ Code generation completed in 2 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -238,7 +234,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -246,11 +242,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt b/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat index 99f6be5921..cd329e137c 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt b/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts b/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/makefile b/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/MODEL/makefile b/epochX/cudacpp/heft_gg_bb.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/dsample.f b/epochX/cudacpp/heft_gg_bb.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/dsample.f +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts b/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/setrun.f b/epochX/cudacpp/heft_gg_bb.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/setrun.f +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc index fbb0c2effb..b1fe1a2faa 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h index a4c60bf837..c74a0d6227 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f index e28a98c1a4..4c2e50bc58 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f index 3f70dcf90e..128283c400 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f index 487b800683..d684aa2764 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -293,7 +293,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_runs.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/misc.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/misc.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h b/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h index dee4fc600a..99bdbe939a 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h +++ b/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc index 14d78b1487..c57db8b11d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc +++ b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h index 4ff742e117..889d6a6745 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h +++ b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt b/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt index f43bb36f78..55d785e8e7 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt +++ b/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,26 +42,27 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model heft -INFO: download model from http://madgraph.phys.ucl.ac.be/Downloads/models/heft.tgz to the following directory: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/models  ---2025-12-16 13:00:09-- http://madgraph.phys.ucl.ac.be/Downloads/models/heft.tgz +INFO: download model from http://madgraph.phys.ucl.ac.be/Downloads/models/heft.tgz to the following directory: /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/models  +--2026-02-20 11:49:16-- http://madgraph.phys.ucl.ac.be/Downloads/models/heft.tgz Resolving madgraph.phys.ucl.ac.be (madgraph.phys.ucl.ac.be)... 130.104.2.143 Connecting to madgraph.phys.ucl.ac.be (madgraph.phys.ucl.ac.be)|130.104.2.143|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 50876 (50K) [application/x-gzip] Saving to: ‘tmp.tgz’ - 0K .......... .......... .......... .......... ......... 100% 1004K=0.05s + 0K .......... .......... .......... .......... ......... 100% 836K=0.06s -2025-12-16 13:00:09 (1004 KB/s) - ‘tmp.tgz’ saved [50876/50876] +2026-02-20 11:49:16 (836 KB/s) - ‘tmp.tgz’ saved [50876/50876] heft/ heft/write_param_card.py @@ -104,7 +99,7 @@ INFO: load particles INFO: load vertices WARNING: coupling GC_13=-(complex(0,1)*GH) has direct dependence in aS but has QCD order set to 0. Automatic computation of scale uncertainty can be wrong for such model.  WARNING: coupling GC_16=(complex(0,1)*Gphi)/8. has direct dependence in aS but has QCD order set to 0. Automatic computation of scale uncertainty can be wrong for such model.  -DEBUG: model prefixing takes 0.00528264045715332  +DEBUG: model prefixing takes 0.0013971328735351562  INFO: Restrict model heft with file models/heft/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: s u w+ at order: QED=1  @@ -170,13 +165,13 @@ Defined multiparticle all = g u c d s u~ c~ d~ s~ a ve vm vt e- mu- ve~ vm~ vt~ generate g g > b b~ HIW<=1 INFO: Trying process: g g > b b~ HIG<=1 HIW<=1 @1 INFO: Process has 4 diagrams -1 processes with 4 diagrams generated in 0.004 s +1 processes with 4 diagrams generated in 0.002 s Total: 1 processes with 4 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_heft_gg_bb Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > b b~ HIG<=1 HIW<=1 @1 INFO: Processing color information for process: g g > b b~ HIG<=1 HIW<=1 @1 @@ -185,34 +180,34 @@ INFO: Processing color information for process: g g > b b~ HIG<=1 HIW<=1 @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/. -Generated helas calls for 1 subprocesses (4 diagrams) in 0.011 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/. +Generated helas calls for 1 subprocesses (4 diagrams) in 0.003 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVS3 routines ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFS2 routines -ALOHA: aloha creates 4 routines in 0.194 s +ALOHA: aloha creates 4 routines in 0.071 s VVS3 VVV1 FFV1 FFV1 FFV1 FFS2 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./HelAmps_heft.h -INFO: Created file HelAmps_heft.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./HelAmps_heft.h +INFO: Created file HelAmps_heft.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.cc INFO: Created files Parameters_heft.h and Parameters_heft.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. quit -real 0m0.954s -user 0m0.580s -sys 0m0.086s -Code generation completed in 1 seconds +real 0m0.459s +user 0m0.230s +sys 0m0.040s +Code generation completed in 0 seconds diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc index 8fc4cf7184..911be3db43 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h index a4c60bf837..c74a0d6227 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h b/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h index dee4fc600a..99bdbe939a 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h +++ b/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc index 14d78b1487..c57db8b11d 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc +++ b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h index 4ff742e117..889d6a6745 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h +++ b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt b/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt index 83a1df7716..e5a0fd5a3d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -56,7 +51,7 @@ set zerowidth_tchannel F import model sm-no_b_mass INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004899024963378906  +DEBUG: model prefixing takes 0.0013360977172851562  INFO: Restrict model sm-no_b_mass with file models/sm/restrict_no_b_mass.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -180,7 +175,7 @@ INFO: Process u~ d > t t~ w- added to mirror process d u~ > t t~ w- INFO: Process c~ s > t t~ w- added to mirror process s c~ > t t~ w- INFO: Process d~ u > t t~ w+ added to mirror process u d~ > t t~ w+ INFO: Process s~ c > t t~ w+ added to mirror process c s~ > t t~ w+ -4 processes with 8 diagrams generated in 0.109 s +4 processes with 8 diagrams generated in 0.041 s Total: 4 processes with 8 diagrams add process p p > t t~ w j @1 INFO: Checking for minimal orders which gives processes. @@ -222,21 +217,21 @@ INFO: Process d~ g > t t~ w+ u~ added to mirror process g d~ > t t~ w+ u~ INFO: Process d~ u > t t~ w+ g added to mirror process u d~ > t t~ w+ g INFO: Process s~ g > t t~ w+ c~ added to mirror process g s~ > t t~ w+ c~ INFO: Process s~ c > t t~ w+ g added to mirror process c s~ > t t~ w+ g -12 processes with 144 diagrams generated in 0.601 s +12 processes with 144 diagrams generated in 0.241 s Total: 16 processes with 152 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_nobm_pp_ttW --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_nobm_pp_ttW INFO: remove old information in CODEGEN_mad_nobm_pp_ttW DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g u > t t~ w+ d WEIGHTED<=5 @1 INFO: Processing color information for process: g u > t t~ w+ d @1 @@ -350,18 +345,18 @@ INFO: Finding symmetric diagrams for subprocess group dux_ttxwm DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1577]  -Generated helas calls for 8 subprocesses (76 diagrams) in 0.158 s -Wrote files for 212 helas calls in 0.750 s +Generated helas calls for 8 subprocesses (76 diagrams) in 0.069 s +Wrote files for 212 helas calls in 0.284 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates VVV1 set of routines with options: P0 -ALOHA: aloha creates 3 routines in 0.192 s +ALOHA: aloha creates 3 routines in 0.055 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates VVV1 set of routines with options: P0 -ALOHA: aloha creates 6 routines in 0.184 s +ALOHA: aloha creates 6 routines in 0.054 s FFV1 FFV1 FFV1 @@ -369,32 +364,32 @@ ALOHA: aloha creates 6 routines in 0.184 s FFV2 FFV2 VVV1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./HelAmps_sm_no_b_mass.h -INFO: Created file HelAmps_sm_no_b_mass.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./HelAmps_sm_no_b_mass.h +INFO: Created file HelAmps_sm_no_b_mass.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.cc INFO: Created files Parameters_sm_no_b_mass.h and Parameters_sm_no_b_mass.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/README Run "open index.html" to see more information about this process. quit -real 0m5.187s -user 0m4.362s -sys 0m0.787s -Code generation completed in 6 seconds +real 0m2.032s +user 0m1.730s +sys 0m0.270s +Code generation completed in 2 seconds ************************************************************ * * * W E L C O M E to * @@ -407,7 +402,7 @@ Code generation completed in 6 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -415,11 +410,12 @@ Code generation completed in 6 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -436,7 +432,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -444,11 +440,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat index 4486cc89b1..65da675ed7 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt b/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts b/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/makefile b/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/MODEL/makefile b/epochX/cudacpp/nobm_pp_ttW.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/dsample.f b/epochX/cudacpp/nobm_pp_ttW.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/dsample.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts b/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/setrun.f b/epochX/cudacpp/nobm_pp_ttW.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/setrun.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc index 0893180611..e52892757c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h index b9c21cb625..24d7d59c93 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f index fa7e013333..fb4764a1ca 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f index 08e008a6d4..31a944b083 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -463,52 +463,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f index 82c4a237a2..efd355a8c8 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -341,7 +341,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc index 2a56cf5ec4..745ff14527 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h index 43024d30fd..24ed8aaf21 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f index 396cf48b95..8db1348179 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f index 32d6e7fbe9..41aea46851 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -463,52 +463,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f index 7c85ebc269..e38497df9b 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -341,7 +341,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc index 6e87d2186e..260dcffd48 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h index b168a7dacf..2ec5da34bc 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f index cf61858b1e..41f05526e3 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f index 6e230763bb..ebd828abae 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -463,52 +463,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f index bc20c39bda..e0aff8bbd0 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -389,7 +389,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc index 563e3c6ead..78d0a40912 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h index daa474c26a..bdafe18fe6 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f index c46e576c70..0ad73edba7 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f index ddb3aea86b..9f16e31f74 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -460,52 +460,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f index 2baaf471a4..c98dbf7dca 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -389,7 +389,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc index d6a510d40d..0b8a3c87fd 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h index d4d5408ad2..7196d7ff53 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f index 25f1c8087c..fba0bd534c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f index 4ffe9d5a96..299b84c0c3 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -460,52 +460,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f index c948df55ab..0eb7e97d95 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -389,7 +389,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc index 75dc9427fe..d3aafc247f 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h index 6aaf443f35..23385b86ee 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f index cb7e238ace..e5d24be4bd 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f index 872090ef36..32689ab069 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -460,52 +460,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f index 41b6ccd05d..826d435d27 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -389,7 +389,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc index 27c3656e02..53d6e1b076 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h index a4f9928134..84b2bcb225 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f index 02fd76e9ef..c44eca0f8b 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f index 11c408bea6..e611f5bc7d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -460,52 +460,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f index eeca521aea..38372ae6d2 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -389,7 +389,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc index 31f01d963a..a205743a7d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h index 7d990b3bbd..67ce9b133c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f index dfde4091f4..35f7b02d15 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1206,8 +1206,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1229,6 +1233,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f index 9194a8386b..152506e1c8 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -463,52 +463,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f index 92a30e8917..3a91802776 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -389,7 +389,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_runs.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/misc.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/misc.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h b/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h index 7cbd6b3089..f342b78c07 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc index 3456c7ee71..57d162b845 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h index 9e7e9702f9..abbe06a866 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt b/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt index 52704ad03c..5a5c75f973 100644 --- a/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt +++ b/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -56,7 +51,7 @@ set zerowidth_tchannel F define j = p INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.004682302474975586  +DEBUG: model prefixing takes 0.0013341903686523438  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -167,7 +162,7 @@ INFO: Process u~ u > t t~ added to mirror process u u~ > t t~ INFO: Process c~ c > t t~ added to mirror process c c~ > t t~ INFO: Process d~ d > t t~ added to mirror process d d~ > t t~ INFO: Process s~ s > t t~ added to mirror process s s~ > t t~ -5 processes with 7 diagrams generated in 0.027 s +5 processes with 7 diagrams generated in 0.011 s Total: 5 processes with 7 diagrams add process p p > t t~ j @1 INFO: Checking for minimal orders which gives processes. @@ -207,7 +202,7 @@ INFO: Process d~ g > t t~ d~ added to mirror process g d~ > t t~ d~ INFO: Process d~ d > t t~ g added to mirror process d d~ > t t~ g INFO: Process s~ g > t t~ s~ added to mirror process g s~ > t t~ s~ INFO: Process s~ s > t t~ g added to mirror process s s~ > t t~ g -13 processes with 76 diagrams generated in 0.111 s +13 processes with 76 diagrams generated in 0.051 s Total: 18 processes with 83 diagrams add process p p > t t~ j j @2 INFO: Checking for minimal orders which gives processes. @@ -373,21 +368,21 @@ INFO: Process s~ u~ > t t~ u~ s~ added to mirror process u~ s~ > t t~ u~ s~ INFO: Process s~ c~ > t t~ c~ s~ added to mirror process c~ s~ > t t~ c~ s~ INFO: Process s~ d~ > t t~ d~ s~ added to mirror process d~ s~ > t t~ d~ s~ INFO: Crossed process found for s~ s~ > t t~ s~ s~, reuse diagrams. -65 processes with 1119 diagrams generated in 1.506 s +65 processes with 1119 diagrams generated in 0.697 s Total: 83 processes with 1202 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_pp_tt012j --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_pp_tt012j INFO: remove old information in CODEGEN_mad_pp_tt012j DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g WEIGHTED<=4 @2 INFO: Processing color information for process: g g > t t~ g g @2 @@ -688,22 +683,22 @@ INFO: Finding symmetric diagrams for subprocess group uux_ttx DEBUG: len(subproc_diagrams_for_config) =  1 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1} [model_handling.py at line 1577]  -Generated helas calls for 18 subprocesses (372 diagrams) in 1.081 s -Wrote files for 810 helas calls in 2.308 s +Generated helas calls for 18 subprocesses (372 diagrams) in 0.457 s +Wrote files for 810 helas calls in 0.960 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.269 s +ALOHA: aloha creates 5 routines in 0.084 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.219 s +ALOHA: aloha creates 10 routines in 0.093 s VVV1 VVV1 FFV1 @@ -716,32 +711,32 @@ ALOHA: aloha creates 10 routines in 0.219 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/README Run "open index.html" to see more information about this process. quit -real 0m9.987s -user 0m8.742s -sys 0m1.169s -Code generation completed in 10 seconds +real 0m4.460s +user 0m3.907s +sys 0m0.496s +Code generation completed in 4 seconds ************************************************************ * * * W E L C O M E to * @@ -754,7 +749,7 @@ Code generation completed in 10 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -762,11 +757,12 @@ Code generation completed in 10 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -783,7 +779,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -791,11 +787,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat index 6427a1f12a..1e228c5e9f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt b/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt +++ b/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/MODEL/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/dsample.f b/epochX/cudacpp/pp_tt012j.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/dsample.f +++ b/epochX/cudacpp/pp_tt012j.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/setrun.f b/epochX/cudacpp/pp_tt012j.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/setrun.f +++ b/epochX/cudacpp/pp_tt012j.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc index 2ffa35504b..be1c795da9 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h index 3100207a11..0f06e665c2 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f index 9553b24fd8..89b63fb595 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f index 3d82ac010f..6b622cc0c5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f index b1976056c8..fb7ededbc7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -293,7 +293,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc index b1adf10a8d..d2b1ad4806 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h index bb3daa0e4d..3175954915 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f index 9bbf9c6d87..dedf028447 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f index ec568f57eb..d1dfa0a200 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -501,52 +501,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f index 09ee6acae3..c2c9444a7a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -296,7 +296,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc index 7f29af7755..b8886a84b3 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h index 1b49cac30b..feb1bd2b09 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f index d515f03f86..60f5129ab6 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f index b68e4b8cb6..fe97823092 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f index c889ca8138..21be95d5b0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,7 +309,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc index a15b72b642..23c9856467 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h index bd42537623..a1341e6f07 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f index eb529d7fa1..916595cb2c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f index 32cde06ca3..a93cb9fd64 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -490,52 +490,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f index ceeab9ee15..2a573144fe 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -312,7 +312,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc index 2cac6d6802..1bf2c4e46a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h index dd4aae8a06..23ec192192 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f index cb7c1a28ac..2fa22e09db 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f index f5b70c35a5..84a0fb25e9 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -490,52 +490,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f index d573434af1..bfac610447 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -312,7 +312,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc index 75c172df70..eafad489cf 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h index 46d25105cc..9b619f4ea7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f index 4e51ef9ef9..c8c01e1d04 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f index 06f2247795..91d89b54b8 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -501,52 +501,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f index 2993b9b6ec..c55f25f747 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -312,7 +312,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc index 382d6f340c..75e14ae3e4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h index 0c3370cd1c..951530add7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f index d9c2cd3b1d..a1dd069e21 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f index 26e446cf48..a7c7844be6 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f index 43d1a19444..faa686cc57 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -341,7 +341,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc index e5370edc0d..c48ce453f7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h index 471c526c49..1caccbd7d7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f index d9c18f552c..a8aca7ff27 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f index 01ab53f01d..b4cc7ca19e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -231,7 +231,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -479,52 +479,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f index 25b979b8a3..f3a7b2d976 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -344,7 +344,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc index 1fdfcee1ed..c9c60a47a7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h index 0afe32f972..484ac7033b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f index a848aa68ed..6b7c1da27e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f index 259b9c5963..269dca2797 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -490,52 +490,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f index 94fbfe1b9a..aeabb1212d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -344,7 +344,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc index bc0fc369d4..ecab5f877a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h index 949f0f0e2a..6692ee582a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f index 4de830d3f2..26887ec6e1 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f index e47124bd42..5e370f7778 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -490,52 +490,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f index 27c9803028..bd5eeb0789 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -344,7 +344,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc index c691d758e7..9ba550a7dd 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h index 25aacba743..7c72029e97 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f index 75ad5d5d05..1d5fe95e06 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1210,8 +1210,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1233,6 +1237,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f index f80ed8020c..b45584acbc 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -243,7 +243,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -517,52 +517,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f index 97ca3e442d..eb4f14af88 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -346,7 +346,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc index ca438c57e9..f62e58e2a0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h index ac3df5ae1d..9bccd4a975 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f index cf0f6ba811..1b8736f255 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1216,8 +1216,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1239,6 +1243,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f index 968cb393b0..ef1bb458dd 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -269,7 +269,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -589,52 +589,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f index b4e38a065d..b34699e1cd 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -352,7 +352,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc index 7603295c95..82d20442a7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h index 8af0c5a78c..27f43a736a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f index d0fcb9685c..f9cff08a57 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f index 9a3d9deea0..2b4d399390 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -501,52 +501,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f index 7bb5df8ff5..8ba6fd707e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -344,7 +344,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc index 77d7eddc6c..a5f867563c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h index f37d8b5515..7fd47d1d44 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f index b180a73e1b..28220caeb0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1216,8 +1216,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1239,6 +1243,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f index e002febb1f..5ddcca4990 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -269,7 +269,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -589,52 +589,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f index 778141beb0..3b7e6a26c8 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -352,7 +352,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc index 4f2c72bff8..271261fb50 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h index 311a96d812..e1636de329 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f index 1c4287654b..a3496a9bb6 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f index e39a0873f0..af48feb9da 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -501,52 +501,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f index cbc043936d..c9628f365e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -344,7 +344,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc index 65f0e5aaf4..4709fe7be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h index 75597d043e..4253ca377e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f index 53b421d61e..de5ca5b0fd 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f index 88762b0cab..f50de40179 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -501,52 +501,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f index 68145bc7b0..538ea4c438 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -344,7 +344,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc index d938dc9999..3671736cf2 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h index ebbade848b..33049b4fad 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f index b520cc75ba..ece5659dc9 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1210,8 +1210,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1233,6 +1237,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f index b8a0066f75..7df0dfc59b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -243,7 +243,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -517,52 +517,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f index a89c540364..f4e35e3e72 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -346,7 +346,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc index ef2de04fdb..ccdd58b055 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h index 17c9c0faf1..23a25fa6d0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f index f05ef894d3..477777ff54 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1208,8 +1208,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1231,6 +1235,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f index 36a61ed9ce..4ecc5a1fab 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -501,52 +501,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f index e7781f66de..e09142d6ba 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -344,7 +344,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_runs.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h b/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h index 928367303f..8edd09b089 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc index bb38d1e971..ccba8de556 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h index 69e35672fc..798de8574f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt b/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt index a0ddde9a63..e0a325fe60 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,14 +42,15 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model SMEFTsim_topU3l_MwScheme_UFO -massless_4t INFO: load particles INFO: load vertices @@ -72,7 +67,7 @@ INFO: load vertices DEBUG: MG5 converter defines FFFF26 to Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjP(-5,1)*ProjP(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjP(-5,3)*ProjP(-3,1) + Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjM(-5,1)*ProjM(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjM(-5,3)*ProjM(-3,1)  DEBUG: MG5 converter defines FFFF27 to ProjP(2,1)*ProjP(4,3) + ProjM(2,1)*ProjM(4,3)  DEBUG: MG5 converter defines FFFF112 to ProjM(2,3)*ProjM(4,1) + ProjP(2,3)*ProjP(4,1)  -DEBUG: model prefixing takes 0.13936448097229004  +DEBUG: model prefixing takes 0.023692846298217773  INFO: Change particles name to pass to MG5 convention Defined multiparticle p = g u c d s u~ c~ d~ s~ Defined multiparticle j = g u c d s u~ c~ d~ s~ @@ -87,21 +82,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED+99*SMHLOOP+99*NP+99*NPshifts+99*NPprop+99*NPcpv+NPcbb+NPcbB+NPcbBB+NPcbd1+NPcbd8+NPcbe+NPcbG+NPcbH+NPcbj1+NPcbj8+NPcbl+NPcbu1+NPcbu8+NPcbW+NPcdB+NPcdd1+NPcdd8+NPcdG+NPcdH+NPcdW+NPceB+NPced+NPcee+NPceH+NPceu+NPceW+NPcG+NPcGtil+NPcH+NPcHB+NPcHbox+NPcHbq+NPcHBtil+NPcHd+NPcHDD+NPcHe+NPcHG+NPcHGtil+NPcHj1+NPcHj3+NPcHl1+NPcHl3+NPcHQ1+NPcHQ3+NPcHt+NPcHtb+NPcHu+NPcHud+NPcHW+NPcHWB+NPcHWBtil+NPcHWtil+NPcjd1+NPcjd8+NPcje+NPcjj11+NPcjj18+NPcjj31+NPcjj38+NPcjQbd1+NPcjQbd8+NPcjQtu1+NPcjQtu8+NPcjtQd1+NPcjtQd8+NPcju1+NPcju8+NPcjujd1+NPcjujd11+NPcjujd8+NPcjujd81+NPcjuQb1+NPcjuQb8+NPcld+NPcle+NPclebQ+NPcledj+NPcleju1+NPcleju3+NPcleQt1+NPcleQt3+NPclj1+NPclj3+NPcll+NPcll1+NPclu+NPcQb1+NPcQb8+NPcQd1+NPcQd8+NPcQe+NPcQj11+NPcQj18+NPcQj31+NPcQj38+NPcQl1+NPcQl3+NPcQQ1+NPcQQ8+NPcQt1+NPcQt8+NPcQtjd1+NPcQtjd8+NPcQtQb1+NPcQtQb8+NPcQu1+NPcQu8+NPcQujb1+NPcQujb8+NPctB+NPctb1+NPctb8+NPctd1+NPctd8+NPcte+NPctG+NPctH+NPctj1+NPctj8+NPctl+NPctt+NPctu1+NPctu8+NPctW+NPcuB+NPcud1+NPcud8+NPcuG+NPcuH+NPcutbd1+NPcutbd8+NPcuu1+NPcuu8+NPcuW+NPcW+NPcWtil+NPQjujb8 INFO: Trying process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Process has 72 diagrams -1 processes with 72 diagrams generated in 3.538 s +1 processes with 72 diagrams generated in 1.267 s Total: 1 processes with 72 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_smeft_gg_tttt --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_smeft_gg_tttt INFO: remove old information in CODEGEN_mad_smeft_gg_tttt DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ t t~ @1 @@ -116,22 +111,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxttx DEBUG: len(subproc_diagrams_for_config) =  70 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 58: 58, 59: 59, 60: 60, 61: 61, 62: 62, 63: 63, 64: 64, 65: 65, 66: 66, 67: 68, 68: 69, 69: 71, 70: 72} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 58: 58, 59: 59, 60: 60, 61: 61, 62: 62, 63: 63, 64: 64, 65: 65, 66: 66, 68: 67, 69: 68, 71: 69, 72: 70} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (72 diagrams) in 0.226 s -Wrote files for 119 helas calls in 0.330 s +Generated helas calls for 1 subprocesses (72 diagrams) in 0.066 s +Wrote files for 119 helas calls in 0.138 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV5 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV9 routines ALOHA: aloha creates VVVV10 routines -ALOHA: aloha creates 5 routines in 0.234 s +ALOHA: aloha creates 5 routines in 0.086 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV5 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV9 routines ALOHA: aloha creates VVVV10 routines -ALOHA: aloha creates 10 routines in 0.244 s +ALOHA: aloha creates 10 routines in 0.097 s VVV5 VVV5 FFV1 @@ -141,32 +136,32 @@ ALOHA: aloha creates 10 routines in 0.244 s VVVV1 VVVV9 VVVV10 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h -INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc INFO: Created files Parameters_SMEFTsim_topU3l_MwScheme_UFO.h and Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/README Run "open index.html" to see more information about this process. quit -real 0m7.108s -user 0m6.522s -sys 0m0.473s -Code generation completed in 7 seconds +real 0m2.751s +user 0m2.564s +sys 0m0.145s +Code generation completed in 3 seconds ************************************************************ * * * W E L C O M E to * @@ -179,7 +174,7 @@ Code generation completed in 7 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -187,11 +182,12 @@ Code generation completed in 7 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -208,7 +204,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -216,11 +212,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat index 62b9133a5d..b4fefdb5e3 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt b/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts b/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/makefile b/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/MODEL/makefile b/epochX/cudacpp/smeft_gg_tttt.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/dsample.f b/epochX/cudacpp/smeft_gg_tttt.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/dsample.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts b/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/setrun.f b/epochX/cudacpp/smeft_gg_tttt.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/setrun.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc index 84ba0de9b4..56ec1e260a 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h index f8f13801dd..d6b7327662 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f index 0f96e07fac..08bdde5ba9 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f index 4076da2550..dbc82ee12e 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f index fca03a44c7..696a207a99 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -341,7 +341,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_runs.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/misc.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/misc.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h index 9c6a36397f..d8a6c10729 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc index 179f88e2e6..917e33a38c 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h index a308f3125f..e9361f689b 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt b/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt index 7ab0bcabec..f2f3c484bd 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt +++ b/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,27 +42,28 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model SMEFTsim_topU3l_MwScheme_UFO -massless_4t -INFO: download model from http://feynrules.irmp.ucl.ac.be/raw-attachment/wiki/SMEFT/SMEFTsim_topU3l_MwScheme_UFO.tar.gz to the following directory: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/models  ---2025-12-16 13:01:27-- http://feynrules.irmp.ucl.ac.be/raw-attachment/wiki/SMEFT/SMEFTsim_topU3l_MwScheme_UFO.tar.gz +INFO: download model from http://feynrules.irmp.ucl.ac.be/raw-attachment/wiki/SMEFT/SMEFTsim_topU3l_MwScheme_UFO.tar.gz to the following directory: /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/models  +--2026-02-20 11:49:51-- http://feynrules.irmp.ucl.ac.be/raw-attachment/wiki/SMEFT/SMEFTsim_topU3l_MwScheme_UFO.tar.gz Resolving feynrules.irmp.ucl.ac.be (feynrules.irmp.ucl.ac.be)... 130.104.48.109 Connecting to feynrules.irmp.ucl.ac.be (feynrules.irmp.ucl.ac.be)|130.104.48.109|:80... connected. HTTP request sent, awaiting response... 200 Ok Length: 80562 (79K) [application/x-tar] Saving to: ‘tmp.tgz’ - 0K .......... .......... .......... .......... .......... 63% 846K 0s - 50K .......... .......... ........ 100% 51.5M=0.06s + 0K .......... .......... .......... .......... .......... 63% 507K 0s + 50K .......... .......... ........ 100% 571M=0.1s -2025-12-16 13:01:28 (1.29 MB/s) - ‘tmp.tgz’ saved [80562/80562] +2026-02-20 11:49:51 (798 KB/s) - ‘tmp.tgz’ saved [80562/80562] SMEFTsim_topU3l_MwScheme_UFO/ SMEFTsim_topU3l_MwScheme_UFO/__init__.py @@ -89,7 +84,7 @@ SMEFTsim_topU3l_MwScheme_UFO/lorentz.py SMEFTsim_topU3l_MwScheme_UFO/vertices.py SMEFTsim_topU3l_MwScheme_UFO/restrict_SMlimit_massless.dat fail to load model but auto_convert_model is on True. Trying to convert the model -convert model /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/models/SMEFTsim_topU3l_MwScheme_UFO +convert model /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/models/SMEFTsim_topU3l_MwScheme_UFO retry the load of the model import model SMEFTsim_topU3l_MwScheme_UFO -massless_4t INFO: load particles @@ -107,7 +102,7 @@ INFO: load vertices DEBUG: MG5 converter defines FFFF26 to Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjP(-5,1)*ProjP(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjP(-5,3)*ProjP(-3,1) + Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjM(-5,1)*ProjM(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjM(-5,3)*ProjM(-3,1)  DEBUG: MG5 converter defines FFFF27 to ProjP(2,1)*ProjP(4,3) + ProjM(2,1)*ProjM(4,3)  DEBUG: MG5 converter defines FFFF112 to ProjM(2,3)*ProjM(4,1) + ProjP(2,3)*ProjP(4,1)  -DEBUG: model prefixing takes 0.08467459678649902  +DEBUG: model prefixing takes 0.023569345474243164  INFO: Change particles name to pass to MG5 convention Defined multiparticle p = g u c d s u~ c~ d~ s~ Defined multiparticle j = g u c d s u~ c~ d~ s~ @@ -125,13 +120,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED+99*SMHLOOP+99*NP+99*NPshifts+99*NPprop+99*NPcpv+NPcbb+NPcbB+NPcbBB+NPcbd1+NPcbd8+NPcbe+NPcbG+NPcbH+NPcbj1+NPcbj8+NPcbl+NPcbu1+NPcbu8+NPcbW+NPcdB+NPcdd1+NPcdd8+NPcdG+NPcdH+NPcdW+NPceB+NPced+NPcee+NPceH+NPceu+NPceW+NPcG+NPcGtil+NPcH+NPcHB+NPcHbox+NPcHbq+NPcHBtil+NPcHd+NPcHDD+NPcHe+NPcHG+NPcHGtil+NPcHj1+NPcHj3+NPcHl1+NPcHl3+NPcHQ1+NPcHQ3+NPcHt+NPcHtb+NPcHu+NPcHud+NPcHW+NPcHWB+NPcHWBtil+NPcHWtil+NPcjd1+NPcjd8+NPcje+NPcjj11+NPcjj18+NPcjj31+NPcjj38+NPcjQbd1+NPcjQbd8+NPcjQtu1+NPcjQtu8+NPcjtQd1+NPcjtQd8+NPcju1+NPcju8+NPcjujd1+NPcjujd11+NPcjujd8+NPcjujd81+NPcjuQb1+NPcjuQb8+NPcld+NPcle+NPclebQ+NPcledj+NPcleju1+NPcleju3+NPcleQt1+NPcleQt3+NPclj1+NPclj3+NPcll+NPcll1+NPclu+NPcQb1+NPcQb8+NPcQd1+NPcQd8+NPcQe+NPcQj11+NPcQj18+NPcQj31+NPcQj38+NPcQl1+NPcQl3+NPcQQ1+NPcQQ8+NPcQt1+NPcQt8+NPcQtjd1+NPcQtjd8+NPcQtQb1+NPcQtQb8+NPcQu1+NPcQu8+NPcQujb1+NPcQujb8+NPctB+NPctb1+NPctb8+NPctd1+NPctd8+NPcte+NPctG+NPctH+NPctj1+NPctj8+NPctl+NPctt+NPctu1+NPctu8+NPctW+NPcuB+NPcud1+NPcud8+NPcuG+NPcuH+NPcutbd1+NPcutbd8+NPcuu1+NPcuu8+NPcuW+NPcW+NPcWtil+NPQjujb8 INFO: Trying process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Process has 72 diagrams -1 processes with 72 diagrams generated in 3.113 s +1 processes with 72 diagrams generated in 1.267 s Total: 1 processes with 72 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ t t~ @1 @@ -140,18 +135,18 @@ INFO: Processing color information for process: g g > t t~ t t~ @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/. -Generated helas calls for 1 subprocesses (72 diagrams) in 0.181 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/. +Generated helas calls for 1 subprocesses (72 diagrams) in 0.065 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV5 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV9 routines ALOHA: aloha creates VVVV10 routines -ALOHA: aloha creates 5 routines in 0.223 s +ALOHA: aloha creates 5 routines in 0.087 s VVV5 VVV5 FFV1 @@ -161,17 +156,17 @@ ALOHA: aloha creates 5 routines in 0.223 s VVVV1 VVVV9 VVVV10 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h -INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc INFO: Created files Parameters_SMEFTsim_topU3l_MwScheme_UFO.h and Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. quit -real 0m4.901s -user 0m4.338s -sys 0m0.145s -Code generation completed in 5 seconds +real 0m2.310s +user 0m1.787s +sys 0m0.058s +Code generation completed in 2 seconds diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc index 8c3316992a..55111c9317 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h index f8f13801dd..d6b7327662 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h index 9c6a36397f..d8a6c10729 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc index 179f88e2e6..917e33a38c 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +++ b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h index a308f3125f..e9361f689b 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt b/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt index 44b0190a15..a4c8b7d45c 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -549,21 +544,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t1 t1~ WEIGHTED<=2 @1 INFO: Process has 6 diagrams -1 processes with 6 diagrams generated in 0.074 s +1 processes with 6 diagrams generated in 0.043 s Total: 1 processes with 6 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_susy_gg_t1t1 --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_susy_gg_t1t1 INFO: remove old information in CODEGEN_mad_susy_gg_t1t1 DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t1 t1~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t1 t1~ @1 @@ -578,49 +573,49 @@ INFO: Finding symmetric diagrams for subprocess group gg_t1t1x DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (6 diagrams) in 0.008 s -Wrote files for 16 helas calls in 0.073 s +Generated helas calls for 1 subprocesses (6 diagrams) in 0.003 s +Wrote files for 16 helas calls in 0.030 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates VSS1 routines ALOHA: aloha creates VVSS1 routines -ALOHA: aloha creates 3 routines in 0.255 s +ALOHA: aloha creates 3 routines in 0.048 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates VSS1 routines ALOHA: aloha creates VVSS1 routines -ALOHA: aloha creates 6 routines in 0.264 s +ALOHA: aloha creates 6 routines in 0.049 s VVV1 VSS1 VSS1 VSS1 VVSS1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/README Run "open index.html" to see more information about this process. quit -real 0m3.741s -user 0m3.187s -sys 0m0.537s -Code generation completed in 4 seconds +real 0m1.298s +user 0m1.120s +sys 0m0.160s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -633,7 +628,7 @@ Code generation completed in 4 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -641,11 +636,12 @@ Code generation completed in 4 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -662,7 +658,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -670,11 +666,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat index 596061f687..646ec46ccb 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt b/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts b/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/makefile b/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/MODEL/makefile b/epochX/cudacpp/susy_gg_t1t1.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/dsample.f b/epochX/cudacpp/susy_gg_t1t1.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/dsample.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts b/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/setrun.f b/epochX/cudacpp/susy_gg_t1t1.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/setrun.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc index 89c03a7876..92473915d9 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h index 0c297072b2..f279b4614c 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f index b9a2cbde58..45589a5296 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f index d636ee31f2..c1b434290b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f index f9c0655a42..1ffbd09d84 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -281,7 +281,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_runs.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/misc.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/misc.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h index b88caee0f2..569f030e0f 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc index ac4a8b0cfb..8f958524c5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h index bebfe83e66..d2552d43cb 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt b/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt index ba273f093b..f7175067cb 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt +++ b/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -549,13 +544,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t1 t1~ WEIGHTED<=2 @1 INFO: Process has 6 diagrams -1 processes with 6 diagrams generated in 0.149 s +1 processes with 6 diagrams generated in 0.046 s Total: 1 processes with 6 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1 Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1 +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1 INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t1 t1~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t1 t1~ @1 @@ -564,32 +559,32 @@ INFO: Processing color information for process: g g > t1 t1~ @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/. -Generated helas calls for 1 subprocesses (6 diagrams) in 0.012 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/. +Generated helas calls for 1 subprocesses (6 diagrams) in 0.003 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates VSS1 routines ALOHA: aloha creates VVSS1 routines -ALOHA: aloha creates 3 routines in 0.201 s +ALOHA: aloha creates 3 routines in 0.048 s VVV1 VSS1 VSS1 VSS1 VVSS1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. quit -real 0m1.544s -user 0m1.430s -sys 0m0.102s -Code generation completed in 2 seconds +real 0m0.495s +user 0m0.456s +sys 0m0.031s +Code generation completed in 0 seconds diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc index e4718e0681..7ed20ae570 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h index 0c297072b2..f279b4614c 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h index b88caee0f2..569f030e0f 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc index ac4a8b0cfb..8f958524c5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h index bebfe83e66..d2552d43cb 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt b/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt index e816c993a6..a65a2ea364 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -549,21 +544,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.068 s +1 processes with 3 diagrams generated in 0.041 s Total: 1 processes with 3 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_susy_gg_tt --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4168]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4231]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  INFO: initialize a new directory: CODEGEN_mad_susy_gg_tt INFO: remove old information in CODEGEN_mad_susy_gg_tt DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/SubProcesses  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt  +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards  +WARNING: File exists /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 @@ -578,46 +573,46 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1552]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1576]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1577]  -Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s -Wrote files for 10 helas calls in 0.062 s +Generated helas calls for 1 subprocesses (3 diagrams) in 0.002 s +Wrote files for 10 helas calls in 0.027 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 2 routines in 0.096 s +ALOHA: aloha creates 2 routines in 0.036 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 4 routines in 0.091 s +ALOHA: aloha creates 4 routines in 0.037 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt +save configuration file to /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages DEBUG: result.returncode =  0 [output.py at line 273]  -Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt done. +Output to directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt done. Type "launch" to generate events from this process, or see -/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/README +/home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/README Run "open index.html" to see more information about this process. quit -real 0m3.085s -user 0m2.556s -sys 0m0.522s -Code generation completed in 3 seconds +real 0m1.243s +user 0m1.072s +sys 0m0.155s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -630,7 +625,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -638,11 +633,12 @@ Code generation completed in 3 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -659,7 +655,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.4 * +* VERSION 3.6.7 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -667,11 +663,12 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt index b0910553c9..178007bafc 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt @@ -32,7 +32,7 @@ # acknowledged_v3.1_syntax = False -#! Prefered Fortran Compiler +#! Preferred Fortran Compiler #! If None: try to find g77 or gfortran on the system #! # fortran_compiler = None @@ -40,25 +40,32 @@ # f2py_compiler_py3 = None -#! Prefered C++ Compiler +#! Preferred C++ Compiler #! If None: try to find g++ or clang on the system #! # cpp_compiler = None -#! Prefered Text Editor +#! Preferred Text Editor #! Default: use the shell default Editor #! or try to find one available on the system #! Be careful: Only shell based editor are allowed # text_editor = None -#! Prefered WebBrower +#! Preferred WebBrower #! If None: try to find one available on the system # web_browser = None -#! Prefered PS viewer +#! Preferred PS viewer #! If None: try to find one available on the system # eps_viewer = None +#! Controls whether to use `pigz`, the multithreaded `gzip` implementation, +#! when available on the system (will respect the nb_core setting). +#! If None: try to use pigz if available on the system, fall back to gzip otherwise. +#! If False: use gzip +#! If True: use pigz +# use_pigz = None + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit # timeout = 60 @@ -87,6 +94,11 @@ # thepeg_path = # hepmc_path = +#! DMTCP path. +#! Defines the path to the DMTCP installation directory (i.e. the +#! one containing the lib, bin and include directories) . +# dmtcp = + #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update @@ -110,13 +122,21 @@ #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 +#! Checkpointing +# checkpointing = True # useful for very long jobs + #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph # cluster_size = 150 + +#! Advanced cluster settings # cluster_walltime = # time in minute for slurm and second for condor (not supported for other scheduller) +# cluster_requirement = x86_64-v4 # selected microarchitecture for checkpointing consistency +# cluster_vacatetime = 120 # time in seconds for checkpoint creation before the job removal/requeuing +# enforce_shared_disk = True # enforce shared disk I/O (this setting is currently only relevant for Condor) #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -235,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat index fdc460e1d4..14fe2b4ba1 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat @@ -8,11 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.6.4 2025-09-13 * -#* * -#* WARNING: UNKNOWN DEVELOPMENT VERSION. * -#* WARNING: DO NOT USE FOR PRODUCTION * -#* * +#* VERSION 3.6.7 2026-01-05 * +#* GIT v3.6.7 HEAD * #* * #* The MadGraph5_aMC@NLO Development Team - Find us at * #* https://server06.fynu.ucl.ac.be/projects/madgraph * diff --git a/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt b/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts b/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts index 56ba259c56..c3b9ca7ad5 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts @@ -3,9 +3,9 @@ DEFAULT_F_COMPILER=gfortran MACFLAG=-mmacosx-version-min=10.7 DEFAULT_CPP_COMPILER=clang MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -STDLIB=-lc++ +STDLIB=-lstdc++ PYTHIA8_PATH=NotInstalled -STDLIB_FLAG=-stdlib=libc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -29,6 +29,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/makefile b/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/makefile index 6afb7489d8..3a96c7a1e1 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/makefile +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/makefile @@ -14,18 +14,26 @@ include ../make_opts LIBRARY = libdhelas.$(libext) +LIBRARY_SHARED = libdhelas.$(dylibext) LIBDIR = ../../lib/ BASIC_OBJS = aloha_functions.o -FFLAGS += $(ALOHA_FLAG) +FFLAGS += -fPIC $(ALOHA_FLAG) include ./aloha_file.inc -all: $(LIBDIR)$(LIBRARY) $(LIBDIR)$(LIBRARY): $(BASIC_OBJS) $(ALOHARoutine) $(call CREATELIB, $@, $^) +# Shared library (optional) +$(LIBDIR)$(LIBRARY_SHARED): $(BASIC_OBJS) $(ALOHARoutine) + $(FC) -shared -o $@ $^ $(LDFLAGS) + +shared: $(LIBDIR)$(LIBRARY_SHARED) + clean: $(RM) *.o $(LIBDIR)$(LIBRARY) + +all: $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/MODEL/makefile b/epochX/cudacpp/susy_gg_tt.mad/Source/MODEL/makefile index 5a5681d220..1adb69234d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/MODEL/makefile +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/MODEL/makefile @@ -16,6 +16,7 @@ include makeinc.inc LIBDIR=../../lib/ LIBRARY=libmodel.$(libext) +LIBRARY_SHARED=libmodel.$(dylibext) RUNNING = ../alfas_functions.o ../RUNNING/matrix_exponential.o ../RUNNING/c8lib.o ../RUNNING/r8lib.o all: $(LIBDIR)$(LIBRARY) ../param_card.inc @@ -35,9 +36,13 @@ $(LIBRARY): $(MODEL) ar cru $(LIBRARY) $(MODEL) ranlib $(LIBRARY) +$(LIBDIR)$(LIBRARY_SHARED): $(MODEL) + $(FC) -shared -o $@ $^ $(LDFLAGS) + $(LIBDIR)$(LIBRARY): $(MODEL) $(call CREATELIB, $@, $^) +shared: $(LIBDIR)$(LIBRARY_SHARED) clean: $(RM) *.o $(LIBDIR)$(LIBRARY) diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/dsample.f b/epochX/cudacpp/susy_gg_tt.mad/Source/dsample.f index bcfe1138b5..c0595a23f9 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/dsample.f +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/dsample.f @@ -600,8 +600,8 @@ subroutine output_run_statistics(outUnit) write(outUnit,*) ''//trim(toStr_int(N_EVALS))//'' write(outUnit,*) '' -33 FORMAT( a15,i12,',',i12',',i12',',i12',',i12', - & ',i12',',i12',',i12',',i12',',i12,a16) +33 FORMAT( a15,i12,',',i12,',',i12,',',i12,',',i12,', + & ',i12,',',i12,',',i12,',',i12,',',i12,a16) end subroutine diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts b/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts index f10336e42e..ca7bfcc32d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts @@ -30,6 +30,14 @@ MACFLAG= endif endif +# set the flag for dynamical library +ifeq ($(UNAME), Darwin) +DYNLIBFLAG=-dynamiclib +RPATHFLAG=-install_name @rpath/ +else +DYNLIBFLAG=-shared -fPIC +RPATHFLAG=-Wl,-soname, +endif ifeq ($(origin CXXFLAGS),undefined) CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/setrun.f b/epochX/cudacpp/susy_gg_tt.mad/Source/setrun.f index dc6caef748..4cd128d1eb 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/setrun.f +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/setrun.f @@ -293,3 +293,87 @@ subroutine get_pdfup(pdfin,pdfgup,pdfsup,lhaid) return end + + + double precision FUNCTION DDILOG(X) +* +* $Id: imp64.inc,v 1.1.1.1 1996/04/01 15:02:59 mclareni Exp $ +* +* $Log: imp64.inc,v $ +* Revision 1.1.1.1 1996/04/01 15:02:59 mclareni +* Mathlib gen +* +* +* imp64.inc +* + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + DIMENSION C(0:19) + PARAMETER (Z1 = 1, HF = Z1/2) + PARAMETER (PI = 3.14159 26535 89793 24D0) + PARAMETER (PI3 = PI**2/3, PI6 = PI**2/6, PI12 = PI**2/12) + DATA C( 0) / 0.42996 69356 08136 97D0/ + DATA C( 1) / 0.40975 98753 30771 05D0/ + DATA C( 2) /-0.01858 84366 50145 92D0/ + DATA C( 3) / 0.00145 75108 40622 68D0/ + DATA C( 4) /-0.00014 30418 44423 40D0/ + DATA C( 5) / 0.00001 58841 55418 80D0/ + DATA C( 6) /-0.00000 19078 49593 87D0/ + DATA C( 7) / 0.00000 02419 51808 54D0/ + DATA C( 8) /-0.00000 00319 33412 74D0/ + DATA C( 9) / 0.00000 00043 45450 63D0/ + DATA C(10) /-0.00000 00006 05784 80D0/ + DATA C(11) / 0.00000 00000 86120 98D0/ + DATA C(12) /-0.00000 00000 12443 32D0/ + DATA C(13) / 0.00000 00000 01822 56D0/ + DATA C(14) /-0.00000 00000 00270 07D0/ + DATA C(15) / 0.00000 00000 00040 42D0/ + DATA C(16) /-0.00000 00000 00006 10D0/ + DATA C(17) / 0.00000 00000 00000 93D0/ + DATA C(18) /-0.00000 00000 00000 14D0/ + DATA C(19) /+0.00000 00000 00000 02D0/ + IF(X .EQ. 1) THEN + H=PI6 + ELSEIF(X .EQ. -1) THEN + H=-PI12 + ELSE + T=-X + IF(T .LE. -2) THEN + Y=-1/(1+T) + S=1 + A=-PI3+HF*(LOG(-T)**2-LOG(1+1/T)**2) + ELSEIF(T .LT. -1) THEN + Y=-1-T + S=-1 + A=LOG(-T) + A=-PI6+A*(A+LOG(1+1/T)) + ELSE IF(T .LE. -HF) THEN + Y=-(1+T)/T + S=1 + A=LOG(-T) + A=-PI6+A*(-HF*A+LOG(1+T)) + ELSE IF(T .LT. 0) THEN + Y=-T/(1+T) + S=-1 + A=HF*LOG(1+T)**2 + ELSE IF(T .LE. 1) THEN + Y=T + S=1 + A=0 + ELSE + Y=1/T + S=-1 + A=PI6+HF*LOG(T)**2 + ENDIF + H=Y+Y-1 + ALFA=H+H + B1=0 + B2=0 + DO 1 I = 19,0,-1 + B0=C(I)+ALFA*B1-B2 + B2=B1 + 1 B1=B0 + H=-(S*(B0-H*B2)+A) + ENDIF + DDILOG=H + RETURN + END diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt index c3f6bdc3de..2d0b31e4f7 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.4 \ No newline at end of file +3.6.7 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index 98722d3089..7edcf8cbed 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h index 256c5780e4..dcae2c156e 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f index 91dadaaa8f..e5073c233a 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -1205,8 +1205,12 @@ INTEGER FUNCTION GET_NHEL(HEL,PARTID) SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) IMPLICIT NONE + INCLUDE 'nexternal.inc' INCLUDE 'maxamps.inc' ! for the definition of maxflow INCLUDE 'coloramps.inc' ! set the coloramps + INCLUDE 'cluster.inc' + INCLUDE 'genps.inc' + INCLUDE 'run.inc' C C argument IN C @@ -1228,6 +1232,11 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL) INTEGER I,J DOUBLE PRECISION XTARGET + IF (ICKKW.GT.0) THEN + ICONFIG = IGRAPHS(1) + ENDIF + + NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f index 2b1fafdacd..f6bf4ceb6e 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -446,52 +446,62 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ALL_OUT , SELECTED_HEL, SELECTED_COL, VECSIZE_USED) - DO IVEC=1,VECSIZE_USED - DSIGUU = ALL_OUT(IVEC) - IF (IMODE.EQ.5) THEN - IF (DSIGUU.LT.1D199) THEN - ALL_OUT(IVEC) = DSIGUU*CONV - ELSE - ALL_OUT(IVEC) = 0.0D0 - ENDIF - RETURN + DO CURR_WARP=1, NB_WARP_USED + IF(IMIRROR_VEC(CURR_WARP).EQ.1)THEN + IB(1) = 1 + IB(2) = 2 + ELSE + IB(1) = 2 + IB(2) = 1 ENDIF + DO IWARP=1, WARP_SIZE + IVEC = (CURR_WARP-1)*WARP_SIZE+IWARP + DSIGUU = ALL_OUT(IVEC) + IF (IMODE.EQ.5) THEN + IF (DSIGUU.LT.1D199) THEN + ALL_OUT(IVEC) = DSIGUU*CONV + ELSE + ALL_OUT(IVEC) = 0.0D0 + ENDIF + RETURN + ENDIF - XBK(:) = ALL_XBK(:,IVEC) -C CM_RAP = ALL_CM_RAP(IVEC) - Q2FACT(:) = ALL_Q2FACT(:, IVEC) + XBK(:) = ALL_XBK(:,IVEC) +C CM_RAP = ALL_CM_RAP(IVEC) + Q2FACT(:) = ALL_Q2FACT(:, IVEC) - IF(FRAME_ID.NE.6)THEN - CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) - ELSE - P1 = ALL_PP(:,:,IVEC) - ENDIF -C call restore_cl_val_to(ivec) -C DSIGUU=DSIGUU*REWGT(P1,ivec) - DSIGUU=DSIGUU*ALL_RWGT(IVEC) + IF(FRAME_ID.NE.6)THEN + CALL BOOST_TO_FRAME(ALL_PP(0,1,IVEC), FRAME_ID, P1) + ELSE + P1 = ALL_PP(:,:,IVEC) + ENDIF +C call restore_cl_val_to(ivec) +C DSIGUU=DSIGUU*REWGT(P1,ivec) + DSIGUU=DSIGUU*ALL_RWGT(IVEC) -C Apply the bias weight specified in the run card (default is -C 1.0) - DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) +C Apply the bias weight specified in the run card (default is +C 1.0) + DSIGUU=DSIGUU*CUSTOM_BIAS(P1,DSIGUU,1, IVEC) - DSIGUU=DSIGUU*NFACT + DSIGUU=DSIGUU*NFACT - IF (DSIGUU.LT.1D199) THEN -C Set sign of dsig based on sign of PDF and matrix element - ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU - $ *ALL_PD(IPSEL,IVEC)) - ELSE - WRITE(*,*) 'Error in matrix element' - DSIGUU=0D0 - ALL_OUT(IVEC)=0D0 - ENDIF -C Generate events only if IMODE is 0. - IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN -C Call UNWGT to unweight and store events - ICONFIG = CHANNELS(IVEC) - CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, - $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) - ENDIF + IF (DSIGUU.LT.1D199) THEN +C Set sign of dsig based on sign of PDF and matrix element + ALL_OUT(IVEC)=DSIGN(CONV*ALL_PD(0,IVEC)*DSIGUU,DSIGUU + $ *ALL_PD(IPSEL,IVEC)) + ELSE + WRITE(*,*) 'Error in matrix element' + DSIGUU=0D0 + ALL_OUT(IVEC)=0D0 + ENDIF +C Generate events only if IMODE is 0. + IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN +C Call UNWGT to unweight and store events + ICONFIG = SYMCONF(ICONF_VEC(CURR_WARP)) + CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1 + $ , SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) + ENDIF + ENDDO ENDDO END diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f index a073a3b6a3..d81dccf408 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -293,7 +293,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +C Generated by MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f index 907894ea89..2295d61b08 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f @@ -383,7 +383,7 @@ logical function filmap() end - subroutine checkbw(nbw,ibwlist,isbw) + subroutine checkbw(nbw,ibwlist,isbw,p) c************************************************************************** c Checks if any resonances are on the BW for this configuration c************************************************************************** @@ -391,6 +391,7 @@ subroutine checkbw(nbw,ibwlist,isbw) include 'genps.inc' include 'maxconfigs.inc' include 'nexternal.inc' + real*8 p(0:3,nexternal) C $B$ NGRAPHS $E$ !this is a tag for MadWeight c ibwlist has ijid, propid @@ -419,6 +420,7 @@ subroutine checkbw(nbw,ibwlist,isbw) $ icl(iforest(2,i,this_config)) isbw(icl(i))=.false. C $B$ ONBW $B$ !this is a tag for MadWeight + call cut_bw(p) if(OnBW(i))then C $E$ ONBW $E$ !this is a tag for MadWeight nbw=nbw+1 @@ -562,7 +564,7 @@ logical function cluster(p, ivec) pcmsp(i)=0 enddo c Check if any resonances are on the BW, store results in to_checkbw - call checkbw(nbw,ibwlist,isbw) + call checkbw(nbw,ibwlist,isbw,p) if(btest(mlevel,4).and.nbw.gt.0) $ write(*,*) 'Found BWs: ',(ibwlist(1,i),i=1,nbw) diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f index d0706e90b4..46732a0e85 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f @@ -320,6 +320,7 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) integer icolup(2,nexternal,maxflow,maxsproc) integer ipdg(-nexternal+1:nexternal) double precision mtot + integer gForceBW(-max_branch:-1,lmaxconfigs) include 'leshouche.inc' c c Global @@ -328,12 +329,15 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) include 'coupl.inc' ! mass and width info - needs VECSIZE_MEMMAX (defined in vector.inc) double precision stot common/to_stot/stot + double precision bwcutoff + common/to_bwcutoff/bwcutoff c----- c Begin Code c----- include 'props.inc' !Propagator mass and width information prmass,prwidth include 'pmass.inc' !External particle masses + include 'decayBW.inc' c write(*,*) 'Checking for BW in config number ',iconfig c c Reset variables @@ -383,9 +387,21 @@ subroutine BW_Conflict(iconfig,itree,lconflict,sprop,forcebw) c Mark all daughters of conflicted BW as conflicting c do j=i,1,-1 - if (lconflict(-j)) then - lconflict(itree(1,-j)) = .true. - lconflict(itree(2,-j)) = .true. + if (lconflict(-j)) then + if (itree(1,-j).lt.0) then + if( gForceBW(itree(1,-j),iconfig).ne.1) then + lconflict(itree(1,-j)) = .true. + endif + else + lconflict(itree(1,-j)) = .true. + endif + if (itree(2,-j).lt.0) then + if( gForceBW(itree(2,-j),iconfig).ne.1) then + lconflict(itree(2,-j)) = .true. + endif + else + lconflict(itree(2,-j)) = .true. + endif c write(*,*) 'Adding conflict ',itree(1,-j),itree(2,-j) endif enddo diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f index d1247f1849..06177f1061 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f @@ -733,7 +733,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) c c Add info on resonant mothers -c +c recall onbw since that might have configured onBW for the wrong config (check tt~a ,t >... for checking impact + call cut_bw(p) call addmothers(ipsel,jpart,pb,isym,jsym,sscale,aaqcd,aaqed,buff, $ npart,numproc,flip, icol, ivec) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py index 2efb5954a6..2bc6174b85 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py @@ -3353,7 +3353,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): def retro_compatible_custom_fct(lines, mode=None): f77_type = ['real*8', 'integer', 'double precision', 'logical'] - function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ + function_pat = re.compile(r'^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ % {'type':'|'.join(f77_type)}, re.I+re.M) include_pat = re.compile(r"\s+include\s+[\'\"]([\w\./]*)") diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py index 95ef45b5f3..e837242e8e 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py @@ -21,6 +21,7 @@ import inspect import sys import six +import tempfile from six.moves import range from six.moves import input @@ -97,6 +98,7 @@ class Cluster(object): """Basic Class for all cluster type submission""" name = 'mother class' identifier_length = 14 + badstatus = '' def __init__(self,*args, **opts): """Init the cluster""" @@ -108,6 +110,11 @@ def __init__(self,*args, **opts): self.submitted_exes = [] #HTCaaS self.submitted_args = [] #HTCaaS + if MADEVENT: + self.run_dir = LOCALDIR + else: + self.run_dir = MG5DIR + if 'cluster_queue' in opts: self.cluster_queue = opts['cluster_queue'] else: @@ -116,6 +123,9 @@ def __init__(self,*args, **opts): self.temp_dir = opts['cluster_temp_path'] else: self.temp_dir = None + self.checkpointing = False + if 'checkpointing' in opts: + self.checkpointing = opts['checkpointing'] self.options = {'cluster_status_update': (600, 30)} for key,value in opts.items(): self.options[key] = value @@ -249,6 +259,7 @@ def control(self, me_dir=None): self.submitted_ids.remove(pid) else: fail += 1 + self.badstatus = status return idle, run, self.finish, fail @@ -310,6 +321,8 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if self.options['cluster_type'] == 'htcaas2': me_dir = self.metasubmit(self) + old_idle = -1 + while 1: old_mode = mode nb_iter += 1 @@ -318,10 +331,17 @@ def wait(self, me_dir, fct, minimal_job=0, update_first=None): if idle + run + finish + fail != nb_job: nb_job = idle + run + finish + fail nb_iter = 1 # since some packet finish prevent to pass in long waiting mode + old_idle = -1 else: nb_job = idle + run + finish + fail + + if old_idle == -1: old_idle = nb_job + if self.checkpointing and old_idle < idle and not nb_short: + nb_iter = 1 # reset iterator when the job is requeued + old_idle = idle + if fail: - raise ClusterManagmentError('Some Jobs are in a Hold/... state. Please try to investigate or contact the IT team') + raise ClusterManagmentError(f'Some Jobs are in a {self.badstatus} state. Please try to investigate or contact the IT team') if idle + run == 0: #time.sleep(20) #security to ensure that the file are really written on the disk logger.info('All jobs finished') @@ -401,6 +421,45 @@ def check_termination(self, job_id): else: time_check = 0 + # resubmit if checkpoint dir is present + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + if self.nb_retry < 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing''' % (job_id, args)) + input('press enter to continue.') + return 'done' + elif self.nb_retry == 0: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Stopping all runs.''' % (job_id, args)) + self.remove() + return 'done' + elif args['nb_submit'] >= self.nb_retry: + logger.critical('''Fail to run correctly job %s. + with option: %s + failed checkpointing + Fails %s times + No resubmition. ''' % (job_id, args, args['nb_submit'])) + self.remove() + return 'done' + else: + args['nb_submit'] += 1 + logger.warning('resubmit job (for the %s times)' % args['nb_submit']) + del self.retry_args[job_id] + self.submitted_ids.remove(job_id) + if 'time_check' in args: + del args['time_check'] + if job_id in self.id_to_packet: + self.id_to_packet[job_id].remove_one() + args['packet_member'] = self.id_to_packet[job_id] + del self.id_to_packet[job_id] + self.cluster_submit(**args) + else: + self.submit2(**args) + return 'resubmit' + for path in args['required_output']: if args['cwd']: path = pjoin(args['cwd'], path) @@ -898,34 +957,50 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None error = %(stderr)s log = %(log)s %(argument)s - environment = CONDOR_ID=$(Cluster).$(Process) + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); SHARED_DIR=%(cwd)s; DMTCP_PATH=%(dmtcp_path)s Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ and self.options['cluster_walltime'] != 'None': - requirement+='\n MaxRuntime = %s' % self.options['cluster_walltime'] + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' if cwd is None: cwd = os.getcwd() if stdout is None: stdout = '/dev/null' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join(argument) else: @@ -934,10 +1009,52 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, - 'requirement': requirement} + 'requirement': requirement, 'walltime': walltime, 'vacatetime': ''} + + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode='w', dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = misc.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = misc.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -966,8 +1083,13 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, if not required_output and output_files: required_output = output_files - - if (input_files == [] == output_files): + + enforce_shared_disk = False + if 'enforce_shared_disk' in self.options and self.options['enforce_shared_disk']\ + and self.options['enforce_shared_disk'] != 'None': + enforce_shared_disk = True + + if (input_files == [] == output_files) or enforce_shared_disk: return self.submit(prog, argument, cwd, stdout, stderr, log, required_output=required_output, nb_submit=nb_submit) @@ -976,33 +1098,56 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, error = %(stderr)s log = %(log)s %(argument)s + environment = CONDOR_ID=$(DAGManJobId); CONDOR_RESTART_COUNT=$(RETRY); DMTCP_PATH=%(dmtcp_path)s; INITIAL_DIR=%(cwd)s + %(spool_on_evict)s should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = %(input_files)s %(output_files)s + max_transfer_output_mb = -1 Universe = vanilla notification = Error Initialdir = %(cwd)s %(requirement)s + %(walltime)s + %(vacatetime)s getenv=True queue 1 """ + requirement = [] + if self.cluster_queue not in ['None', None]: - requirement = 'Requirements = %s=?=True' % self.cluster_queue + requirement.append('%s=?=True' % self.cluster_queue) + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + microarch = self.options['cluster_requirement'] + requirement.append(f'TARGET.Microarch==\"{microarch}\"') + + if requirement: + requirement = 'Requirements = ' + ' && '.join(requirement) else: requirement = '' + if 'cluster_walltime' in self.options and self.options['cluster_walltime']\ + and self.options['cluster_walltime'] != 'None': + walltime = '+MaxRuntime = %s' % self.options['cluster_walltime'] + else: + walltime = '' + if cwd is None: cwd = os.getcwd() if stdout is None: - stdout = '/dev/null' + stdout = 'condor_$(DAGManJobId)_$(restart_count).out' if stderr is None: - stderr = '/dev/null' + stderr = 'condor_$(DAGManJobId).err' if log is None: - log = '/dev/null' + log = 'condor_$(DAGManJobId).log' if not os.path.exists(prog): prog = os.path.join(cwd, prog) + if self.checkpointing: + argument = [prog] + argument if argument: argument = 'Arguments = %s' % ' '.join([str(a) for a in argument]) else: @@ -1010,7 +1155,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, # input/output file treatment if input_files: input_files = ','.join(input_files) - else: + else: input_files = '' if output_files: output_files = 'transfer_output_files = %s' % ','.join(output_files) @@ -1019,13 +1164,63 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, - dico = {'prog': prog, 'cwd': cwd, 'stdout': stdout, + dico = {'prog': prog, 'cwd': cwd, 'dmtcp_path': '', 'stdout': stdout, 'stderr': stderr,'log': log,'argument': argument, 'requirement': requirement, 'input_files':input_files, - 'output_files':output_files} + 'output_files':output_files, 'walltime': walltime, 'vacatetime': '', + 'spool_on_evict': ''} + + if self.checkpointing: + + if MADEVENT: + preexec = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_condor_driver.sh') + else: + preexec = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_preexec.sh') + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_condor_driver.sh') + + dico['prog'] = wrapper + dico['argument'] = argument + dico['input_files'] += ',dmtcp_$(DAGManJobId)' + dico['output_files'] += ',dmtcp_$(DAGManJobId)' + dico['spool_on_evict'] = '+SpoolOnEvict = False' + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + and os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + dico['dmtcp_path'] = self.options['dmtcp'] + else: + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + vacatetime = self.options['cluster_vacatetime'] + dico['vacatetime'] = f'+JobMaxVacateTime = {vacatetime}' + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as submit_file: + submit_file.write((text % dico)) + submit_filename = submit_file.name + + with tempfile.NamedTemporaryFile(mode="w", dir=cwd, delete=False) as dag_file: + dag_text = f'JOB job {submit_filename}\n' + dag_text += f'SCRIPT PRE job /bin/bash {preexec} {cwd} {dag_file.name}\n' + dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' + dag_text += 'VARS job restart_count="$(RETRY)"\n' + + dag_file.write(dag_text) + dag_filename = dag_file.name + + command = ['condor_submit_dag', dag_filename] + text = """""" + + else: + command = ['condor_submit'] #open('submit_condor','w').write(text % dico) - a = subprocess.Popen(['condor_submit'], stdout=subprocess.PIPE, + a = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) output, _ = a.communicate((text % dico).encode()) #output = a.stdout.read() @@ -1103,6 +1298,7 @@ def control(self, me_dir): run += 1 elif status != 'C': fail += 1 + self.badstatus = status for id in list(self.submitted_ids): if id not in ongoing: @@ -1120,9 +1316,11 @@ def remove(self, *args, **opts): if not self.submitted_ids: return - cmd = "condor_rm %s" % ' '.join(self.submitted_ids) - - status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + for i in range(0, len(self.submitted_ids), 100): + cmd = "condor_rm %s" % ' '.join(self.submitted_ids[i:i+100]) + status = misc.Popen([cmd], shell=True, stdout=open(os.devnull,'w')) + time.sleep(5) + self.submitted_ids = [] class PBSCluster(Cluster): @@ -1246,6 +1444,7 @@ def control(self, me_dir): idle += 1 else: fail += 1 + self.badstatus = status2 if status.returncode != 0 and status.returncode is not None: raise ClusterManagmentError('server fails in someway (errorcode %s)' % status.returncode) @@ -1405,6 +1604,7 @@ def control(self, me_dir): logger.debug(line) fail += 1 finished.remove(id) + self.badstatus = status for id in finished: self.check_termination(id) @@ -1661,6 +1861,7 @@ def control(self, me_dir=None): run += 1 if statusflag == 'sh': fail += 1 + self.badstatus = statusflag for id in list(self.submitted_ids): if id not in ongoing: self.check_termination(id) @@ -1695,7 +1896,7 @@ class SLURMCluster(Cluster): name = 'slurm' job_id = 'SLURM_JOBID' idle_tag = ['Q','PD','S','CF'] - running_tag = ['R', 'CG'] + running_tag = ['R', 'CG', 'SI'] complete_tag = ['C'] identifier_length = 8 @@ -1724,12 +1925,43 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None if log is None: log = '/dev/null' - - command = ['sbatch', '-o', stdout, - '-J', me_dir, - '-e', stderr, prog] + argument + if self.checkpointing: + + if MADEVENT: + wrapper = pjoin(LOCALDIR,'bin','internal','dmtcp_slurm_driver.sh') + else: + wrapper = pjoin(MG5DIR,'Template','Common','bin','internal','dmtcp_slurm_driver.sh') + argument_dmtcp = [prog] + argument + command = ['sbatch', + '-J', me_dir, wrapper] + argument_dmtcp + + command.insert(1, '--open-mode') + command.insert(2, 'append') + + if not 'dmtcp' in self.options or not self.options['dmtcp']\ + or self.options['dmtcp'] == 'None': + raise ClusterManagmentError('checkpointing selected, but DMTCP path not set') + + if not os.path.exists(pjoin(self.options['dmtcp'], 'bin'))\ + or not os.path.exists(pjoin(self.options['dmtcp'], 'lib')): + raise ClusterManagmentError(f'DMTCP path {self.options["dmtcp"]} does not exist or DMTCP not istalled.') + + if 'cluster_requirement' in self.options and self.options['cluster_requirement']\ + and self.options['cluster_requirement'] != 'None': + command.insert(1, '-C') + command.insert(2, self.options['cluster_requirement']) + + if 'cluster_vacatetime' in self.options and self.options['cluster_vacatetime']\ + and self.options['cluster_vacatetime'] != 'None': + command.insert(1, '--signal') + command.insert(2, 'B:USR1@'+self.options['cluster_vacatetime']) + + else: + command = ['sbatch', '-o', stdout, + '-J', me_dir, + '-e', stderr, prog] + argument if self.cluster_queue and self.cluster_queue != 'None': command.insert(1, '-p') @@ -1741,15 +1973,24 @@ def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None command.insert(2, self.options['cluster_walltime']) + jobenv = os.environ.copy() + if MADEVENT: jobenv['RUN_DIR'] = LOCALDIR + else: jobenv['RUN_DIR'] = MG5DIR + if self.checkpointing: jobenv['DMTCP_PATH'] = self.options['dmtcp'] a = misc.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, cwd=cwd) + stdin=subprocess.PIPE, cwd=cwd, env=jobenv) output = a.communicate() output_arr = output[0].decode(errors='ignore').split(' ') id = output_arr[3].rstrip() + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}') + if not id.isdigit(): id = re.findall(r'Submitted batch job ([\d\.]+)', ' '.join(output_arr)) @@ -1810,22 +2051,37 @@ def control(self, me_dir): elif status in self.running_tag: run += 1 elif status in self.complete_tag: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') else: fail += 1 + self.badstatus = status #control other finished job for id in list(self.submitted_ids): if id not in ongoing: + if self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_{id}'): + os.symlink(f'{self.run_dir}/dmtcp_{id}', f'{self.run_dir}/dmtcp_fail') status = self.check_termination(id) if status == 'wait': run += 1 elif status == 'resubmit': idle += 1 + elif self.checkpointing and os.path.exists(f'{self.run_dir}/dmtcp_fail'): + target = os.readlink(f'{self.run_dir}/dmtcp_fail') + os.unlink(f'{self.run_dir}/dmtcp_fail') + os.symlink(target, f'{self.run_dir}/dmtcp_{id}_fail') + logger.info(f'Checkpoints stored at {self.run_dir}/dmtcp_{id}_fail') return idle, run, self.submitted - (idle+run+fail), fail @@ -1990,6 +2246,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail @@ -2208,6 +2465,7 @@ def control(self, me_dir): idle +=1 else: fail += 1 + self.badstatus = status2 return idle, run, self.submitted - (idle+run+fail), fail diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_runs.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_runs.py index b1e8c88eac..3e0e7385a5 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_runs.py @@ -24,6 +24,9 @@ import re import logging from six.moves import range +import random +import time + try: import madgraph @@ -84,6 +87,7 @@ def sum_multichannel(self, channel): """Looks in channel to see if there are multiple runs that need to be combined. If so combines them into single run""" + start = time.time() alphabet = "abcdefghijklmnopqrstuvwxyz" if os.path.exists(pjoin(channel, 'multijob.dat')): @@ -113,6 +117,7 @@ def sum_multichannel(self, channel): fsock.write('--------------------- Multi run with %s jobs. ---------------------\n' % njobs) for r in results: + fsock.write('job %s : %s %s +- %s %s\n' % (r.name, r.xsec, r.axsec,\ r.xerru, r.nunwgt)) @@ -120,19 +125,26 @@ def sum_multichannel(self, channel): #back out with the appropriate scaled weight to_clean = [] fsock = open(pjoin(channel, 'events.lhe'), 'w') - wgt = results.axsec / results.nunwgt + #wgt = results.axsec / results.nunwgt + maxwgt = results.axsec / results.nunwgt tot_nevents, nb_file = 0, 0 for result in results: + #misc.sprint('target:', result.axsec/result.nunwgt) + #misc.sprint('job %s : %s %s +- %s: %s' % (result.name, result.xsec, result.axsec,\ + # result.xerru, result.nunwgt)) + + + ratio = result.nunwgt/results.nunwgt i = result.name if channel.endswith(os.path.pathsep): path = channel[:-1] + i else: path = channel + i - nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt) + nw = self.copy_events(fsock, pjoin(path,'events.lhe'), ratio, maxwgt) tot_nevents += nw nb_file += 1 to_clean.append(path) - logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel) + logger.debug("Combined %s file generating %s events for %s (%.1f%%): (%fs) " , nb_file, tot_nevents, channel, 100*tot_nevents/results.nunwgt, time.time()-start) for path in to_clean: try: shutil.rmtree(path) @@ -148,27 +160,55 @@ def get_fortran_str(nb): return '%.7fE%+03i' %(nb,power) - def copy_events(self, fsock, input, new_wgt): + def copy_events(self, fsock, input, scale_wgt, max_wgt): """ Copy events from separate runs into one file w/ appropriate wgts""" + import collections + wgts = collections.defaultdict(int) - new_wgt = self.get_fortran_str(new_wgt) + + do_unweight = True + #tmp_max_wgt = 0 + #new_wgt = self.get_fortran_str(new_wgt) old_line = "" nb_evt =0 + skip = False + nb_read = 0 for line in open(input): if old_line.startswith(""): - nb_evt+=1 + nb_read +=1 data = line.split() if not len(data) == 6: raise MadGraph5Error("Line after should have 6 entries") - if float(data[2]) > 0: + + new_wgt = float(data[2]) * scale_wgt + wgts[new_wgt] +=1 + if new_wgt < 0: + sign = '-' + else: sign = '' + new_wgt = abs(new_wgt) + skip = False + #if new_wgt > tmp_max_wgt: + #misc.sprint("Found event with wgt %s higher than max wgt %s. uwgt to %s " % (new_wgt, tmp_max_wgt, max_wgt)) + # tmp_max_wgt = new_wgt + if do_unweight and abs(new_wgt) < random.random() * max_wgt: + skip = True else: - sign = '-' - line= ' %s %s%s %s\n' % (' '.join(data[:2]), sign, - new_wgt, ' '.join(data[3:])) - fsock.write(line) + nb_evt+=1 + if do_unweight: + new_wgt = max(max_wgt, new_wgt) + + new_wgt = self.get_fortran_str(new_wgt) + line= ' %s %s%s %s\n' % (' '.join(data[:2]), + sign, new_wgt, ' '.join(data[3:])) + if not skip and old_line: + fsock.write(old_line) old_line = line + if not skip and old_line: + fsock.write(old_line) + #misc.sprint("Read %s events, wrote %s events: %s%%" % (nb_read, nb_evt, 100*nb_evt/nb_read if nb_read else 0)) + #misc.sprint(wgts) return nb_evt def get_channels(self, proc_path): diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py index 8de498fcc2..8633508085 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py @@ -658,6 +658,7 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'syscalc_path': './SysCalc', 'rivet_path': None, 'yoda_path': None, + 'dmtcp': None, 'lhapdf': 'lhapdf-config', 'lhapdf_py2': None, 'lhapdf_py3': None, @@ -668,10 +669,13 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'web_browser':None, 'eps_viewer':None, 'text_editor':None, + 'use_pigz':None, 'fortran_compiler':None, 'cpp_compiler': None, 'auto_update':7, + 'checkpointing': False, 'cluster_type': 'condor', + 'cluster_vacatetime': '120', 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, @@ -750,6 +754,14 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] + if self.options['checkpointing'] and \ + ('dmtcp' not in self.options or not self.options['dmtcp']): + if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: + self.options['dmtcp'] = pjoin(self.options['mg5_path'], 'HEPTools', 'DMTCP') + else: + from madgraph import MG5DIR + self.options['dmtcp'] = pjoin(MG5DIR, 'HEPTools', 'DMTCP') + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) @@ -3562,7 +3574,7 @@ def do_set(self, line, log=True): raise self.InvalidCmd('run_mode should be 0, 1 or 2.') self.cluster_mode = int(args[1]) self.options['run_mode'] = self.cluster_mode - elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path']: + elif args[0] in ['cluster_type', 'cluster_queue', 'cluster_temp_path', 'cluster_vacatetime']: if args[1] == 'None': args[1] = None self.options[args[0]] = args[1] @@ -3841,8 +3853,24 @@ def static_compute_widths(line, interface, path=None): def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - - return {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + default = {'cross': self.results.current['cross'], 'error': self.results.current['error']} + + try: + custom_scan = misc.plugin_import('custom_scan', + 'custom scan entry can be defined in custom_scan.py via the function custom_store_scan_result', + fcts=['custom_store_scan_result']) + except Exception as e: + custom_scan = None + + if custom_scan: + try: + default.update(custom_scan(self)) + except Exception as e: + logger.error('Error while adding custom scan results: %s: %s',type(e), e) + return default + + return default def add_error_log_in_html(self, errortype=None): @@ -4078,7 +4106,7 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo if self.options[key] in ['False', 'True']: self.allow_notification_center =ast.literal_eval(self.options[key]) self.options[key] =ast.literal_eval(self.options[key]) - elif key not in ['text_editor','eps_viewer','web_browser','stdout_level', + elif key not in ['text_editor','eps_viewer','use_pigz','web_browser','stdout_level', 'complex_mass_scheme', 'gauge', 'group_subprocesses']: # Default: try to set parameter try: @@ -4089,6 +4117,9 @@ def set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo # Configure the way to open a file: misc.open_file.configure(self.options) + + # Configure the way to compress a file: + misc.configure_gzip(self.options) # update the path to the PLUGIN directory of MG% if MADEVENT and 'mg5_path' in self.options and self.options['mg5_path']: @@ -7384,7 +7415,11 @@ def do_add(self, line): if card in self.modified_card: self.write_card(card) self.modified_card.discard(card) - + elif os.path.basename(card.replace('_card.dat','')) in self.modified_card: + self.write_card(os.path.basename(card.replace('_card.dat',''))) + self.modified_card.discard(os.path.basename(card.replace('_card.dat',''))) + card = os.path.basename(card.replace('_card.dat','')) + if card in self.paths: path = self.paths[card] elif os.path.exists(card): @@ -7411,6 +7446,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos elif args[1].startswith('--line_position='): @@ -7422,6 +7458,7 @@ def do_add(self, line): split.insert(pos, newline) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(pos, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = pos @@ -7429,12 +7466,14 @@ def do_add(self, line): # write the line at the first not commented line text = open(path).read() split = text.split('\n') + posline = -1 for posline,l in enumerate(split): if not l.startswith('#'): break split.insert(posline, line.split(None,2)[2]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') self.last_editline_pos = posline @@ -7445,6 +7484,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''replace_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7457,13 +7497,14 @@ def do_add(self, line): # need to check if the a fail savety is present new_line = re.split(search_pattern,line)[-1].strip() if new_line.startswith(('--before_line=','--after_line')): - search_pattern=r'''(?:before|after)_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' + search_pattern=r'''(?:before|after)_line=(?P["']?)(?:(?=(\\?))\2.)*?\1''' new_line = re.split(search_pattern,new_line)[-1] # overwrite the previous line old_line = split[posline] split[posline] = new_line ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() logger.info("Replacing the line \"%s\" [line %d of %s] by \"%s\"" % (old_line, posline, card, new_line ),'$MG:BOLD') self.last_editline_pos = posline @@ -7476,6 +7517,7 @@ def do_add(self, line): search_pattern=r'''comment_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[14:-1] nb_mod = 0 + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): split[posline] = '#%s' % l @@ -7487,6 +7529,7 @@ def do_add(self, line): logger.warning('no line commented (no line matching)') ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() self.last_editline_pos = posline @@ -7497,6 +7540,7 @@ def do_add(self, line): split = text.split('\n') search_pattern=r'''before_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[13:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7505,7 +7549,8 @@ def do_add(self, line): split.insert(posline, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, line.split(None,2)[2] ),'$MG:BOLD') + ff.close() + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline elif args[1].startswith('--after_line='): @@ -7514,6 +7559,7 @@ def do_add(self, line): split = text.split('\n') search_pattern = r'''after_line=(?P["'])(?:(?=(\\?))\2.)*?\1''' pattern = r'^\s*' + re.search(search_pattern, line).group()[12:-1] + posline = -1 for posline,l in enumerate(split): if re.search(pattern, l): break @@ -7522,8 +7568,9 @@ def do_add(self, line): split.insert(posline+1, re.split(search_pattern,line)[-1]) ff = open(path,'w') ff.write('\n'.join(split)) + ff.close() - logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, line.split(None,2)[2] ),'$MG:BOLD') + logger.info("writting at line %d of the file %s the line: \"%s\"" %(posline+1, card, re.split(search_pattern,line)[-1] ),'$MG:BOLD') self.last_editline_pos = posline+1 else: diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_driver.sh b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_driver.sh new file mode 100644 index 0000000000..c51f9e55c1 --- /dev/null +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_driver.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +# Check if shared directory is set +if [ -z "${SHARED_DIR+x}" ]; then + out="/dev/null" + echo "$(date) - Shared disk disabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$PWD/dmtcp_$CONDOR_ID" +else + if [ -d "$SHARED_DIR" ]; then + out="$SHARED_DIR/condor_$CONDOR_ID.out" + echo "$(date) - Shared disk enabled" | tee -a $out + export DMTCP_CHECKPOINT_DIR="$SHARED_DIR/dmtcp_$CONDOR_ID" + cd "$SHARED_DIR" + else + exit 0 + fi +fi + +tarCounter=0 +while [[ (-f MadLoop5_resources.tar.gz) && (! -f MadLoop5_resources/HelConfigs.dat) && ($tarCounter < 10) ]]; do + if [[ $tarCounter > 0 ]]; then + sleep 2s + fi + tar -xzf MadLoop5_resources.tar.gz >/dev/null 2>&1 + tarCounter=$[$tarCounter+1] +done + +if [[ (-e MadLoop5_resources.tar.gz) && (! -e MadLoop5_resources/HelConfigs.dat) ]]; then + echo "Cannot untar and unzip file `pwd`/MadLoop5_resources.tar.gz." > log.txt + exit +fi + +mkdir -p "$DMTCP_CHECKPOINT_DIR" +if compgen -G "G*" > /dev/null; then + cd G* || exit 1 +fi + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." | tee -a $out + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" | tee -a $out 2>&1 + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." | tee -a $out + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." | tee -a $out + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." | tee -a $out + fi + script -qfc "dmtcp_command --quit" | tee -a $out 2>&1 + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" SIGTERM + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${CONDOR_RESTART_COUNT}" | tee -a $out + script -qfc "/bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh \ + -d $DMTCP_CHECKPOINT_DIR -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" | tee -a $out 2>&1 & +else + export EXECUTE="dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" | tee -a $out 2>&1 & +fi + +wait + +echo "$(date) - Exit" | tee -a $out +exit 0 diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh new file mode 100644 index 0000000000..dfef57a90e --- /dev/null +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_condor_preexec.sh @@ -0,0 +1,7 @@ +DAGMANPATH=$1 +DAGMANFLOW=$2 + +DAGMANJOBID="$(condor_q -nobatch -autoformat ClusterId \ + -const "regexp(\"${DAGMANFLOW}\", Arguments) && regexp(\"condor_dagman\", Cmd)" | head -n1)" + +mkdir -p $DAGMANPATH/dmtcp_$DAGMANJOBID diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh new file mode 100644 index 0000000000..fba394925c --- /dev/null +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +export PATH="$DMTCP_PATH/bin:$PATH" +export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" + +count=0 +while [ -d "$RUN_DIR/dmtcp_fail" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for $RUN_DIR/dmtcp_fail to disappear..." + sleep 20 + ((count++)) +done + +export DMTCP_CHECKPOINT_DIR="$RUN_DIR/dmtcp_$SLURM_JOB_ID" +mkdir -p "$DMTCP_CHECKPOINT_DIR" + +dmtcp_coordinator -i 86400 --daemon --exit-on-last -p 0 --port-file "$DMTCP_CHECKPOINT_DIR/dmtcp.port" 1>/dev/null 2>&1 +export DMTCP_COORD_HOST=$(hostname) +export DMTCP_COORD_PORT=$(cat "$DMTCP_CHECKPOINT_DIR/dmtcp.port") + +timeout() { + echo "$(date) - Approaching walltime. Creating checkpoint..." + if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + fi + script -qfc "dmtcp_command -bcheckpoint" + count=0 + while [ ! -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ] && [ $count -lt 10 ]; do + echo "$(date) - Waiting for checkpoint..." + sleep 20 + ((count++)) + done + if [ $count -eq 10 ]; then + mv $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh + echo "$(date) - Checkpoint creation failed. Requeuing..." + else + rm $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script_prev.sh + echo "$(date) - Checkpoint created. Requeuing..." + fi + script -qfc "dmtcp_command --quit" + sleep 2 + scontrol requeue $SLURM_JOB_ID + sleep 10 + exit 85 +} + +# Trap signals +trap "timeout" USR1 + +if [[ -e "$DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh" ]]; then + echo "$(date) - Resuming from checkpoint. Restart: ${SLURM_RESTART_COUNT}" + script -qfc "srun /bin/bash $DMTCP_CHECKPOINT_DIR/dmtcp_restart_script.sh -h $DMTCP_COORD_HOST -p $DMTCP_COORD_PORT" & +else + export EXECUTE="srun dmtcp_launch --allow-file-overwrite $@" + script -qfc "$EXECUTE" & +fi + +wait + +echo "$(date) - Calculation finished. Cleanup..." + +link="$DMTCP_CHECKPOINT_DIR" + +while [ -L "$link" ]; do + next=$(readlink "$link") + rm "$link" + link="$next" +done + +rm -r "$link" + +echo "$(date) - Exit" +exit 0 diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py index c321fd88e5..0826131902 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py @@ -343,11 +343,24 @@ def get_names(self): names = names + dir(aclass) return names - def complete_help(self, *args): - return self.completenames(*args) + def complete_help(self, text, line, begidx, endidx): + + full_arg = self.split_arg(line[0:begidx]) + #print("full_arg:", full_arg , text, line, begidx, endidx) + # Format + if len(full_arg) < 1: + return self.completenames(text, line, begidx, endidx) + elif len(full_arg) == 2 : + options = [name[5:] for name in dir(self) if name.startswith('%s2_' % full_arg[1])] + return self.list_completion(text, options) + else: + return + + #return self.completenames(text, line, begidx, endidx) def do_help(self, arg): - if arg: + sarg = arg.strip().split() + if len(sarg) ==1: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) @@ -362,6 +375,20 @@ def do_help(self, arg): self.stdout.write("%s\n"%str(self.nohelp % (arg,))) return func() + elif len(sarg) == 2: + try: + func = getattr(self, 'help_' + sarg[0]+ '2_' + sarg[1]) + except AttributeError: + try: + doc=getattr(self, '%s2_%s' % (sarg[0], sarg[1])).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() else: names = self.get_names() cmds_doc = [] diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py index 3061b007e7..7c70267de4 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py @@ -151,7 +151,12 @@ def cp(path1, path2, log=True, error=False): logger.debug('no cp since identical: %s', why) return except IOError as why: - import madgraph.various.misc as misc + try: + import madgraph + except ImportError: + import internal.misc as misc + else: + import madgraph.various.misc as misc try: if 'same file' in str(why): return @@ -192,7 +197,6 @@ def mv(path1, path2): if os.path.isfile(path2): os.remove(path2) shutil.move(path1, path2) - return elif os.path.isdir(path2) and os.path.exists( os.path.join(path2, os.path.basename(path1))): path2 = os.path.join(path2, os.path.basename(path1)) @@ -200,7 +204,12 @@ def mv(path1, path2): shutil.move(path1, path2) else: raise - + + # ensure that the mtime of the destination is updated + from pathlib import Path + Path(path2).touch() + return + def put_at_end(src, *add): with open(src,'ab') as wfd: diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py index 51e04d5086..27b52b42ce 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py @@ -2264,7 +2264,7 @@ def do_display(self, line, output=sys.stdout): outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): - value = self.options[key] + value = self.options.get(key, None) if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: @@ -2943,6 +2943,8 @@ def collect_decay_widths(self): except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] + if not os.path.exists(pjoin(self.me_dir, 'Events', run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', run_name)) self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) @@ -3675,7 +3677,7 @@ def do_refine(self, line): devnull.close() ############################################################################ - def do_comine_iteration(self, line): + def do_combine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step S is for survey R is for refine @@ -3794,7 +3796,7 @@ def split(a, n): nb_G = len(Gdirs) // nb_chunk for i, local_G in enumerate(split(Gdirs, nb_chunk)): - line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] + line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) line.append(str(self.results.current.get('axsec'))) line += local_G @@ -3814,10 +3816,12 @@ def split(a, n): AllEvent.add(*data) start_unweight= time.perf_counter() - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) #cleaning for data in partials_info: @@ -3851,10 +3855,12 @@ def split(a, n): if len(AllEvent) == 0: nb_event = 0 else: - nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) + logger.debug("unweight done. start zipping after %.1f s", time.time()-start) + misc.gzip(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe")) if nb_event < self.run_card['nevents']: logger.warning("failed to generate enough events. Please follow one of the following suggestions to fix the issue:") @@ -3910,7 +3916,8 @@ def do_combine_events_partial(self, line, preprocess_only=False): result.get('xsec'), result.get('xerru'), result.get('axsec') - ) + ) + if preprocess_only: return output, sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), sum_axsec nb_event = max(min(abs(1.01*self.run_card['nevents']*sum_axsec/cross),self.run_card['nevents']), 10) @@ -5052,9 +5059,20 @@ def wait_monitoring(Idle, Running, Done): # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - - os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ - [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + + all_files = [pjoin(tmp_dir, 'header.hepmc')] + all_hepmc_files + [pjoin(tmp_dir, 'tail.hepmc')] + return_code = os.system(' '.join(['cat'] + all_files + ['>',hepmc_output])) + if return_code != 0: + # max 20 files can be concatenated at once + n_files = len(all_files) + step = 20 + intermediate_files = [] + for i in range(0, n_files, step): + part_files = all_files[i:i+step] + return_code = os.system(' '.join(['cat'] + part_files + ['>' if i == 0 else '>>', hepmc_output])) + if return_code != 0: + raise MadGraph5Error('Error during merging of HEPMC files.') + # We are done with the parallelization directory. Clean it. if os.path.isdir(parallelization_dir): @@ -5635,6 +5653,19 @@ def do_plot(self, line): else: logger.info('No valid files for delphes plot') + def do_compile(self, line): + """compile the current directory """ + + args = self.split_arg(line) + self.ask_run_configuration(mode='parton') + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + self.configure_directory(html_opening =False) + + for Pdir in self.get_Pdir(): + misc.sprint(Pdir) + self.compile(['gensym'], cwd=Pdir) + self.compile(['madevent_forhel'], cwd=Pdir) + ############################################################################ def do_syscalc(self, line): """Evaluate systematics variation weights for a given run""" diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/misc.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/misc.py index e7fd60be0d..d32a17c825 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/misc.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/misc.py @@ -964,6 +964,9 @@ def deco_f(arg, *args, **opt): # raise a more meaningfull error message raise Exception('%s fails with no such file or directory' \ % arg) + # Checkpoint, requeued automatically + elif error.errno == 85: + logger.info('%s created a checkpoint' % arg) else: raise return deco_f @@ -1236,10 +1239,15 @@ def gunzip(path, keep=False, stdout=None): #for large file (>1G) it is faster and safer to use a separate thread if os.path.getsize(path) > 1e8: + if keep: + options = '-k ' + else: + options = '' + if stdout: - os.system('gunzip -c %s > %s' % (path, stdout)) + os.system('gunzip %s -c %s > %s' % (options, path, stdout)) else: - os.system('gunzip %s' % path) + os.system('gunzip %s %s' % (options, path)) return 0 if not stdout: @@ -1264,18 +1272,54 @@ def gunzip(path, keep=False, stdout=None): os.remove(path) return 0 +_gzip_tool = 'gzip' +_gzip_tool_supports_multithreading = False +_gzip_tool_max_cores = None + +def configure_gzip(configuration=None): + if not configuration: + configuration = {} + + # Set some default values, in case the keys are missing from the configuration + configuration = {'use_pigz': None, 'nb_core': None} | configuration + + global _gzip_tool, _gzip_tool_supports_multithreading, _gzip_tool_max_cores + + use_pigz = configuration['use_pigz'] + if use_pigz is None: + # Try using pigz if possible, fall back to gzip otherwise + _gzip_tool = open_file.find_valid(['pigz', 'gzip'], 'gzip') + elif use_pigz: + _gzip_tool = open_file.find_valid(['pigz'], 'pigz') + if not which(_gzip_tool): + logger.warning('Could not find valid `pigz` executable.') + else: + _gzip_tool = open_file.find_valid(['gzip'], 'gzip') + if not which(_gzip_tool): + logger.warning('Could not find valid `gzip` executable.') + + # If we use the pigz binary, enable multithreading support + if 'pigz' in _gzip_tool: + _gzip_tool_supports_multithreading = True + if configuration['nb_core'] is not None: + _gzip_tool_max_cores = configuration['nb_core'] + def gzip(path, stdout=None, error=True, forceexternal=False): """ a standard replacement for os.system('gzip %s ' % path)""" - - #for large file (>1G) it is faster and safer to use a separate thread - if os.path.getsize(path) > 1e9 or forceexternal: - call(['gzip', '-f', path]) + + # For large files (>256M), it is faster and safer to use a separate tool. + if os.path.getsize(path) > 256e6 or forceexternal: + if _gzip_tool_supports_multithreading and _gzip_tool_max_cores is not None: + call([_gzip_tool, '-p', str(_gzip_tool_max_cores), '-f', path]) + else: + call([_gzip_tool, '-f', path]) + if stdout: if not stdout.endswith(".gz"): stdout = "%s.gz" % stdout shutil.move('%s.gz' % path, stdout) return - + if not stdout: stdout = "%s.gz" % path elif not stdout.endswith(".gz"): diff --git a/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h index 059246e1cd..394420e3db 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc index ae6493a5bc..4084847009 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h index e2b1a06ed0..251021582f 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt b/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt index 0c69de3236..38afef0e1a 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt +++ b/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt @@ -1,6 +1,3 @@ -Note that this is a development version. -This version is intended for development/beta testing and NOT for production. -This version has not been fully tested (if at all) and might have limited user support (if at all) Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ @@ -15,11 +12,8 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.4 2025-09-13 * -* * -* WARNING: UNKNOWN DEVELOPMENT VERSION. * -* WARNING: DO NOT USE FOR PRODUCTION * -* * +* VERSION 3.6.7 2026-01-05 * +* GIT v3.6.7 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -48,7 +42,8 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt.mg +Using default gzip "pigz". Set another one in ./input/mg5_configuration.txt +import /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -56,7 +51,7 @@ set zerowidth_tchannel F import model MSSM_SLHA2 INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.625882625579834  +DEBUG: model prefixing takes 0.1538560390472412  INFO: Restrict model MSSM_SLHA2 with file models/MSSM_SLHA2/restrict_default.dat . INFO: Detect SLHA2 format. keeping restricted parameter in the param_card DEBUG: Simplifying conditional expressions  @@ -552,13 +547,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.077 s +1 processes with 3 diagrams generated in 0.036 s Total: 1 processes with 3 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_susy_gg_tt Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 175]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180]  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt +INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 @@ -567,30 +562,30 @@ INFO: Processing color information for process: g g > t t~ @1 DEBUG: type(fortran_model)= [output.py at line 224]  DEBUG: type(me)= me=0 [output.py at line 225]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'color_sum.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.h', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'cudacpp_overlay.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 226]  -INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/. -Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s +INFO: Creating files in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/. +Generated helas calls for 1 subprocesses (3 diagrams) in 0.002 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 2 routines in 0.094 s +ALOHA: aloha creates 2 routines in 0.038 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h +FileWriter for /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. +INFO: /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/master/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. quit -real 0m1.851s -user 0m1.757s -sys 0m0.085s -Code generation completed in 2 seconds +real 0m0.744s +user 0m0.688s +sys 0m0.043s +Code generation completed in 1 seconds diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc index b88ebd5b4a..a1dce81301 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h index 256c5780e4..dcae2c156e 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h index 059246e1cd..394420e3db 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc index ae6493a5bc..4084847009 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h index e2b1a06ed0..251021582f 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.4, 2025-09-13 +// MadGraph5_aMC@NLO v. 3.6.7, 2026-01-05 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //==========================================================================