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 d2dba08431..7c2ebe201b 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg +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 @@ -58,7 +56,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.003051280975341797  +DEBUG: model prefixing takes 0.0013585090637207031  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 +148,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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -179,19 +177,19 @@ INFO: Finding symmetric diagrams for subprocess group epem_mupmum DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1749]  -Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s -Wrote files for 8 helas calls in 0.049 s +Generated helas calls for 1 subprocesses (2 diagrams) in 0.002 s +Wrote files for 8 helas calls in 0.024 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.112 s +ALOHA: aloha creates 3 routines in 0.058 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.184 s +ALOHA: aloha creates 7 routines in 0.071 s FFV1 FFV1 FFV2 @@ -200,32 +198,32 @@ ALOHA: aloha creates 7 routines in 0.184 s FFV4 FFV2_4 FFV2_4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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 0m1.899s -user 0m1.615s -sys 0m0.272s -Code generation completed in 2 seconds +real 0m1.066s +user 0m0.837s +sys 0m0.160s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -238,7 +236,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -247,9 +245,9 @@ Code generation completed in 2 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -268,7 +266,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -277,9 +275,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 b3ab00b31d..9babf6a00f 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt +++ b/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/ee_mumu.mad/Source/gen_ximprove.f b/epochX/cudacpp/ee_mumu.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 fe8aef0c2c..87b9c38f19 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b590074a0a..0a2aacf954 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 1e083ecd15..e58cfa279b 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 cf12adfab5..75ed931430 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -175,10 +176,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -187,15 +198,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -228,7 +230,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -362,7 +364,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 fa57230d40..add0aee597 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -342,6 +342,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/addmothers.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine.sh b/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/survey.sh b/epochX/cudacpp/ee_mumu.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/ee_mumu.mad/bin/cleanall b/epochX/cudacpp/ee_mumu.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/cleanall +++ b/epochX/cudacpp/ee_mumu.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/clean b/epochX/cudacpp/ee_mumu.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/clean +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/clean_template b/epochX/cudacpp/ee_mumu.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/clean_template +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_grid.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/ee_mumu.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/eval.sh b/epochX/cudacpp/ee_mumu.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/make_gridpack b/epochX/cudacpp/ee_mumu.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/ee_mumu.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/monitor b/epochX/cudacpp/ee_mumu.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/monitor +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/multicore b/epochX/cudacpp/ee_mumu.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/multicore +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/plot b/epochX/cudacpp/ee_mumu.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/plot +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data b/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_combine b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_combine +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes3 b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_genissud b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_pgs b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/save_load_object.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/shower_card.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/store4grid b/epochX/cudacpp/ee_mumu.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/store4grid +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/systematics.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/ee_mumu.mad/bin/newprocess_mg5 b/epochX/cudacpp/ee_mumu.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/ee_mumu.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h b/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h index 94f80ce439..329f268fe4 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 94ae7cdfa1..333f3d060e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ce6f4e2baf..361d630800 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d052f70ef1..95822eee3f 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,7 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode +('WARNING: loading of madgraph too slow!!!', 0.613072395324707) Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +14,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +48,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu.mg +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 +57,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.0037975311279296875  +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  @@ -150,13 +149,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.004 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/copilot-igraph/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 +164,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/. -Generated helas calls for 1 subprocesses (2 diagrams) in 0.005 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.146 s +ALOHA: aloha creates 4 routines in 0.072 s FFV1 FFV1 FFV2 @@ -184,17 +183,17 @@ ALOHA: aloha creates 4 routines in 0.146 s FFV4 FFV2_4 FFV2_4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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 0m0.591s -user 0m0.503s -sys 0m0.085s -Code generation completed in 0 seconds +real 0m0.863s +user 0m0.764s +sys 0m0.066s +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 ac578a326e..17e2d2b317 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b590074a0a..0a2aacf954 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 94f80ce439..329f268fe4 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 94ae7cdfa1..333f3d060e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ce6f4e2baf..361d630800 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d3995ceb3f..96fd497cbd 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg +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 @@ -58,7 +56,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.0037679672241210938  +DEBUG: model prefixing takes 0.001474142074584961  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  @@ -151,21 +149,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.016 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -180,46 +178,46 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1749]  -Generated helas calls for 1 subprocesses (3 diagrams) in 0.007 s -Wrote files for 10 helas calls in 0.074 s +Generated helas calls for 1 subprocesses (3 diagrams) in 0.002 s +Wrote files for 10 helas calls in 0.024 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.142 s +ALOHA: aloha creates 2 routines in 0.044 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.154 s +ALOHA: aloha creates 4 routines in 0.037 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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.703s -user 0m2.247s -sys 0m0.431s -Code generation completed in 3 seconds +real 0m0.993s +user 0m0.801s +sys 0m0.161s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -232,7 +230,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -241,9 +239,9 @@ Code generation completed in 3 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -262,7 +260,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -271,9 +269,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 38c1f98839..1b704acb15 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/gg_tt.mad/Source/gen_ximprove.f b/epochX/cudacpp/gg_tt.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/gg_tt.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 db2341b9c3..06545eeea7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b3c3d0ffb4..e56be6ca7a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6c6b37db2c..ab6d6fc303 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 7cf597b197..dfe6070d57 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 a6ff6ae67f..0f144672fd 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -324,6 +324,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/addmothers.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/refine.sh b/epochX/cudacpp/gg_tt.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/gg_tt.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/survey.sh b/epochX/cudacpp/gg_tt.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_tt.mad/bin/cleanall b/epochX/cudacpp/gg_tt.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/cleanall +++ b/epochX/cudacpp/gg_tt.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/gg_tt.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/clean b/epochX/cudacpp/gg_tt.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/clean +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/clean_template b/epochX/cudacpp/gg_tt.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/clean_template +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/gg_tt.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/combine_grid.py b/epochX/cudacpp/gg_tt.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/gg_tt.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/eval.sh b/epochX/cudacpp/gg_tt.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/make_gridpack b/epochX/cudacpp/gg_tt.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/gg_tt.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py b/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/monitor b/epochX/cudacpp/gg_tt.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/monitor +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/multicore b/epochX/cudacpp/gg_tt.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/multicore +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/plot b/epochX/cudacpp/gg_tt.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/plot +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/gg_tt.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data b/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_combine b/epochX/cudacpp/gg_tt.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_combine +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes b/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes3 b/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_genissud b/epochX/cudacpp/gg_tt.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/gg_tt.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_pgs b/epochX/cudacpp/gg_tt.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/save_load_object.py b/epochX/cudacpp/gg_tt.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/shower_card.py b/epochX/cudacpp/gg_tt.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/store4grid b/epochX/cudacpp/gg_tt.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/store4grid +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/systematics.py b/epochX/cudacpp/gg_tt.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/gg_tt.mad/bin/newprocess_mg5 b/epochX/cudacpp/gg_tt.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/gg_tt.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h index a27cb3d465..eff1de12cc 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 03baca7cb7..b7d4d158bd 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 231c76043d..62c4a6b21c 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 8f9e676441..61f2b9e9cf 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt.mg +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 @@ -58,7 +56,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.003092527389526367  +DEBUG: model prefixing takes 0.0013606548309326172  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  @@ -151,13 +149,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.005 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/copilot-igraph/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 @@ -166,30 +164,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/. -Generated helas calls for 1 subprocesses (3 diagrams) in 0.004 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.104 s +ALOHA: aloha creates 2 routines in 0.039 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.513s -user 0m0.447s -sys 0m0.065s -Code generation completed in 1 seconds +real 0m0.259s +user 0m0.215s +sys 0m0.042s +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 aae153e603..a182f7c622 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b3c3d0ffb4..e56be6ca7a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 a27cb3d465..eff1de12cc 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 03baca7cb7..b7d4d158bd 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 231c76043d..62c4a6b21c 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 cc9c748aea..45c3ebaea0 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg +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 @@ -58,7 +56,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.003180265426635742  +DEBUG: model prefixing takes 0.001375436782836914  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  @@ -151,7 +149,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.007 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. @@ -159,21 +157,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.016 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -201,22 +199,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1749]  -Generated helas calls for 2 subprocesses (19 diagrams) in 0.039 s -Wrote files for 46 helas calls in 0.179 s +Generated helas calls for 2 subprocesses (19 diagrams) in 0.014 s +Wrote files for 46 helas calls in 0.062 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.226 s +ALOHA: aloha creates 5 routines in 0.095 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.205 s +ALOHA: aloha creates 10 routines in 0.098 s VVV1 VVV1 FFV1 @@ -226,32 +224,32 @@ ALOHA: aloha creates 10 routines in 0.205 s VVVV1 VVVV3 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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 0m3.146s -user 0m2.680s -sys 0m0.410s -Code generation completed in 3 seconds +real 0m1.254s +user 0m1.046s +sys 0m0.194s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -264,7 +262,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -273,9 +271,9 @@ Code generation completed in 3 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -294,7 +292,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -303,9 +301,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 de51114026..e6421848f3 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/gg_tt01g.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/gen_ximprove.f b/epochX/cudacpp/gg_tt01g.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/gg_tt01g.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 db2341b9c3..06545eeea7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b3c3d0ffb4..e56be6ca7a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6c6b37db2c..ab6d6fc303 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 7cf597b197..dfe6070d57 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 a6ff6ae67f..0f144672fd 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -324,6 +324,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 c920229c65..9ce9e1ffcc 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d248effd6c..37b33b84ca 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 4282896667..e9c36eb5e7 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 b29c6aeca2..283a4e88e5 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 41a39a13ca..10d76834de 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -340,6 +340,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/addmothers.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine.sh b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/survey.sh b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/cleanall b/epochX/cudacpp/gg_tt01g.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/cleanall +++ b/epochX/cudacpp/gg_tt01g.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean b/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean_template b/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean_template +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_grid.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/gg_tt01g.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/eval.sh b/epochX/cudacpp/gg_tt01g.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_gridpack b/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/monitor b/epochX/cudacpp/gg_tt01g.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/monitor +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/multicore b/epochX/cudacpp/gg_tt01g.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/multicore +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot b/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data b/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_combine b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_combine +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes3 b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_genissud b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_pgs b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/save_load_object.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/shower_card.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/store4grid b/epochX/cudacpp/gg_tt01g.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/store4grid +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/systematics.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/newprocess_mg5 b/epochX/cudacpp/gg_tt01g.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/gg_tt01g.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h index 05a248b9fd..58e67ff3f7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 e40c4635b8..067821f385 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg +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 @@ -58,7 +56,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.00511932373046875  +DEBUG: model prefixing takes 0.0016012191772460938  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  @@ -151,21 +149,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.017 s +1 processes with 16 diagrams generated in 0.007 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -180,22 +178,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxg DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1724]  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 1748]  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 1749]  -Generated helas calls for 1 subprocesses (16 diagrams) in 0.029 s -Wrote files for 36 helas calls in 0.102 s +Generated helas calls for 1 subprocesses (16 diagrams) in 0.012 s +Wrote files for 36 helas calls in 0.040 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.356 s +ALOHA: aloha creates 5 routines in 0.093 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.189 s +ALOHA: aloha creates 10 routines in 0.088 s VVV1 VVV1 FFV1 @@ -205,32 +203,32 @@ ALOHA: aloha creates 10 routines in 0.189 s VVVV1 VVVV3 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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.687s -user 0m2.344s -sys 0m0.324s -Code generation completed in 3 seconds +real 0m1.176s +user 0m0.977s +sys 0m0.166s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -243,7 +241,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -252,9 +250,9 @@ Code generation completed in 3 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -273,7 +271,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -282,9 +280,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 444f1253f8..65027e0088 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/gg_ttg.mad/Source/gen_ximprove.f b/epochX/cudacpp/gg_ttg.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/gg_ttg.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 e93eba2447..c5c84e6e4e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6ad3c7dd1e..dd8e1be989 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6dfa640d9e..0875d67f30 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 77820f0e51..e5ff5e3386 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 7388a4bf7e..117fe5ac23 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -340,6 +340,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/addmothers.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine.sh b/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/survey.sh b/epochX/cudacpp/gg_ttg.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttg.mad/bin/cleanall b/epochX/cudacpp/gg_ttg.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/cleanall +++ b/epochX/cudacpp/gg_ttg.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/clean b/epochX/cudacpp/gg_ttg.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/clean +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/clean_template b/epochX/cudacpp/gg_ttg.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/clean_template +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_grid.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/gg_ttg.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/eval.sh b/epochX/cudacpp/gg_ttg.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/make_gridpack b/epochX/cudacpp/gg_ttg.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/gg_ttg.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/monitor b/epochX/cudacpp/gg_ttg.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/monitor +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/multicore b/epochX/cudacpp/gg_ttg.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/multicore +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/plot b/epochX/cudacpp/gg_ttg.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/plot +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data b/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_combine b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_combine +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes3 b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_genissud b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_pgs b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/save_load_object.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/shower_card.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/store4grid b/epochX/cudacpp/gg_ttg.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/store4grid +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/systematics.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/gg_ttg.mad/bin/newprocess_mg5 b/epochX/cudacpp/gg_ttg.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/gg_ttg.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h index 05a248b9fd..58e67ff3f7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b6b3fce0e4..4b5df0a55c 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg.mg +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 @@ -58,7 +56,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.005330085754394531  +DEBUG: model prefixing takes 0.0013468265533447266  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  @@ -151,13 +149,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.023 s +1 processes with 16 diagrams generated in 0.007 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/copilot-igraph/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 @@ -166,18 +164,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/. -Generated helas calls for 1 subprocesses (16 diagrams) in 0.063 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.011 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.189 s +ALOHA: aloha creates 5 routines in 0.094 s VVV1 VVV1 FFV1 @@ -187,17 +185,17 @@ ALOHA: aloha creates 5 routines in 0.189 s VVVV1 VVVV3 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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 0m1.071s -user 0m0.866s -sys 0m0.192s -Code generation completed in 1 seconds +real 0m0.326s +user 0m0.291s +sys 0m0.034s +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 d1b99f37c2..d21803b311 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6ad3c7dd1e..dd8e1be989 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 05a248b9fd..58e67ff3f7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 7d81448797..78da4f28ba 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg +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 @@ -58,7 +56,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.0037353038787841797  +DEBUG: model prefixing takes 0.0013642311096191406  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  @@ -151,21 +149,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.107 s +1 processes with 123 diagrams generated in 0.053 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -180,22 +178,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxgg DEBUG: len(subproc_diagrams_for_config) =  105 [model_handling.py at line 1724]  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 1748]  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 1749]  -Generated helas calls for 1 subprocesses (123 diagrams) in 0.295 s -Wrote files for 222 helas calls in 0.444 s +Generated helas calls for 1 subprocesses (123 diagrams) in 0.128 s +Wrote files for 222 helas calls in 0.211 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.185 s +ALOHA: aloha creates 5 routines in 0.090 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.236 s +ALOHA: aloha creates 10 routines in 0.096 s VVV1 VVV1 FFV1 @@ -208,32 +206,32 @@ ALOHA: aloha creates 10 routines in 0.236 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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.446s -user 0m3.048s -sys 0m0.333s -Code generation completed in 3 seconds +real 0m1.634s +user 0m1.438s +sys 0m0.176s +Code generation completed in 2 seconds ************************************************************ * * * W E L C O M E to * @@ -246,7 +244,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -255,9 +253,9 @@ Code generation completed in 3 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -276,7 +274,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -285,9 +283,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 5ffde659c4..8d15ccaf25 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/gen_ximprove.f b/epochX/cudacpp/gg_ttgg.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/gg_ttgg.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 e90ff2af99..e5cb40fe76 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6ef3863ae3..11ac229c82 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 60ddbdbedd..c7eab90bec 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 3a363b9a2b..4e1f407dba 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 19b83eff7d..d18d07e0be 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -372,6 +372,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/addmothers.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine.sh b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/survey.sh b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/cleanall b/epochX/cudacpp/gg_ttgg.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/cleanall +++ b/epochX/cudacpp/gg_ttgg.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean b/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean_template b/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean_template +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_grid.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/gg_ttgg.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/eval.sh b/epochX/cudacpp/gg_ttgg.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_gridpack b/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/monitor b/epochX/cudacpp/gg_ttgg.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/monitor +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/multicore b/epochX/cudacpp/gg_ttgg.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/multicore +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot b/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data b/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_combine b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_combine +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes3 b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_genissud b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_pgs b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/save_load_object.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/shower_card.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/store4grid b/epochX/cudacpp/gg_ttgg.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/store4grid +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/systematics.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/newprocess_mg5 b/epochX/cudacpp/gg_ttgg.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/gg_ttgg.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h index 1ea801e9a2..d544201da7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b8b747dcaf..3cfe156060 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg.mg +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 @@ -58,7 +56,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.00394439697265625  +DEBUG: model prefixing takes 0.0013687610626220703  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  @@ -151,13 +149,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.135 s +1 processes with 123 diagrams generated in 0.051 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/copilot-igraph/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 @@ -166,18 +164,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/. -Generated helas calls for 1 subprocesses (123 diagrams) in 0.297 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.132 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.227 s +ALOHA: aloha creates 5 routines in 0.109 s VVV1 VVV1 FFV1 @@ -190,17 +188,17 @@ ALOHA: aloha creates 5 routines in 0.227 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.193s -user 0m1.092s -sys 0m0.096s +real 0m0.568s +user 0m0.522s +sys 0m0.041s 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 31b2a909f7..cb4b70b4fa 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6ef3863ae3..11ac229c82 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 1ea801e9a2..d544201da7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 11081fe610..4892665ffb 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg +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 @@ -58,7 +56,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.003200531005859375  +DEBUG: model prefixing takes 0.0013606548309326172  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  @@ -151,27 +149,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.330 s +1 processes with 1240 diagrams generated in 0.726 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 6s. Introduce 3030 contraction +INFO: Color-Flow passed to 1630 term in 2s. Introduce 3030 contraction DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1314]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h @@ -182,22 +180,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxggg DEBUG: len(subproc_diagrams_for_config) =  945 [model_handling.py at line 1724]  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 1748]  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 1749]  -Generated helas calls for 1 subprocesses (1240 diagrams) in 4.833 s -Wrote files for 2281 helas calls in 12.146 s +Generated helas calls for 1 subprocesses (1240 diagrams) in 2.374 s +Wrote files for 2281 helas calls in 5.735 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.090 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.180 s +ALOHA: aloha creates 10 routines in 0.093 s VVV1 VVV1 FFV1 @@ -210,32 +208,32 @@ ALOHA: aloha creates 10 routines in 0.180 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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 0m23.417s -user 0m22.882s -sys 0m0.409s -Code generation completed in 23 seconds +real 0m11.471s +user 0m11.194s +sys 0m0.238s +Code generation completed in 12 seconds ************************************************************ * * * W E L C O M E to * @@ -248,7 +246,7 @@ Code generation completed in 23 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -257,9 +255,9 @@ Code generation completed in 23 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -278,7 +276,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -287,9 +285,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 e1b2f3835b..9c8f90cc7e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/gen_ximprove.f b/epochX/cudacpp/gg_ttggg.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/gg_ttggg.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 c6619a0fa0..c4b4e52725 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 fbe1065f6b..b678725b81 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 7a436cbd5c..31305e5dba 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 0c9e5f7080..8c95df8c0f 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 e11cef7ff9..6864275105 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -436,6 +436,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/addmothers.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine.sh b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/survey.sh b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/cleanall b/epochX/cudacpp/gg_ttggg.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/cleanall +++ b/epochX/cudacpp/gg_ttggg.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean b/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean_template b/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean_template +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_grid.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/gg_ttggg.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/eval.sh b/epochX/cudacpp/gg_ttggg.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_gridpack b/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/monitor b/epochX/cudacpp/gg_ttggg.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/monitor +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/multicore b/epochX/cudacpp/gg_ttggg.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/multicore +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot b/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data b/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_combine b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_combine +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes3 b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_genissud b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_pgs b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/save_load_object.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/shower_card.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/store4grid b/epochX/cudacpp/gg_ttggg.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/store4grid +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/systematics.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/newprocess_mg5 b/epochX/cudacpp/gg_ttggg.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/gg_ttggg.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h index 1ea801e9a2..d544201da7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 14ddd64b84..21828f126a 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg.mg +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 @@ -58,7 +56,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.004296302795410156  +DEBUG: model prefixing takes 0.0013744831085205078  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  @@ -151,13 +149,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.487 s +1 processes with 1240 diagrams generated in 0.759 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/copilot-igraph/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 @@ -166,18 +164,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/. -Generated helas calls for 1 subprocesses (1240 diagrams) in 4.995 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.122 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.180 s +ALOHA: aloha creates 5 routines in 0.098 s VVV1 VVV1 FFV1 @@ -190,17 +188,17 @@ ALOHA: aloha creates 5 routines in 0.180 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.308s -user 0m9.042s -sys 0m0.122s -Code generation completed in 10 seconds +real 0m4.300s +user 0m4.218s +sys 0m0.063s +Code generation completed in 5 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 7de7d71e25..682a29e38e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 fbe1065f6b..b678725b81 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 1ea801e9a2..d544201da7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 780ea50154..501890d673 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg +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 @@ -57,7 +55,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.004786014556884766  +DEBUG: model prefixing takes 0.001352548599243164  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  @@ -166,21 +164,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.052 s +8 processes with 40 diagrams generated in 0.028 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -214,47 +212,47 @@ INFO: Finding symmetric diagrams for subprocess group gux_ttxux DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1749]  -Generated helas calls for 2 subprocesses (10 diagrams) in 0.022 s -Wrote files for 32 helas calls in 0.114 s +Generated helas calls for 2 subprocesses (10 diagrams) in 0.010 s +Wrote files for 32 helas calls in 0.055 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.095 s +ALOHA: aloha creates 2 routines in 0.045 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.074 s +ALOHA: aloha creates 4 routines in 0.040 s FFV1 FFV1 FFV1 FFV1 VVV1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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.221s -user 0m1.894s -sys 0m0.308s -Code generation completed in 2 seconds +real 0m1.107s +user 0m0.895s +sys 0m0.188s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -267,7 +265,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -276,9 +274,9 @@ Code generation completed in 2 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -297,7 +295,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -306,9 +304,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 7ba8666046..511e645a78 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/gq_ttq.mad/Source/gen_ximprove.f b/epochX/cudacpp/gq_ttq.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/gq_ttq.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 10bc00bbe1..a0b0246438 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ab9d7dde82..6e1f603859 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 37932e73a3..04e7573911 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 f252c024f6..8d94326aab 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -181,10 +182,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -193,15 +204,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -234,7 +236,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -370,7 +372,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 14fd0f0017..925a407d29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -361,6 +361,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 6cdb911a34..4da40be953 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 55c42cb947..8a9accd318 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 748758b702..3157dd5789 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 bb34349714..d63a797b50 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -181,10 +182,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -193,15 +204,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -234,7 +236,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -370,7 +372,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 784c7b3ebc..6e6ee30078 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -361,6 +361,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/addmothers.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine.sh b/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/survey.sh b/epochX/cudacpp/gq_ttq.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/gq_ttq.mad/bin/cleanall b/epochX/cudacpp/gq_ttq.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/cleanall +++ b/epochX/cudacpp/gq_ttq.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/clean b/epochX/cudacpp/gq_ttq.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/clean +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/clean_template b/epochX/cudacpp/gq_ttq.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/clean_template +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_grid.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/gq_ttq.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/eval.sh b/epochX/cudacpp/gq_ttq.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/make_gridpack b/epochX/cudacpp/gq_ttq.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/gq_ttq.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/monitor b/epochX/cudacpp/gq_ttq.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/monitor +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/multicore b/epochX/cudacpp/gq_ttq.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/multicore +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/plot b/epochX/cudacpp/gq_ttq.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/plot +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data b/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_combine b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_combine +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes3 b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_genissud b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_pgs b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/save_load_object.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/shower_card.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/store4grid b/epochX/cudacpp/gq_ttq.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/store4grid +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/systematics.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/gq_ttq.mad/bin/newprocess_mg5 b/epochX/cudacpp/gq_ttq.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/gq_ttq.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h b/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h index 6515142314..211530285d 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 53c661e0ea..0829e6074e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d4036e2d72..04c627baa8 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 e099e064a7..9f801e45ac 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq.mg +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 @@ -57,7 +55,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.0030565261840820312  +DEBUG: model prefixing takes 0.0013585090637207031  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  @@ -166,13 +164,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.056 s +8 processes with 40 diagrams generated in 0.026 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/copilot-igraph/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 @@ -189,40 +187,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/. -Generated helas calls for 2 subprocesses (10 diagrams) in 0.025 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.010 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.103 s +ALOHA: aloha creates 2 routines in 0.038 s FFV1 FFV1 FFV1 FFV1 VVV1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.601s -user 0m0.523s -sys 0m0.077s -Code generation completed in 1 seconds +real 0m0.290s +user 0m0.235s +sys 0m0.048s +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 450397eebc..be90f7316f 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ab9d7dde82..6e1f603859 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 dea02d2ce8..85082cd896 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 55c42cb947..8a9accd318 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6515142314..211530285d 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 53c661e0ea..0829e6074e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d4036e2d72..04c627baa8 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 28372a7d42..2228cc5071 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,14 +47,14 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb.mg +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/copilot-igraph/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  @@ -123,21 +121,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.004 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -152,52 +150,52 @@ INFO: Finding symmetric diagrams for subprocess group gg_bbx DEBUG: len(subproc_diagrams_for_config) =  4 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1749]  -Generated helas calls for 1 subprocesses (4 diagrams) in 0.008 s -Wrote files for 12 helas calls in 0.062 s +Generated helas calls for 1 subprocesses (4 diagrams) in 0.003 s +Wrote files for 12 helas calls in 0.026 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.200 s +ALOHA: aloha creates 4 routines in 0.083 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.174 s +ALOHA: aloha creates 8 routines in 0.077 s VVS3 VVV1 FFV1 FFV1 FFV1 FFS2 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./HelAmps_heft.h -INFO: Created file HelAmps_heft.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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.283s -user 0m1.905s -sys 0m0.318s -Code generation completed in 3 seconds +real 0m1.050s +user 0m0.886s +sys 0m0.152s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -210,7 +208,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -219,9 +217,9 @@ Code generation completed in 3 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -240,7 +238,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -249,9 +247,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 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 db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 5c112346ee..c12bef5b8a 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,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/gen_ximprove.f b/epochX/cudacpp/heft_gg_bb.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 b94c1c9d64..ebb88689c4 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 8e08d92d87..468361aa34 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 3130417167..7c3b013e3c 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 6346c8cc25..eda50a8fe7 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 6fb79f6e5d..1d80a8703a 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -324,6 +324,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/addmothers.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine.sh b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/survey.sh b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/cleanall b/epochX/cudacpp/heft_gg_bb.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/cleanall +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive 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 c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean_template b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean_template +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_grid.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 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 @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/eval.sh b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 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 @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 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 @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_gridpack b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" 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 d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/misc.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/monitor b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/monitor +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/multicore b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/multicore +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_combine b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_combine +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes3 b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_genissud b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_pgs b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/save_load_object.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/shower_card.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/store4grid b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/store4grid +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/systematics.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/newprocess_mg5 b/epochX/cudacpp/heft_gg_bb.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 e2ebf36abd..adf348cd24 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 fad765e278..c1720a7ac1 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 c56fe6566f..350dbdaa75 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 11221ddda0..8d273272b4 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,15 +47,20 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb.mg +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/copilot-igraph/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: 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.0013883113861083984  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  @@ -123,13 +126,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.006 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/copilot-igraph/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 @@ -138,34 +141,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/. -Generated helas calls for 1 subprocesses (4 diagrams) in 0.010 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.206 s +ALOHA: aloha creates 4 routines in 0.075 s VVS3 VVV1 FFV1 FFV1 FFV1 FFS2 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./HelAmps_heft.h -INFO: Created file HelAmps_heft.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.767s -user 0m0.655s -sys 0m0.105s +real 0m0.303s +user 0m0.256s +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 b2f5d2fe67..b2248a9c2b 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 8e08d92d87..468361aa34 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 e2ebf36abd..adf348cd24 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 fad765e278..c1720a7ac1 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 c56fe6566f..350dbdaa75 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 41e608e60a..5a2e4d8413 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW.mg +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 @@ -57,7 +55,7 @@ set zerowidth_tchannel F import model sm-no_b_mass INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.002887248992919922  +DEBUG: model prefixing takes 0.0013539791107177734  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  @@ -181,7 +179,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.067 s +4 processes with 8 diagrams generated in 0.039 s Total: 4 processes with 8 diagrams add process p p > t t~ w j @1 INFO: Checking for minimal orders which gives processes. @@ -223,21 +221,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.454 s +12 processes with 144 diagrams generated in 0.237 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -351,18 +349,18 @@ INFO: Finding symmetric diagrams for subprocess group dux_ttxwm DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1749]  -Generated helas calls for 8 subprocesses (76 diagrams) in 0.127 s -Wrote files for 212 helas calls in 0.633 s +Generated helas calls for 8 subprocesses (76 diagrams) in 0.063 s +Wrote files for 212 helas calls in 0.302 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.142 s +ALOHA: aloha creates 3 routines in 0.064 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.121 s +ALOHA: aloha creates 6 routines in 0.063 s FFV1 FFV1 FFV1 @@ -370,32 +368,32 @@ ALOHA: aloha creates 6 routines in 0.121 s FFV2 FFV2 VVV1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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 0m4.417s -user 0m3.753s -sys 0m0.584s -Code generation completed in 4 seconds +real 0m2.144s +user 0m1.809s +sys 0m0.298s +Code generation completed in 3 seconds ************************************************************ * * * W E L C O M E to * @@ -408,7 +406,7 @@ Code generation completed in 4 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -417,9 +415,9 @@ Code generation completed in 4 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -438,7 +436,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -447,9 +445,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 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 db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 981120a965..c2f4787c20 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,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/gen_ximprove.f b/epochX/cudacpp/nobm_pp_ttW.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 c2e9d2379e..8923dfc21f 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 56d598b7a9..3f31fd0cf9 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 1ed73392bb..81582e3068 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 959af9abb8..281184f272 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -172,10 +173,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -184,15 +195,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -225,7 +227,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -357,7 +359,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 8ea7cbd981..74480c8494 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -373,6 +373,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 e008b431dc..fd66a7f0f8 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 913c0dfeed..faadc1893a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f4a45af3d4..b568ffce7c 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 d2d45ddbaa..65c9e769a8 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -172,10 +173,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -184,15 +195,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -225,7 +227,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -357,7 +359,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 72232f43be..35765b4e5b 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -373,6 +373,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 693440b711..445c3fdfa0 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 1335e38061..ca21c5dc96 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 c9599a9732..e7c5be3b96 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 5681d8535f..e714d8aa27 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -172,10 +173,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -184,15 +195,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -225,7 +227,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -357,7 +359,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 bf4575a44d..1d8a7e7dac 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -421,6 +421,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 9fc599ac21..26d5680916 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 27f4d1c5c2..92bb6df82b 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 461b2a1f4c..e36535f519 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 f72ed6255e..9029bc3077 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -171,10 +172,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -183,15 +194,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -224,7 +226,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -356,7 +358,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 60736d40f4..f74383fab8 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -421,6 +421,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 a2b839f183..23883e652f 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b11b67d795..294564d446 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 345754eb7e..6ccaebadfe 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 0caf0301e3..a48b3c6563 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -171,10 +172,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -183,15 +194,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -224,7 +226,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -356,7 +358,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 8befd86e93..d41b8d9cc5 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -421,6 +421,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 0616b6b85d..b6f3bcca0c 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 96aee249a6..913175d010 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ab11a90fc1..b6f92fcc0e 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 b5b15b7c5c..909ff7a4d8 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -171,10 +172,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -183,15 +194,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -224,7 +226,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -356,7 +358,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 1d55f3f5b6..54a304376b 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -421,6 +421,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 ae53d88775..2ec815dcd5 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 c3531e18ef..041fe502d3 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 57090d058f..c6f29828c7 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 b2737ec3fa..31275c571f 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -171,10 +172,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -183,15 +194,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -224,7 +226,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -356,7 +358,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 d475dc7829..3c4fcbf99e 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -421,6 +421,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 41fef341d6..4b488ba86c 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 8cfc26cf49..f3ca374a94 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 3b09bc2ba0..b7a337ef1a 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -792,7 +792,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -893,8 +894,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1231,24 +1233,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1258,7 +1261,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 41ca9266c1..52e33445e0 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -94,6 +94,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -172,10 +173,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -184,15 +195,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -225,7 +227,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -357,7 +359,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 795d4cc364..9368c48454 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -421,6 +421,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/addmothers.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine.sh b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/survey.sh b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/cleanall b/epochX/cudacpp/nobm_pp_ttW.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/cleanall +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive 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 c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean_template b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean_template +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_grid.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 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 @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/eval.sh b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 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 @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 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 @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_gridpack b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" 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 d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/misc.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/monitor b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/monitor +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/multicore b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/multicore +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_combine b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_combine +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes3 b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_genissud b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_pgs b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/save_load_object.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/shower_card.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/store4grid b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/store4grid +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/systematics.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/newprocess_mg5 b/epochX/cudacpp/nobm_pp_ttW.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 6c828cb42e..78a589177f 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 393dd87d4c..895a52c1c9 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 0cc375c2ea..0415db00ef 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 db7adae003..eccd459133 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg +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 @@ -57,7 +55,7 @@ set zerowidth_tchannel F define j = p INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0032334327697753906  +DEBUG: model prefixing takes 0.0013833045959472656  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  @@ -168,7 +166,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.019 s +5 processes with 7 diagrams generated in 0.010 s Total: 5 processes with 7 diagrams add process p p > t t~ j @1 INFO: Checking for minimal orders which gives processes. @@ -208,7 +206,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.083 s +13 processes with 76 diagrams generated in 0.046 s Total: 18 processes with 83 diagrams add process p p > t t~ j j @2 INFO: Checking for minimal orders which gives processes. @@ -374,21 +372,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.244 s +65 processes with 1119 diagrams generated in 0.603 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -689,22 +687,22 @@ INFO: Finding symmetric diagrams for subprocess group uux_ttx DEBUG: len(subproc_diagrams_for_config) =  1 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1} [model_handling.py at line 1749]  -Generated helas calls for 18 subprocesses (372 diagrams) in 0.763 s -Wrote files for 810 helas calls in 1.804 s +Generated helas calls for 18 subprocesses (372 diagrams) in 0.436 s +Wrote files for 810 helas calls in 1.026 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.175 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 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.214 s +ALOHA: aloha creates 10 routines in 0.113 s VVV1 VVV1 FFV1 @@ -717,32 +715,32 @@ ALOHA: aloha creates 10 routines in 0.214 s VVVV3 VVVV4 VVVV4 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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 0m8.708s -user 0m7.758s -sys 0m0.875s -Code generation completed in 9 seconds +real 0m4.574s +user 0m3.926s +sys 0m0.577s +Code generation completed in 5 seconds ************************************************************ * * * W E L C O M E to * @@ -755,7 +753,7 @@ Code generation completed in 9 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -764,9 +762,9 @@ Code generation completed in 9 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -785,7 +783,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -794,9 +792,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt index db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 86d647aa4d..aea0415c8b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat @@ -8,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt +++ b/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/gen_ximprove.f b/epochX/cudacpp/pp_tt012j.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/pp_tt012j.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 61984fa1ed..0c21dfc341 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f67a329ee7..3328326ccd 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690f872c32..4bc9ca30bc 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 a582ad2fd4..b4d98fb393 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 f01adf2ab1..2a25738905 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -324,6 +324,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 205b4adbb9..b5c80a89c9 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 e822c4f778..a07720c711 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b34048e29d..998ed0b97c 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 0600c671ce..4f5e2624e7 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -184,10 +185,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -196,15 +207,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -237,7 +239,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -375,7 +377,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 1e6c927bfb..e9b934428f 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -330,6 +330,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 e93eba2447..c5c84e6e4e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6ad3c7dd1e..dd8e1be989 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6dfa640d9e..0875d67f30 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 77820f0e51..e5ff5e3386 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 7388a4bf7e..117fe5ac23 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -340,6 +340,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 4a55d8aa90..ac7f103cca 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ab9d7dde82..6e1f603859 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 37932e73a3..04e7573911 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 f252c024f6..8d94326aab 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -181,10 +182,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -193,15 +204,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -234,7 +236,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -370,7 +372,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 613dbb7f66..ff5bc07d40 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -346,6 +346,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 4a48ab0895..4a9f44d0c8 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 55c42cb947..8a9accd318 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 748758b702..3157dd5789 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 bb34349714..d63a797b50 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -181,10 +182,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -193,15 +204,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -234,7 +236,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -370,7 +372,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 22a6b8c5b9..f3b904df67 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -346,6 +346,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 64df152d47..fc0c7c39a5 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f776ee3de7..e886139a78 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 01735be0d3..83a806f393 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 632d791617..775963430a 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -184,10 +185,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -196,15 +207,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -237,7 +239,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -375,7 +377,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 0ec6e93020..8d8fb6c150 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -346,6 +346,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 c54a3fe49b..f15a70b816 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f51b7656c4..2beebb9375 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 e7f590a087..1fe8cdfe03 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 4705c638be..3f2d73b7be 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 b4b9172028..61ff6953d2 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -372,6 +372,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 c1f4c28e6c..e72d0daadc 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 1f9c0ec433..aff5dc4649 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 5456c9a1d1..173f92196f 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 263e3be1b2..27bedf8c45 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -178,10 +179,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -190,15 +201,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -231,7 +233,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -365,7 +367,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 3816770328..eeac3e2679 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -378,6 +378,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 20bc65a936..69ef7e02ba 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 916fafcf3e..df90f42ae4 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 3edd289da8..46fad4dcd4 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 16d795c6a6..04bd188df5 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -181,10 +182,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -193,15 +204,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -234,7 +236,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -370,7 +372,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 c10cd1e6e8..df331d1b11 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -378,6 +378,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 45ea84b687..ed745b2742 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 067e81bad8..30fd2828da 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 c858b2c684..02828086fa 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 1a6277d156..c48c528006 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -181,10 +182,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -193,15 +204,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -234,7 +236,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -370,7 +372,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 8fdfbc4513..2fa255c5f0 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -378,6 +378,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 934030a5b4..e1df97dfcc 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 650bd18517..6e1f69ae23 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 37ff46da63..ed636c8658 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -796,7 +796,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -897,8 +898,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1235,24 +1237,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1262,7 +1265,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 284cc76158..8e0ad408e6 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -98,6 +98,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -190,10 +191,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -202,15 +213,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -243,7 +245,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -383,7 +385,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 572c6ced56..28d2c37298 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -382,6 +382,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 7ce718c14d..aa96205d56 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 0d2dd21169..4425dab28c 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 bfc32bbd25..dacf44cdd7 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -802,7 +802,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -903,8 +904,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1241,24 +1243,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1268,7 +1271,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 33cf19f705..e81b2d9f94 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -104,6 +104,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -216,10 +217,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -228,15 +239,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -269,7 +271,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -415,7 +417,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 65520b0758..c7a499ba56 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -394,6 +394,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 409028ebd7..3be4aa1427 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 70826b49e7..d77c906f32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 39a81a621a..dadda1238f 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 d76f34423b..00b6e6740c 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -184,10 +185,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -196,15 +207,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -237,7 +239,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -375,7 +377,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 0218e57040..46eaf41400 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -378,6 +378,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 60d176890e..2c5800a0ba 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 3c73ffcdae..d1eb524de1 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 fb7d3f331a..83917a5ce9 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -802,7 +802,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -903,8 +904,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1241,24 +1243,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1268,7 +1271,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 19450cafaf..845dd7d17f 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -104,6 +104,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -216,10 +217,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -228,15 +239,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -269,7 +271,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -415,7 +417,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 2c2555366f..7e4162b2eb 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -394,6 +394,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 aa819764d6..ce31a16003 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 977c1f0143..cb17f303b1 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 0441af0818..aade87d9e7 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 cdb3a6377b..e8a6f932a7 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -184,10 +185,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -196,15 +207,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -237,7 +239,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -375,7 +377,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 ae3e89ba33..94eb7d94dd 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -378,6 +378,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 01837a3ec0..52a9828be0 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 49758d2918..1a3a7dfc4b 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 016741f374..6ebbc6416a 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 0a2a87d5d5..4451012623 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -184,10 +185,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -196,15 +207,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -237,7 +239,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -375,7 +377,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 3dcb0ae4ef..fb4d812e44 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -378,6 +378,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 b24aceadbe..c0ec0ca14e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6e7d0b1d10..f3530fec0d 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f93d884900..ddc395ac2a 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -796,7 +796,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -897,8 +898,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1235,24 +1237,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1262,7 +1265,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 b507ecd05b..a1a807b2ab 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -98,6 +98,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -190,10 +191,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -202,15 +213,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -243,7 +245,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -383,7 +385,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 0eba207bd8..68d79ab9fd 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -382,6 +382,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS 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 3a786dd36f..39d0418692 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6e4939c539..e6429a41fd 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 e28b5f2e76..9e51777745 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -794,7 +794,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -895,8 +896,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1233,24 +1235,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1260,7 +1263,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 f01a8215a1..9ee2ed026d 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -96,6 +96,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -184,10 +185,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -196,15 +207,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -237,7 +239,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -375,7 +377,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 c8a51154a0..3144f0954a 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -378,6 +378,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/addmothers.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine.sh b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/survey.sh b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/cleanall b/epochX/cudacpp/pp_tt012j.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/cleanall +++ b/epochX/cudacpp/pp_tt012j.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py index c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean b/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean_template b/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean_template +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py index 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_grid.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_runs.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/combine_runs.py @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/pp_tt012j.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_driver.sh +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_condor_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_slurm_driver.sh +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/dmtcp_slurm_driver.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/eval.sh b/epochX/cudacpp/pp_tt012j.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_gridpack b/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py index d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/monitor b/epochX/cudacpp/pp_tt012j.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/monitor +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/multicore b/epochX/cudacpp/pp_tt012j.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/multicore +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot b/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data b/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_combine b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_combine +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes3 b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_genissud b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_pgs b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/save_load_object.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/shower_card.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/store4grid b/epochX/cudacpp/pp_tt012j.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/store4grid +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/systematics.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/particles.py index 9e0748d122..37f079c960 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/particles.py @@ -312,7 +312,7 @@ width = Param.WZ, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, LeptonNumber = 0, @@ -327,7 +327,7 @@ width = Param.WW, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, LeptonNumber = 0, diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py index 33a89259f8..9620cf3e3f 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py @@ -109,19 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters - param_values = {'cmath':cmath} + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -133,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value, globals(), param_values)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/newprocess_mg5 b/epochX/cudacpp/pp_tt012j.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/pp_tt012j.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # diff --git a/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h b/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h index 1ea801e9a2..d544201da7 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 76f589cf55..d2ec624d32 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 690c4419dd..aac39f793a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ef5b9e073b..268d121174 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,14 +47,14 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt.mg +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/copilot-igraph/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 @@ -73,7 +71,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.0440211296081543  +DEBUG: model prefixing takes 0.023669004440307617  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~ @@ -88,21 +86,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 2.480 s +1 processes with 72 diagrams generated in 1.148 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -117,22 +115,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxttx DEBUG: len(subproc_diagrams_for_config) =  70 [model_handling.py at line 1724]  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 1748]  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 1749]  -Generated helas calls for 1 subprocesses (72 diagrams) in 0.102 s -Wrote files for 119 helas calls in 0.241 s +Generated helas calls for 1 subprocesses (72 diagrams) in 0.055 s +Wrote files for 119 helas calls in 0.123 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.198 s +ALOHA: aloha creates 5 routines in 0.119 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.195 s +ALOHA: aloha creates 10 routines in 0.095 s VVV5 VVV5 FFV1 @@ -142,32 +140,32 @@ ALOHA: aloha creates 10 routines in 0.195 s VVVV1 VVVV9 VVVV10 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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 0m5.280s -user 0m4.967s -sys 0m0.291s -Code generation completed in 5 seconds +real 0m2.639s +user 0m2.453s +sys 0m0.166s +Code generation completed in 2 seconds ************************************************************ * * * W E L C O M E to * @@ -180,7 +178,7 @@ Code generation completed in 5 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -189,9 +187,9 @@ Code generation completed in 5 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -210,7 +208,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -219,9 +217,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 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 db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 9f01c208e8..89e4a61ab7 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,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/gen_ximprove.f b/epochX/cudacpp/smeft_gg_tttt.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 66a4e061f9..4f988e7efe 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 aa52499cf0..01fd9d3de2 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b68b2dd12c..74e788752d 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 731770fcdf..94652bf502 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 841be0ffef..0ac5293672 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -372,6 +372,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/addmothers.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine.sh b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/survey.sh b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/cleanall b/epochX/cudacpp/smeft_gg_tttt.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/cleanall +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive 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 c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean_template b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean_template +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_grid.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 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 @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/eval.sh b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 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 @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 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 @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_gridpack b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" 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 d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/misc.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/monitor b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/monitor +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/multicore b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/multicore +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_combine b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_combine +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes3 b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_genissud b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_pgs b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/save_load_object.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/shower_card.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/store4grid b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/store4grid +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/systematics.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/newprocess_mg5 b/epochX/cudacpp/smeft_gg_tttt.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 e42264e6db..0eafd1e076 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d5dcd2619e..f9caab30a2 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6c35a21be8..04877425ee 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 8fd1ffeee9..e782900020 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,14 +47,14 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt.mg +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/copilot-igraph/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 @@ -73,7 +71,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.1009819507598877  +DEBUG: model prefixing takes 0.024143457412719727  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~ @@ -88,13 +86,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 2.979 s +1 processes with 72 diagrams generated in 1.129 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/copilot-igraph/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 @@ -103,18 +101,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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.194 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.055 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.237 s +ALOHA: aloha creates 5 routines in 0.095 s VVV5 VVV5 FFV1 @@ -124,17 +122,17 @@ ALOHA: aloha creates 5 routines in 0.237 s VVVV1 VVVV9 VVVV10 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.588s -user 0m4.372s -sys 0m0.143s -Code generation completed in 5 seconds +real 0m1.728s +user 0m1.653s +sys 0m0.060s +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 b64bd4553e..1e73a5d9fa 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 aa52499cf0..01fd9d3de2 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 e42264e6db..0eafd1e076 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d5dcd2619e..f9caab30a2 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6c35a21be8..04877425ee 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f54c66bc71..a2de834e9d 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1.mg +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 @@ -550,21 +548,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.099 s +1 processes with 6 diagrams generated in 0.040 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -579,49 +577,49 @@ INFO: Finding symmetric diagrams for subprocess group gg_t1t1x DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5} [model_handling.py at line 1749]  -Generated helas calls for 1 subprocesses (6 diagrams) in 0.007 s -Wrote files for 16 helas calls in 0.074 s +Generated helas calls for 1 subprocesses (6 diagrams) in 0.003 s +Wrote files for 16 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 VSS1 routines ALOHA: aloha creates VVSS1 routines -ALOHA: aloha creates 3 routines in 0.223 s +ALOHA: aloha creates 3 routines in 0.050 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.113 s +ALOHA: aloha creates 6 routines in 0.049 s VVV1 VSS1 VSS1 VSS1 VVSS1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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.252s -user 0m2.829s -sys 0m0.336s -Code generation completed in 3 seconds +real 0m1.349s +user 0m1.172s +sys 0m0.168s +Code generation completed in 2 seconds ************************************************************ * * * W E L C O M E to * @@ -634,7 +632,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -643,9 +641,9 @@ Code generation completed in 3 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -664,7 +662,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -673,9 +671,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 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 db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 f07e5631fd..96f524567a 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,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/gen_ximprove.f b/epochX/cudacpp/susy_gg_t1t1.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 4573f2ffb8..d302a3abe0 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f5d3042d1a..1502672d33 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 fe7a4274ea..a4f7efab32 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 5e894db7e8..cb0a31dcd5 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 2c3622336c..3439a7e09e 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -312,6 +312,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/addmothers.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine.sh b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/survey.sh b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/cleanall b/epochX/cudacpp/susy_gg_t1t1.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/cleanall +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive 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 c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean_template b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean_template +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_grid.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 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 @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/eval.sh b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 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 @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 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 @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_gridpack b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" 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 d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/misc.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/monitor b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/monitor +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/multicore b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/multicore +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_combine b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_combine +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes3 b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_genissud b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_pgs b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/save_load_object.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/shower_card.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/store4grid b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/store4grid +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/systematics.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/particles.py index 2ca0a71f33..5a17a46bb6 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/particles.py @@ -219,7 +219,7 @@ width = Param.ZERO, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, Y = 0) @@ -233,7 +233,7 @@ width = Param.ZERO, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, Y = 0) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..9620cf3e3f 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/ufomodel/write_param_card.py @@ -109,18 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -132,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/newprocess_mg5 b/epochX/cudacpp/susy_gg_t1t1.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 93a386b2f6..3380f4d79e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b62abad0c9..6b3b2ec31a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 24f3db81b1..162c217fdf 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 2955217a8a..929ade5678 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1.mg +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 @@ -550,13 +548,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.101 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/copilot-igraph/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 @@ -565,32 +563,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/. -Generated helas calls for 1 subprocesses (6 diagrams) in 0.009 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.158 s +ALOHA: aloha creates 3 routines in 0.055 s VVV1 VSS1 VSS1 VSS1 VVSS1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.233s -user 0m1.121s -sys 0m0.102s +real 0m0.582s +user 0m0.533s +sys 0m0.045s Code generation completed in 1 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 7b46d3ea33..951bd55940 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 f5d3042d1a..1502672d33 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 93a386b2f6..3380f4d79e 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 b62abad0c9..6b3b2ec31a 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 24f3db81b1..162c217fdf 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 8772a13e3d..b0ca0c39da 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,7 +47,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt.mg +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 @@ -550,21 +548,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.072 s +1 processes with 3 diagrams generated in 0.042 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 4231]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4225]  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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt  -INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards  -WARNING: File exists /home/dmass/Development/madgraph4gpu/copilot-igraph/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 @@ -579,46 +577,46 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1724]  DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1748]  DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1749]  -Generated helas calls for 1 subprocesses (3 diagrams) in 0.005 s -Wrote files for 10 helas calls in 0.053 s +Generated helas calls for 1 subprocesses (3 diagrams) in 0.002 s +Wrote files for 10 helas calls in 0.028 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.077 s +ALOHA: aloha creates 2 routines in 0.043 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.092 s +ALOHA: aloha creates 4 routines in 0.042 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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/copilot-igraph/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 0m2.544s -user 0m2.202s -sys 0m0.314s -Code generation completed in 3 seconds +real 0m1.384s +user 0m1.192s +sys 0m0.180s +Code generation completed in 1 seconds ************************************************************ * * * W E L C O M E to * @@ -631,7 +629,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -640,9 +638,9 @@ Code generation completed in 3 seconds * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 @@ -661,7 +659,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.7.0 * +* VERSION 3.7.1 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -670,9 +668,9 @@ launch in debug mode * * ************************************************************ INFO: load configuration from /home/dmass/.mg5/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /home/dmass/Development/madgraph4gpu/copilot-igraph/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 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 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 db7e3616c4..178007bafc 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt @@ -255,7 +255,7 @@ # pineappl = pineappl -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/mg5amcnlo +#mg5_path = /home/dmass/Development/madgraph4gpu/master/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /home/dmass/Development/madgraph4gpu/copilot-igraph/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 3c7c799a87..b735122d91 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,8 +8,8 @@ #* * * * #* * #* * -#* VERSION 3.7.0 2026-01-05 * -#* GIT r991-8-gf0884cb7d HEAD * +#* VERSION 3.7.1 2026-04-29 * +#* GIT v3.7.1 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 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/aloha_functions.f b/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/aloha_functions.f index 47699fa614..e986b059a9 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/aloha_functions.f +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/DHELAS/aloha_functions.f @@ -2022,6 +2022,21 @@ subroutine orxxxx(p,rmass,nhel,nsr , ro) end + complex*16 function THETA_FUNCTIONR(cond, out_true, out_false) + + double precision cond + double precision out_true, out_false + + if (cond.ge.0d0) then + THETA_FUNCTIONR = out_true + else + THETA_FUNCTIONR = out_false + endif + + return + + + end complex*16 function THETA_FUNCTION(cond, out_true, out_false) double precision cond diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/gen_ximprove.f b/epochX/cudacpp/susy_gg_tt.mad/Source/gen_ximprove.f index f4de11a552..f145e7644d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/gen_ximprove.f +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/gen_ximprove.f @@ -418,7 +418,7 @@ subroutine open_bash_file(lun) write(*,*) 'Opening file ',fname open (unit=26, file = fname, status='unknown') - write(26,15) '#!/bin/bash' + write(26,15) '#!/usr/bin/env bash' c write(26,15) '#PBS -q ' // PBS_QUE c write(26,15) '#PBS -o /dev/null' c write(26,15) '#PBS -e /dev/null' diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt index 240bba9069..5cdb444f3d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.7.0 \ No newline at end of file +3.7.1 \ 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 9ef41eadef..c23eaed8f8 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 58e1bfe668..1ec9f43b9f 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 6c6b37db2c..ab6d6fc303 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -791,7 +791,8 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C Input: C pp 4 momentum of external particles C wgt weight from Monte Carlo -C imode 0 run, 1 init, 2 reweight, 3 finalize +C imode 0 run, 1 init, 2 reweight, 3 finalize, 4: PDF only, 5: ME +C only C Output: C Amplitude squared and summed C **************************************************** @@ -892,8 +893,9 @@ FUNCTION DSIGPROC(PP,ICONF,IPROC,IMIRROR,SYMCONF,CONFSUB,WGT C endif C set the running scale -C and update the couplings accordingly - IF (VECSIZE_MEMMAX.LE.1) THEN ! no-vector (NB not VECSIZE_USED!) +C and update the couplings accordingly (but deactivate for +C discrete sampler(imode=5) and + IF (VECSIZE_MEMMAX.LE.1.AND.IMODE.NE.5) THEN ! no-vector (NB not VECSIZE_USED!) CALL UPDATE_SCALE_COUPLING(PP, WGT) ENDIF @@ -1230,24 +1232,25 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) C INTEGER NC ! number of assigned color in jamp2 LOGICAL IS_LC + INTEGER CCONFIG INTEGER MAXCOLOR DOUBLE PRECISION TARGETAMP(0:MAXFLOW) INTEGER I,J DOUBLE PRECISION XTARGET + CCONFIG = ICONFIG IF (ICKKW.GT.0) THEN - IF (IVEC.EQ.0) THEN - ICONFIG = IGRAPHS(1) + IF (VECSIZE_MEMMAX.EQ.1.AND.IGRAPHS(1).NE.0) THEN + CCONFIG = IGRAPHS(1) ELSE - ICONFIG = VEC_IGRAPH(IVEC) - IF(ICONFIG.EQ.0)THEN + CCONFIG = VEC_IGRAPH(IVEC) + IF(CCONFIG.EQ.0)THEN ICOL =0 RETURN ENDIF ENDIF ENDIF - NC = INT(JAMP2(0)) IS_LC = .TRUE. MAXCOLOR=0 @@ -1257,7 +1260,7 @@ SUBROUTINE SELECT_COLOR(RCOL, JAMP2, ICONFIG, IPROC, ICOL, IVEC) RETURN ENDIF DO I=1,NC - IF(ICOLAMP(I,ICONFIG,IPROC))THEN + IF(ICOLAMP(I,CCONFIG,IPROC))THEN TARGETAMP(I) = TARGETAMP(I-1) + JAMP2(I) ELSE TARGETAMP(I) = TARGETAMP(I-1) 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 7cf597b197..dfe6070d57 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -93,6 +93,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C DOUBLE PRECISION P1(0:3, NEXTERNAL) INTEGER CHANNEL + DOUBLE PRECISION RWGT_VALUE C C DATA C @@ -166,10 +167,20 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) CHANNEL = SUBDIAG(1) CALL RANMAR(RHEL) CALL RANMAR(RCOL) +C Select a flavor combination (need to do here for right sign) + CALL RANMAR(R) + IPSEL=0 + DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) + IPSEL=IPSEL+1 + R=R-DABS(PD(IPSEL))/PD(0) + ENDDO + + RWGT_VALUE=REWGT(PP,1) +C 1 argument is for IVEC=1 CALL SMATRIX1(P1,RHEL, RCOL,CHANNEL,1, DSIGUU, SELECTED_HEL(1), $ SELECTED_COL(1)) - + DSIGUU = DSIGUU* RWGT_VALUE IF (IMODE.EQ.5) THEN IF (DSIGUU.LT.1D199) THEN DSIG1 = DSIGUU*CONV @@ -178,15 +189,6 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDIF RETURN ENDIF -C Select a flavor combination (need to do here for right sign) - CALL RANMAR(R) - IPSEL=0 - DO WHILE (R.GE.0D0 .AND. IPSEL.LT.IPROC) - IPSEL=IPSEL+1 - R=R-DABS(PD(IPSEL))/PD(0) - ENDDO - - DSIGUU=DSIGUU*REWGT(PP,1) C Apply the bias weight specified in the run card (default is 1.0) DSIGUU=DSIGUU*CUSTOM_BIAS(PP,DSIGUU,1,1) @@ -219,7 +221,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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +352,6 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C ---------- SELECTED_HEL(:) = 0 SELECTED_COL(:) = 0 - IGRAPH(:) = 0 IF(IMODE.EQ.1)THEN NFACT = DSIG1(ALL_PP(0,1,1), ALL_WGT(1), IMODE) 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 52a516cda9..1d31d3673e 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 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.7.0, 2026-01-05 +C Generated by MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -324,6 +324,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) LOGICAL CHOSEN_SO_CONFIGS(NSQAMPSO) DATA CHOSEN_SO_CONFIGS/.TRUE./ SAVE CHOSEN_SO_CONFIGS + DOUBLE PRECISION BWCUTOFF + COMMON/TO_BWCUTOFF/ BWCUTOFF C C ARGUMENTS C diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/addmothers.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/addmothers.f index 593c620d9b..ddb3ae2d35 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/addmothers.f @@ -112,6 +112,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, write(*,*)'unwgt.f: write out diagram ',igraphs(1) endif lconfig = vec_igraph(ivec) + if (lconfig.eq.0.and.igraphs(1).ne.i.and.ivec.eq.1) lconfig = igraphs(1) endif is_LC=.true. maxcolor=0 @@ -628,6 +629,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo c print *,'Replaced ',maxcol,' by ',mincol @@ -683,6 +686,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo @@ -728,6 +733,8 @@ function fix_tchannel_color(mo_color,maxcolor,ncolmp,icolmp,ires, do j=1,2 if(icol(j,i).eq.maxcol) $ icol(j,i)=mincol + if(icol(j,i).eq.-maxcol) + $ icol(j,i)=-mincol enddo enddo else @@ -1047,6 +1054,7 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) integer k,l integer potential_index(2) integer epsilon_index(4) + integer epsilon_type ! 1 anti-color and 2 color (correspond to the colummn in lhef) integer mothers(2*nexternal-3) logical to_change @@ -1056,6 +1064,11 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) do i=-nexternal+3,2*nexternal-3 if (icol(1,i).eq.mincol.or.icol(2,i).eq.mincol)then potential_index(1)=0 + if (icol(1,i).eq.mincol)then + epsilon_type = 1 + else + epsilon_type = 2 + endif c write(*,*) "particle",i,"has color index", mincol k=0 !index to see how many child we found so far do j=-nexternal+3,2*nexternal-3 @@ -1067,6 +1080,12 @@ subroutine correct_external_flow_epsilon(icol, jpart, maxcolor, mincol) c & "is pass to one of the children ->no epsilon at this stage" c the color flow is pass to a child so no need to do anything for this part/junction goto 10 ! break + elseif(icol(1,j).ne.0.and.icol(2,j).ne.0)then + ! sextet involve use epsilon_type to guess the correct + ! index involved in the epsilon + k = k+1 + potential_index(k) = icol(epsilon_type,j) + mothers(1) = i elseif(icol(1,j).ne.0) then c write(*,*) "child has not colour", mincol, "add", icol(1,j) k = k+1 diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/makefile_original.mk b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/makefile_original.mk index 348c283be7..6cb56d0409 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/makefile_original.mk +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/makefile_original.mk @@ -58,7 +58,10 @@ $(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -gensym: $(SYMMETRY) configs.inc $(LIBS) +libcollier.$(dylibext): + ln -s $(LIBDIR)/collier_lib/libcollier.$(dylibext) || echo 'already done' + +gensym: $(SYMMETRY) configs.inc $(LIBS) libcollier.$(dylibext) $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) $(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f index 5360566ef4..fbde2e7697 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f @@ -139,7 +139,7 @@ logical function cut_bw(p) $ gForceBW(i,iconfig).eq.1)) if(onshell)then c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) - if(gForceBW(i,iconfig).eq.2) then + if(gForceBW(i,iconfig).eq.2.and.sde_strat.eq.1) then cut_bw = .true. return endif @@ -300,7 +300,7 @@ subroutine set_peaks COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, . IS_A_ONIUM,DO_CUTS integer njet - + logical dynscale_cut c @@ -542,6 +542,18 @@ subroutine set_peaks c Set minimum based on: 1) required energy 2) resonances 3) 1/10000 of sqrt(s) i = max(1,3*(nexternal-2) - 4 + 1) xo = max(min(etot**2/stot, 1d0-1d-8),1d0/stot) + if (xo.eq.1d0/stot) then + dynscale_cut = (dynamical_scale_choice.eq.-1.and. + $ .not.(FIXED_REN_SCALE.and.FIXED_FAC_SCALE1.and.FIXED_FAC_SCALE2)) + if (dynscale_cut.and.Smin.gt.0)then + xo = max(4d0/stot, Smin/stot) + elseif (dynscale_cut)then + xo = 4d0/stot + elseif (Smin.gt.0) then + xo = .5*min(Smin/stot,xo) + endif + endif + c Take into account special cuts c already done in smin c Include mass scale from BWs diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine.sh b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine.sh index b46170ba23..54fc24db4b 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine.sh +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine_splitted.sh b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine_splitted.sh index 10fe14f7cf..26cbefe2af 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine_splitted.sh +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/refine_splitted.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f index 8e4672a421..067ed35cc6 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f @@ -1594,6 +1594,10 @@ double precision function rewgt(p, ivec) c alpha_s weight if(ipdgcl(imocl(n),igraphs(1),iproc).ne.fake_id)then + if (q2now.le.4)then + rewgt=0d0 + return + endif rewgt=rewgt*alphas(alpsfact*sqrt(q2now))/asref c Store information for systematics studies if(use_syst)then diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/survey.sh b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/survey.sh index 8433127170..a177552e8b 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/survey.sh +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/survey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # For support of LHAPATH in cluster mode if [ $CLUSTER_LHAPATH ]; then diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/cleanall b/epochX/cudacpp/susy_gg_tt.mad/bin/cleanall index 0e3042cf0c..e437c14686 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/cleanall +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/cleanall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/clean4grid b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/clean4grid index f5c0616da0..ac661cc27e 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/clean4grid +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/clean4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/compile b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/compile index 254cfecddf..4a597d7b34 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/compile +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/compile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ################################################################################ # ## diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/refine4grid b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/refine4grid index 573c05ef44..8d9e52dcbd 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/refine4grid +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/refine4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # After a survey has been run and created results.dat to determine # which channels in each process are important, this routine can diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh index 2d149f96be..5d67ab3e06 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################# # ## diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/addmasses_optional.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/addmasses_optional.py index 7568d36489..7d77a41321 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/addmasses_optional.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/addmasses_optional.py @@ -8,8 +8,6 @@ from __future__ import absolute_import import math,sys,re from xml.dom import minidom -from six.moves import range - #tolerance for energy momentum conservation toler = 1e-4 #lepton masses from PDGLive 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 c248436e7f..fa8d07ce97 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py @@ -25,12 +25,9 @@ import sys import re import math -import six -StringIO = six -from six.moves import range -if six.PY3: - import io - file = io.IOBase +import io +import io as StringIO +file = io.IOBase import itertools import time @@ -332,7 +329,7 @@ def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" if not (-4 <= int(value) <= 4): - six.reraise(Exception, "wrong value for lha_strategy", value) + raise Exception("wrong value for lha_strategy: %s" % value) if not self["init"]: raise Exception("No init block define") @@ -1004,6 +1001,8 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} + # allow nickname for some parameter to avoid integer mapping for some var + self.shortcut_values = {} self.default_setup() @@ -1132,6 +1131,11 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): scan_targettype = self.scan_set[lower_name] del self.scan_set[lower_name] + # check if the user used a shortcut value (which are always str) + if lower_name in self.shortcut_values: + if isinstance(value,str) and value.strip().lower() in self.shortcut_values[lower_name]: + value = self.shortcut_values[lower_name][value.strip().lower()] + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] @@ -1310,7 +1314,8 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): def add_param(self, name, value, system=False, comment=False, typelist=None, - allowed=[]): + allowed=[], + shortcut={}): """add a default parameter to the class""" lower_name = name.lower() @@ -1345,6 +1350,11 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert val in allowed or '*' in allowed else: assert value in allowed or '*' in allowed + if shortcut: + if allowed and shortcut and '*' not in allowed: + assert all([val in allowed for val in shortcut.values()]), "Some shortcut value are not in the allowed list" + assert all([isinstance(v, str) for v in shortcut.keys()]), "All shortcut values should be str" + self.shortcut_values[lower_name] = shortcut #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] @@ -1407,7 +1417,7 @@ def format_variable(value, targettype, name="unknown"): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) - if (six.PY2 and not isinstance(value, (str,six.text_type)) or (six.PY3 and not isinstance(value, str))): + if not isinstance(value, str): # just have to check that we have the correct format if isinstance(value, targettype): pass # assignement at the end @@ -2871,7 +2881,8 @@ def add_param(self, name, value, fortran_name=None, include=True, def read(self, finput, consistency=True, unknown_warning=True, **opt): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + + self.path = None if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2880,9 +2891,11 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): elif os.path.isfile(finput): self.path = finput finput = open(finput) + else: raise Exception("No such file %s" % finput) + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -3236,8 +3249,9 @@ def get_value_from_include(self, path, list_of_params, output_dir): def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we - put a warning or not if we use the default value""" + """return self[name] if exist otherwise + check run_card_default.dat otherwise python default. + log control if we put a warning or not if we use the default value""" lower_name = name.lower() if lower_name not in self.user_set: @@ -3255,11 +3269,41 @@ def get_default(self, name, default=None, log_level=None): log_level = 10 else: log_level = 20 + + def get_template_default(name): + try: + if name.lower() in self.parameter_in_block: + block = self.parameter_in_block[name.lower()] + if block.status(self) != block.status(defaultcard): + return 'python' + if name.lower() in defaultcard.user_set: + return 'defaultcard' + else: + return 'python' + except Exception as err: + return 'python' + + if not default: - default = dict.__getitem__(self, name.lower()) + info = '' + if hasattr(self, 'path') and self.path: + try: + defaultcard = RunCard(self.path.replace('.dat', '_default.dat')) + previousdefault = defaultcard.__getitem__(name.lower()) + #check special case for parameter in block where the default card shows one block + # but the user card shows another block. In that case we do not want to take the default value from the default card. + if get_template_default(name) == 'defaultcard': + info = ' from run_card_default.dat' + default = previousdefault + else: + default = dict.__getitem__(self, name.lower()) + except Exception as err: + default = dict.__getitem__(self, name.lower()) + else: + default = dict.__getitem__(self, name.lower()) - logger.log(log_level, '%s missed argument %s. Takes default: %s' - % (self.filename, name, default)) + logger.log(log_level, '%s missed argument %s. Takes default: %s%s' + % (self.filename, name, default, info)) self[name] = default return default else: @@ -3722,15 +3766,15 @@ def write_autodef(self, output_dir, output_file=None): if to_add or previous: # remove previous definition of the commonblock try: - start = out.index('C START USER COMMON BLOCK') + start = out.index('C START USER COMMON BLOCK') except ValueError: pass else: - stop = out.index('C STOP USER COMMON BLOCK') + stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block if self.definition_path[incname]: - out.append("C START USER COMMON BLOCK") + out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] elif hasattr(pathinc , "name"): @@ -3741,7 +3785,7 @@ def write_autodef(self, output_dir, output_file=None): misc.sprint(incname, pathinc ) filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) - out.append('C STOP USER COMMON BLOCK') + out.append('C STOP USER COMMON BLOCK') if not output_file: fsock.writelines(out) @@ -4173,8 +4217,10 @@ def default_setup(self): allowed=['partonshower'], comment="list of check that can be bypassed manually.") self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], + shortcut={'p':1,"p~":-1,'e-':3,'e+':-3,'mu-':4,'mu+':-4, 'no':0}, comment='second beam energy distribution:\n 0: fixed energy\n 1: PDF of proton\n -1: PDF of antiproton\n 2:elastic photon from proton, +/-3:PDF of electron/positron, +/-4:PDF of muon/antimuon, 9: PLUGIN MODE') self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") @@ -4183,18 +4229,24 @@ def default_setup(self): self.add_param("polbeam2", 0.0, fortran_name="pb2", hidden=True, comment="Beam polarization from -100 (left-handed) to 100 (right-handed) --use lpp=0 for this parameter--") self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_proton2', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(2)", + shortcut={'lead':82}, comment='For heavy ion physics nb of proton in the ion (used for beam 2 if group_subprocess was False)') self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", + shortcut={'lead':126}, comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 1)') self.add_param('mass_ion2', -1.0, hidden=True, fortran_name="mass_ion(2)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + shortcut={'proton':0.938,'lead':207.9766521*0.938,'electron':0.000511,'muon':0.105}, comment='For heavy ion physics mass in GeV of the ion (of beam 2)') valid_pdf = ['lhapdf', 'cteq6_m','cteq6_l', 'cteq6l1','nn23lo', 'nn23lo1', 'nn23nlo','iww','eva','edff','chff','none','mixed']+\ sum(self.allowed_lep_densities.values(),[]) @@ -4207,12 +4259,14 @@ def default_setup(self): self.add_param("fixed_fac_scale1", False, hidden=True) self.add_param("fixed_fac_scale2", False, hidden=True) self.add_param("fixed_extra_scale", False, hidden=True) - self.add_param("scale", 91.1880) - self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1") - self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2") + self.add_param("scale", 91.1880, shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact1", 91.1880, fortran_name="sf1", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) + self.add_param("dsqrt_q2fact2", 91.1880, fortran_name="sf2", shortcut={'mz':91.1880, 'mh':125.0, 'mt':173.0, 'mtau':1.77686}) self.add_param("mue_ref_fixed", 91.1880, hidden=True) self.add_param("dynamical_scale_choice", -1, comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2\n '4' is the center of mass energy\n'0' allows to use the user_hook definition (need to be defined via custom_fct entry) ", - allowed=[-1,0,1,2,3,4,10]) + allowed=[-1,0,1,2,3,4,10], + shortcut={'ckkw':-1,'ht':2,'ht/2':3,'et':1,'shat':4}, + ) self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') @@ -4617,12 +4671,8 @@ def check_validity(self): logger.warning("Since 2.7.1 elastic photon from proton is using fixed scale value of muf [dsqrt_q2fact%s] as the cut in the Equivalent Photon Approximation (Budnev, et al) formula. Please edit it accordingly." % i) - if six.PY2 and self['hel_recycling']: - self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. - In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -5575,8 +5625,10 @@ def default_setup(self): self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) + self.add_param('lpp2', 1, fortran_name='lpp(2)', + shortcut={'p':1, 'p~':-1, 'e-': 3, 'e+':-3, 'mu-':4, 'mu+':-4}) self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('nb_proton1', 1, hidden=True, allowed=[1,0, 82 , '*'],fortran_name="nb_proton(1)", @@ -5619,13 +5671,15 @@ def default_setup(self): self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param('mue_ref_fixed', 91.118, hidden=True, shortcut={'mz':91.118, 'mw':80.419, 'mt':172.5, 'mh':125.0}) self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', - allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + allowed = [-2,-1,0,1,2,3,10], + shortcut={ 'ht/2':3,'ht':2,'et':1}, + comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py index a34705f6bc..56e2fb1b50 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py @@ -11,10 +11,7 @@ import shutil import logging import random -import six -StringIO = six -from six.moves import range - +import io logger = logging.getLogger('madgraph.models') # -> stdout try: @@ -138,7 +135,7 @@ def __str__(self, precision=''): self.comment = self.comment.strip() if format == 'float': - if self.lhablock == 'decay' and not isinstance(self.value,six.string_types): + if self.lhablock == 'decay' and not isinstance(self.value,str): return 'DECAY %s %.{0}e # %s'.format(precision) % (' '.join([str(d) for d in self.lhacode]), self.value, self.comment) elif self.lhablock == 'decay': return 'DECAY %s Auto # %s' % (' '.join([str(d) for d in self.lhacode]), self.comment) @@ -343,7 +340,7 @@ def read(self, input_path): if isinstance(input_path, str): if '\n' in input_path: - input = StringIO.StringIO(input_path) + input = io.StringIO(input_path) else: input = open(input_path) else: @@ -1050,7 +1047,7 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): identLines = identCard.readlines() identCard.close() else: - ff = StringIO.StringIO() + ff = io.StringIO() if order: keys = order else: diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean index 55b5b558d9..53b40382d0 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Cleans up directories removing leaving only the results # object files diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean_template b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean_template index a0bb18e53e..1c9afc3810 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean_template +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/clean_template @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 873376d872..298b9980a3 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py @@ -20,11 +20,7 @@ import glob import inspect import sys -import six import tempfile -from six.moves import range -from six.moves import input - logger = logging.getLogger('madgraph.cluster') try: @@ -175,7 +171,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, prog = os.path.join(cwd, prog) temp_file_name = "sub." + os.path.basename(prog) + '.'.join(argument) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYTMP=%(tmpdir)s/run$%(job_id)s MYPWD=%(cwd)s mkdir -p $MYTMP @@ -623,9 +619,9 @@ class Packet(object): """ def __init__(self, name, fct, args, opts={}): - import six.moves.queue + import queue import threading - self.queue = six.moves.queue.Queue() + self.queue = queue.Queue() self.tag = name self.fct = fct self.args = args @@ -653,12 +649,12 @@ def __init__(self, *args, **opt): super(MultiCore, self).__init__(self, *args, **opt) - import six.moves.queue + import queue import threading - import six.moves._thread - self.queue = six.moves.queue.Queue() # list of job to do - self.done = six.moves.queue.Queue() # list of job finisned - self.submitted = six.moves.queue.Queue() # one entry by job submitted + import _thread + self.queue = queue.Queue() # list of job to do + self.done = queue.Queue() # list of job finisned + self.submitted = queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] self.gpus_list = [] @@ -678,9 +674,9 @@ def __init__(self, *args, **opt): self.update_fct = None self.lock = threading.Event() # allow nice lock of the main thread - self.pids = six.moves.queue.Queue() # allow to clean jobs submit via subprocess + self.pids = queue.Queue() # allow to clean jobs submit via subprocess self.done_pid = [] # list of job finisned - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.fail_msg = None mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' @@ -716,8 +712,8 @@ def start_demon(self): def worker(self, env2=None): - import six.moves.queue - import six.moves._thread + import queue + import _thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) @@ -775,7 +771,7 @@ def worker(self, env2=None): self.remove(error) if __debug__: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) self.queue.task_done() self.done.put(tag) @@ -783,9 +779,9 @@ def worker(self, env2=None): #release the mother to print the status on the screen try: self.lock.set() - except six.moves._thread.error: + except _thread.error: continue - except six.moves.queue.Empty: + except queue.Empty: continue import threading self.demons.remove(threading.current_thread()) @@ -856,7 +852,7 @@ def wait(self, me_dir, update_status, update_first=None): """Waiting that all the jobs are done. This function also control that the submission by packet are handle correctly (i.e. submit the function)""" - import six.moves.queue + import queue import threading try: # to catch KeyBoardInterupt to see which kind of error to display @@ -872,7 +868,7 @@ def wait(self, me_dir, update_status, update_first=None): while self.done.qsize(): try: tag = self.done.get(True, 1) - except six.moves.queue.Empty: + except queue.Empty: pass else: if self.id_to_packet and tuple(tag) in self.id_to_packet: @@ -936,7 +932,7 @@ def wait(self, me_dir, update_status, update_first=None): raise Exception(self.fail_msg) elif self.fail_msg: # can happend that stoprequest is set bu not fail if no job have been resubmitted - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # self.fail_msg is None can happen when no job was submitted -> ignore # reset variable for next submission @@ -944,12 +940,12 @@ def wait(self, me_dir, update_status, update_first=None): self.lock.clear() except Exception: pass - self.done = six.moves.queue.Queue() + self.done = queue.Queue() self.done_pid = [] - self.done_pid_queue = six.moves.queue.Queue() + self.done_pid_queue = queue.Queue() self.nb_done = 0 - self.submitted = six.moves.queue.Queue() - self.pids = six.moves.queue.Queue() + self.submitted = queue.Queue() + self.pids = queue.Queue() self.stoprequest.clear() self.id_to_packet = {} @@ -961,7 +957,7 @@ def wait(self, me_dir, update_status, update_first=None): elif isinstance(self.fail_msg, str): raise Exception(self.fail_msg) elif self.fail_msg: - six.reraise(self.fail_msg[0], self.fail_msg[1], self.fail_msg[2]) + raise self.fail_msg[1].with_traceback(self.fail_msg[2]) # else return orignal error raise @@ -1235,7 +1231,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, 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 += f'SCRIPT PRE job /usr/bin/env bash {preexec} {cwd} {dag_file.name}\n' dag_text += 'RETRY job 100 UNLESS-EXIT 0\n' dag_text += 'VARS job restart_count="$(RETRY)"\n' @@ -2174,7 +2170,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, cwd_arg = cwd+"/arguments" temp = ' '.join([str(a) for a in argument]) temp_file_name = "sub." + os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2182,7 +2178,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), @@ -2333,7 +2329,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, else: temp_file_name = "sub."+ os.path.basename(prog) - text = """#!/bin/bash + text = """#!/usr/bin/env bash MYPWD=%(cwd)s cd $MYPWD input_files=(%(input_files)s ) @@ -2341,7 +2337,7 @@ def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None, do chmod -f +x $i done - /bin/bash %(prog)s %(arguments)s > %(stdout)s + /usr/bin/env bash %(prog)s %(arguments)s > %(stdout)s """ dico = {'cwd':cwd, 'input_files': ' '.join(input_files + [prog]), 'stdout': stdout, 'prog':prog, 'arguments': ' '.join([str(a) for a in argument]), diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/coloring_logging.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/coloring_logging.py index 5f056d9207..b8123824b0 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/coloring_logging.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/coloring_logging.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import logging -from six.moves import range # method to add color to a logging.info add a second argument: # '$MG:BOLD' # '$MG:color:RED' diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_grid.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_grid.py index cd38204ec3..1715decc23 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_grid.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/combine_grid.py @@ -3,7 +3,6 @@ import collections import math import os -from six.moves import range try: import madgraph except ImportError: 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 3e0e7385a5..2499254d14 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 @@ -23,7 +23,6 @@ import shutil import re import logging -from six.moves import range import random import time 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 3c5601e27d..ce83f36118 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 @@ -33,12 +33,9 @@ import sys import time import traceback -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +import urllib.request, urllib.parse, urllib.error import glob -from six.moves import range -from six.moves import input -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -679,7 +676,8 @@ class CommonRunCmd(HelpToCmd, CheckValidForCmd, cmd.Cmd): 'cluster_status_update': (600, 30), 'cluster_nb_retry':1, 'cluster_local_path': None, - 'cluster_retry_wait':300} + 'cluster_retry_wait':300, + 'heptools_install_dir': pjoin(root_path,'HEPTools'),} options_madgraph= {'stdout_level':None} @@ -2250,8 +2248,7 @@ def check_multicore(self): new_command.append('--multicore=create') else: stdout = devnull - if six.PY3: - stdout = subprocess.DEVNULL + stdout = subprocess.DEVNULL #stdout = open(pjoin(self.me_dir,'Events', self.run_name, 'reweight%s.log' % i),'w') new_command.append('--multicore=wait') mycluster.submit(prog=command[0], argument=new_command[1:], stdout=stdout, cwd=os.getcwd()) @@ -2631,7 +2628,7 @@ def runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=Tr except Exception as e: logger.warning("MadAnalysis5 failed to run the commands for task "+ "'%s'. Madanalys5 analysis will be skipped."%MA5_runtag) - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -2680,11 +2677,11 @@ def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, LoggerStream=logstream,forced=forced, no_compilation=not compilation) except Exception as e: - if six.PY3 and not __debug__: + if not __debug__: logger.info('MadAnalysis5 instalation not python3 compatible') return None logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.') - error=StringIO.StringIO() + error=io.StringIO() traceback.print_exc(file=error) logger.debug('MadAnalysis5 error was:') logger.debug('-'*60) @@ -3624,9 +3621,7 @@ def do_set(self, line, log=True): self.options[args[0]] = tmp elif args[0].startswith('f2py_compiler'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do: if args[1] == 'None': @@ -3636,9 +3631,7 @@ def do_set(self, line, log=True): self.options['f2py_compiler'] = args[1] elif args[0].startswith('lhapdf'): to_do = True - if args[0].endswith('_py2') and six.PY3: - to_do = False - elif args[0].endswith('_py3') and six.PY2: + if args[0].endswith('_py2'): to_do = False if to_do and args[1] != 'None': self.options['lhapdf'] = args[1] @@ -4935,6 +4928,19 @@ def get_lhapdf_libdir(self): return libdir + def reset_iseed_in_run_card(self): + """If iseed is set to a non-zero value in the run_card, reset it to 0 + and write the updated run_card to disk. This ensures that subsequent + runs will use an automatically-generated (independent) seed rather than + repeating the same one.""" + iseed = self.run_card['iseed'] + if iseed != 0: + self.run_card['iseed'] = 0 + # Reset seed in run_card to 0, to ensure that following runs + # will be statistically independent + self.run_card.write(pjoin(self.me_dir, 'Cards', 'run_card.dat'), + template=pjoin(self.me_dir, 'Cards', 'run_card.dat')) + class AskforEditCard(cmd.OneLinePathCompletion): """A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly @@ -5205,12 +5211,12 @@ def init_run(self, cards): if self.run_set: self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), - 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), + 'lpp': ([str],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), - 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), + 'fixed_scale': ([str],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), 'pbp':([],['run_card lpp1 1', 'run_card lpp2 1','run_card nb_proton1 82', 'run_card nb_neutron1 126', 'run_card mass_ion1 195.0820996698','run_card nb_proton2 1', 'run_card nb_neutron2 0', 'run_card mass_ion1 -1']), @@ -5795,6 +5801,8 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_for_run.remove('*') elif isinstance(self.run_card[args[-1]], bool): allowed_for_run = ['True', 'False'] + if args[-1].lower() in self.run_card.shortcut_values: + allowed_for_run += self.run_card.shortcut_values[args[-1].lower()] opts += [str(i) for i in allowed_for_run] @@ -5807,7 +5815,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): possibilities['Param Card Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['block'], six.string_types): + elif isinstance(allowed['block'], str): block = self.param_card[allowed['block']].param_dict ids = [str(i[0]) for i in block if (allowed['block'], i) not in self.restricted_value] @@ -5837,7 +5845,7 @@ def complete_set(self, text, line, begidx, endidx, formatting=True): allowed_block = [i for i in self.mw_card.keys() if 'comment' not in i] possibilities['MadWeight Block' ] = \ self.list_completion(text, allowed_block) - elif isinstance(allowed['mw_block'], six.string_types): + elif isinstance(allowed['mw_block'], str): block = self.mw_card[allowed['mw_block']] ids = [str(i[0]) if isinstance(i, tuple) else str(i) for i in block] possibilities['MadWeight Card id' ] = self.list_completion(text, ids) @@ -7220,7 +7228,7 @@ def default(self, line): import tempfile fsock, path = tempfile.mkstemp() try: - text = six.moves.urllib.request.urlopen(line.strip()) + text = urllib.request.urlopen(line.strip()) url = line.strip() except Exception: logger.error('fail to load the file') diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/create_matching_plots.sh b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/create_matching_plots.sh index 0166bfb89d..37a76b6c39 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/create_matching_plots.sh +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/create_matching_plots.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$2" == "" ]];then echo "Error: Need run prefix and path to MadAnalysis" 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 index c51f9e55c1..16ac558d5a 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -71,7 +71,7 @@ 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 \ + script -qfc "/usr/bin/env 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 $@" 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 index fba394925c..a1238ea937 100644 --- 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 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH="$DMTCP_PATH/bin:$PATH" export LD_LIBRARY_PATH="$DMTCP_PATH/lib:$LD_LIBRARY_PATH" @@ -48,7 +48,7 @@ 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" & + script -qfc "srun /usr/bin/env 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" & diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/eval.sh b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/eval.sh index f8f1398b4c..5051242a70 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/eval.sh +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/eval.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash eval $@ 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 0826131902..a7f28dd360 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 @@ -25,13 +25,8 @@ import subprocess import sys import traceback -import six -if six.PY3: - import io - file = io.IOBase -from six.moves import map -from six.moves import range -from six.moves import input +import io +file = io.IOBase try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -1782,7 +1777,7 @@ def handle_alarm(signum, frame): signal.signal(signal.SIGALRM, handle_alarm) if fct is None: - fct = six.moves.input + fct = input if timeout: signal.alarm(timeout) @@ -2061,7 +2056,7 @@ def write_configuration(self, filepath, basefile, basedir, to_keep): to_write.remove(key) except Exception: pass - if '_path' in key: + if '_path' in key or '-config' in key or key in ['fastjet', 'lhapdf', 'lhapdf_py3', 'f2py_compiler', 'f2py_compiler_py3']: # special case need to update path # check if absolute path if not os.path.isabs(value): diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py index 74ba0d195c..0214bafffb 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py @@ -20,8 +20,6 @@ from __future__ import absolute_import import re import collections -from six.moves import range -import six import io try: diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py index 3114a4350c..d61391e00c 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py @@ -23,9 +23,6 @@ import re import glob import logging -import six -from six.moves import range - try: import madgraph except ImportError: @@ -1613,7 +1610,7 @@ def get_html(self, runresults): if self.debug is KeyboardInterrupt: debug = '
Interrupted' - elif isinstance(self.debug, six.string_types): + elif isinstance(self.debug, str): if not os.path.isabs(self.debug) and not self.debug.startswith('./'): self.debug = './' + self.debug elif os.path.isabs(self.debug): diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl index 31b7e9fe55..52f1dbafe2 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl @@ -3,7 +3,7 @@ #--------------------------------------------------------------------- # Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.png\" "); +system("/usr/bin/env bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} @@ -26,7 +26,7 @@ while ( -e "matrix$imatrix.ps"){ } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; # Determine how many png files we have @@ -57,22 +57,22 @@ while ( -e "matrix$imatrix.ps"){ # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); + system ("/usr/bin/env bash -c \"rm -f matrix$max_png.png\" "); } # # Now create PNG file for card # if (! -e "../../HTML/card.png") { - system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); + system ("/usr/bin/env bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; print JUNK "-30 -380 translate \n"; print JUNK "0.7 0.7 scale \n"; close(JUNK); - system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); + system ("/usr/bin/env bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; + system "/usr/bin/env bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py index d5d7fc8faf..adcd847dfe 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py @@ -29,11 +29,7 @@ import shutil import stat import sys -import six import time -from six.moves import range -from six.moves import zip - try: import madgraph except ImportError: @@ -46,8 +42,7 @@ import internal.combine_grid as combine_grid import internal.combine_runs as combine_runs import internal.lhe_parser as lhe_parser - if six.PY3: - import internal.hel_recycle as hel_recycle + import internal.hel_recycle as hel_recycle else: MADEVENT= False import madgraph.madevent.sum_html as sum_html @@ -58,8 +53,7 @@ import madgraph.madevent.combine_grid as combine_grid import madgraph.madevent.combine_runs as combine_runs import madgraph.various.lhe_parser as lhe_parser - if six.PY3: - import madgraph.madevent.hel_recycle as hel_recycle + import madgraph.madevent.hel_recycle as hel_recycle logger = logging.getLogger('madgraph.madevent.gen_ximprove') pjoin = os.path.join @@ -1184,7 +1178,7 @@ class gen_ximprove_v4(gen_ximprove): max_splitting = 130 # maximum duplication of a given channel min_iter = 3 max_iter = 9 - keep_grid_for_refine = False # only apply if needed to split the job + keep_grid_for_refine = True # only apply if needed to split the job @@ -1476,6 +1470,7 @@ def get_job_for_precision(self): 'precision': yerr/math.sqrt(nb_split)/(C.get('xsec')+ yerr), 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), + 'base_directory': C.name if self.keep_grid_for_refine else '', 'grid_refinment' : 1 } diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py index 0883cd9613..77fd4cf4fc 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py @@ -32,13 +32,8 @@ import subprocess import xml.dom.minidom as minidom from xml.parsers.expat import ExpatError as XMLParsingError -import six -StringIO = six -from six.moves import range -from six.moves import zip import io -if six.PY3: - file = io.IOBase +file = io.IOBase root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0] sys.path.append(os.path.join(root_path)) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py index d4b94bab10..06143bfb81 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py @@ -11,10 +11,6 @@ import os import shutil import sys -import six -from six.moves import filter -from six.moves import range -from six.moves import zip from functools import reduce pjoin = os.path.join @@ -53,9 +49,6 @@ logger = logging.getLogger("madgraph.lhe_parser") -if six.PY3: - six.text_type = str - class Particle(object): """ """ # regular expression not use anymore to speed up the computation @@ -461,7 +454,7 @@ def weight(event): return event.wgt get_wgt = weight unwgt_name = "central weight" - elif isinstance(get_wgt, (str,six.text_type)): + elif isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt(event): event.parse_reweight() @@ -1209,7 +1202,7 @@ def unweight(self, outputpath, get_wgt, **opts): (stop to write event when target is reached) """ - if isinstance(get_wgt, (str,six.text_type)): + if isinstance(get_wgt, str): unwgt_name =get_wgt def get_wgt_multi(event): event.parse_reweight() @@ -1252,11 +1245,7 @@ def get_wgt_multi(event): def write(self, path, random=False, banner=None, get_info=False): """ """ - try: - str_type = (str,six.text_type) - except NameError: - str_type = (str) - + str_type = str if isinstance(path, str_type): out = EventFile(path, 'w') if self.parsefile and not banner: @@ -2655,7 +2644,7 @@ def __str__(self, event_id=''): continue replace = {} replace['values'] = self.syscalc_data[k] - if isinstance(k, (str, six.text_type)): + if isinstance(k, str): replace['key'] = k replace['opts'] = '' else: @@ -2929,7 +2918,7 @@ def __init__(self, obj=0, px=0, py=0, pz=0, E=0): px = obj[1] py = obj[2] pz = obj[3] - elif isinstance(obj, (str, six.text_type)): + elif isinstance(obj, str): obj = [float(i) for i in obj.split()] assert len(obj) ==4 E = obj[0] @@ -3241,7 +3230,7 @@ def __init__(self, input, real_type=(1,11)): """ """ self.real_type = real_type - if isinstance(input, (str, six.text_type)): + if isinstance(input, str): self.parse(input) def __str__(self, mode='display'): @@ -3616,7 +3605,7 @@ def __init__(self, input, event, real_type=(1,11), threshold=None): self.modified = False #set on True if we decide to change internal infor # that need to be written in the event file. #need to be set manually when this is the case - if isinstance(input, (str,six.text_type)): + if isinstance(input, str): self.parse(input) 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 306c508eae..1beecc8a95 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 @@ -34,9 +34,7 @@ import tarfile import shutil import copy -from six.moves import range -import six -StringIO = six +import io try: import readline GNU_SPLITTING = ('GNU' in readline.__doc__) @@ -3238,10 +3236,29 @@ def do_treatcards(self, line, mode=None, opt=None): return else: devnull = open(os.devnull,'w') - subprocess.call([sys.executable, 'write_param_card.py'], + + result = subprocess.run([sys.executable, 'write_param_card.py'], + cwd=pjoin(self.me_dir, 'bin', 'internal', 'ufomodel'), + stdout=devnull, stderr=subprocess.PIPE) + + returncode = result.returncode + stderr_output = result.stderr.decode('utf-8', errors='replace') + + if returncode: + if not MADEVENT: + shutil.copy(pjoin(MG5DIR,'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + elif self.options['mg5_path']: + shutil.copy(pjoin(self.options['mg5_path'],'models','sm','write_param_card.py'), + pjoin(self.me_dir,'bin','internal','ufomodel','write_param_card.py')) + else: + raise RuntimeError("write_param_card.py from your UFO model is crashing. Please update it (or run from Madgraph executable which will fix it for you):\n%s" % stderr_output) + + returncode = subprocess.call([sys.executable, 'write_param_card.py'], cwd=pjoin(self.me_dir,'bin','internal','ufomodel'), stdout=devnull) - devnull.close() + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') need_mp = self.proc_characteristics['loop_induced'] @@ -4669,7 +4686,7 @@ def do_pythia8(self, line): # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) - cmd_card = StringIO.StringIO() + cmd_card = io.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True, use_mg5amc_py8_interface=use_mg5amc_py8_interface) @@ -4677,7 +4694,7 @@ def do_pythia8(self, line): # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. - if 'heptools_install_dir' in self.options: + if 'heptools_install_dir' in self.options and self.options['heptools_install_dir']: preamble = misc.get_HEPTools_location_setter( self.options['heptools_install_dir'],'lib') else: @@ -6036,6 +6053,11 @@ def configure_directory(self, html_opening=True): # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + if self.options['heptools_install_dir']: + libdir = os.path.abspath(pjoin(self.options['heptools_install_dir'], 'lib')) + os.environ['LD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('LD_LIBRARY_PATH','') + os.environ['DYLD_LIBRARY_PATH'] = libdir + ':' + os.environ.get('DYLD_LIBRARY_PATH','') + # environmental variables to be included in make_opts self.make_opts_var = {} @@ -6107,10 +6129,7 @@ def configure_directory(self, html_opening=True): # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) - self.run_card['iseed'] = 0 - # Reset seed in run_card to 0, to ensure that following runs - # will be statistically independent - self.run_card.write(pjoin(self.me_dir, 'Cards','run_card.dat'), template=pjoin(self.me_dir, 'Cards','run_card.dat')) + self.reset_iseed_in_run_card() time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) self.configured = time_mod diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_gridpack b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_gridpack index b00b213b45..dfd3c9c488 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_gridpack +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_gridpack @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_madevent_tar b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_madevent_tar index a018af9c07..a6130335e3 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_madevent_tar +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/make_madevent_tar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES="Cards HTML SubProcesses bin lib Source Events index.html README TemplateVersion.txt MGMEVersion.txt" 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 d32a17c825..ae43b330eb 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/misc.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/misc.py @@ -30,15 +30,8 @@ import stat import traceback import gzip as ziplib -import six -from six.moves import zip_longest -from six.moves import range -from six.moves import zip -from six.moves import input -StringIO = six -if six.PY3: - import io - file = io.IOBase +import io +from itertools import zip_longest try: # Use in MadGraph import madgraph @@ -129,7 +122,7 @@ def get_pkg_info(info_str=None): global PACKAGE_INFO if info_str: - info_dict = parse_info_str(StringIO.StringIO(info_str)) + info_dict = parse_info_str(io.StringIO(info_str)) return info_dict if PACKAGE_INFO: @@ -177,10 +170,10 @@ def is_MA5_compatible_with_this_MG5(ma5path): why it is so.""" class version: - def __init__(input): + def __init__(self, input): self.info = input.split('.') - def __lt__(input): + def __lt__(self, input): if isinstance(input, str): input = version(input) @@ -214,12 +207,24 @@ def LooseVersion(input): ma5_version = None try: - for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): - if line.startswith('MA5 version :'): - ma5_version=LooseVersion(line[13:].strip()) - break - except: + text = open(pjoin(ma5path,'bin', 'ma5'),'r').read() + pattern = re.compile(r'\s*version\s*=\s*["\'](.*)["\']\s*') + ma5_version = pattern.findall(text)[0] + ma5_version=LooseVersion(ma5_version) + except Exception as error: + misc.sprint(error) ma5_version = None + # fallback to version.txt if the above method fails. + # for the transition period where that file still exists (from HEPinstaller) + if not ma5_version and os.path.exists(pjoin(ma5path,'version.txt')): + try: + for line in open(pjoin(ma5path,'version.txt'),'r').read().split('\n'): + if line.startswith('MA5 version :'): + ma5_version=LooseVersion(line[13:].strip()) + break + except Exception: + ma5_version = None + if ma5_version is None: reason = "No MadAnalysis5 version number could be read from the path supplied '%s'."%ma5path @@ -237,13 +242,13 @@ def LooseVersion(input): if not mg5_version: return None - if mg5_version < LooseVersion("2.6.1") and ma5_version >= LooseVersion("1.6.32"): + if mg5_version < LooseVersion("2.6.1") and ma5_version > LooseVersion("1.6.31"): reason = "This active MG5aMC version is too old (v%s) for your selected version of MadAnalysis5 (v%s)"%(mg5_version,ma5_version) reason += "\nUpgrade MG5aMC or re-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." return reason - if mg5_version >= LooseVersion("2.6.1") and ma5_version < LooseVersion("1.6.32"): + if mg5_version > LooseVersion("2.6.0") and ma5_version < LooseVersion("1.6.32"): reason = "Your selected version of MadAnalysis5 (v%s) is too old for this active version of MG5aMC (v%s)."%(ma5_version,mg5_version) reason += "\nRe-install MA5 from within MG5aMC to fix this compatibility issue." reason += "\nThe specified version of MadAnalysis5 will not be active in your session." @@ -1475,8 +1480,8 @@ def open_program(self, program, file_path, mac_check=True, background=False): if not background: subprocess.call(arguments) else: - import six.moves._thread - six.moves._thread.start_new_thread(subprocess.call,(arguments,)) + import _thread + _thread.start_new_thread(subprocess.call,(arguments,)) else: logger.warning('Not able to open file %s since no program configured.' % file_path + \ 'Please set one in ./input/mg5_configuration.txt') @@ -1697,10 +1702,7 @@ def run(self): def mmin(iter, default=None): - if six.PY3: - return min(iter, default=default) - else: - return min(iter, default) + return min(iter, default=default) ################################################################################ @@ -2205,10 +2207,7 @@ def deco_f_set(*args, **opt): def plugin_import(module, error_msg, fcts=[]): """convenient way to import a plugin file/function""" - if six.PY2: - level = -1 - else: - level = 0 + level = 0 try: _temp = __import__('PLUGIN.%s' % module, globals(), locals(), fcts, level) @@ -2392,13 +2391,12 @@ def make_unique(input, keepordering=None): else: return list(dict.fromkeys(input)) -if six.PY3: - try: - from collections import MutableSet - except ImportError: # this is for python3.10 - from collections.abc import MutableSet +try: + from collections import MutableSet +except ImportError: # this is for python3.10 + from collections.abc import MutableSet - class OrderedSet(collections.OrderedDict, MutableSet): +class OrderedSet(collections.OrderedDict, MutableSet): def __init__(self, arg=None): super( OrderedSet, self).__init__() @@ -2459,8 +2457,7 @@ def __eq__(self, other): symmetric_difference = property(lambda self: self.__xor__) symmetric_difference_update = property(lambda self: self.__ixor__) union = property(lambda self: self.__or__) -else: - OrderedSet = set + def cmp_to_key(mycmp): @@ -2509,9 +2506,7 @@ def dict_cmp(A, B, level=1): return (a > b) - (a < b) #return cmp(A[adiff], B[bdiff]) -if six.PY3: - import io - file = io.FileIO +file = io.FileIO class BackRead(file): """read a file returning the lines in reverse order for each call of readline() diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/monitor b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/monitor index 986f030c89..a56e7b38cd 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/monitor +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/multicore b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/multicore index e697114c6f..40698322c6 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/multicore +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/multicore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to run jobs on multicore machines # diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot index 8b06a90530..684e05c8b8 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot_djrs.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot_djrs.py index 676d379443..a1fb948525 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot_djrs.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/plot_djrs.py @@ -20,9 +20,6 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab -from six.moves import range - - ################################################################################ # TRY TO LINK TO HISTOGRAMS.PY ################################################################################ diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data index 407ed7aa91..5b90db6803 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Routine to copy all of the necessary results.dat files # into the appropriate location so gen_grid_jobs has necessary diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_combine b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_combine index 95dfae65bc..43fec3b0e1 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_combine +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_combine @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm fail_combine.log &> /dev/null for((try=1;try<=16;try+=1)); diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes index f28adcf8a6..edaa90ca48 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes3 b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes3 index 48e3ca6902..afbe748b31 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes3 +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_delphes3 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs Delphes 3 on the pythia_events.hep # diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_genissud b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_genissud index 3168fe259d..69cdfaaca4 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_genissud +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_genissud @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This generates a grid file for the present choice of run_card # # Usage: run_genissud [para/serial] @@ -52,7 +52,7 @@ echo $$ >> myprocid if [ "$p" = "1" ]; then for i in -2 -1 0 1 2 3 4 5;do rm -f donegen$i rungen$i waitgen$i gensudgrid$i.log gensudgrid$i.pbs gen$i.log - echo '#!/bin/bash' > gensudgrid$i.pbs + echo '#!/usr/bin/env bash' > gensudgrid$i.pbs touch waitgen$i echo "cd $main;rm waitgen$i;touch rungen$i;bin/internal/gensudgrid $i > gensudgrid$i.log;rm rungen$i;touch donegen$i" >> gensudgrid$i.pbs chmod u+x gensudgrid$i.pbs diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_hep2lhe b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_hep2lhe index 77b8c16d48..814868c83d 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_hep2lhe +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_hep2lhe @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs hep2lhe on the unweighted_events.dat # diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_pgs b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_pgs index bf8d6fac50..51bbba3aab 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_pgs +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/run_pgs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This runs pgs on the pythia_events.hep # diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/save_load_object.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/save_load_object.py index ce8a489277..47afc961b7 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/save_load_object.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/save_load_object.py @@ -17,10 +17,9 @@ from __future__ import absolute_import import pickle -import six.moves.cPickle +cPickle = pickle from . import files as files -import six import os class SaveObjectError(Exception): @@ -31,7 +30,7 @@ class SaveObjectError(Exception): def save_to_file(filename, object, log=True, allow_fail=True): """Save any Python object to file filename""" - if not isinstance(filename, six.string_types): + if not isinstance(filename, str): raise SaveObjectError("filename must be a string") files.write_to_file(filename, pickle_object, object, log=log, binary=True, @@ -50,7 +49,7 @@ def pickle_object(fsock, object, bypass_error=False, **opts): """Helper routine to pickle an object to file socket fsock""" try: - six.moves.cPickle.dump(object, fsock, protocol=2) + pickle.dump(object, fsock, protocol=2) except Exception as error: if bypass_error: return diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/shower_card.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/shower_card.py index 16ed72b1a0..661c0c8df6 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/shower_card.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/shower_card.py @@ -19,8 +19,6 @@ import re import os import logging -from six.moves import range - try: import madgraph except ImportError: diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/store4grid b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/store4grid index 0bac89d6c9..910e1cbe82 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/store4grid +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/store4grid @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First we need to get into the main directory # diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py index fb8dd3a74a..4792d8a651 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py @@ -19,8 +19,6 @@ import logging import re import xml.dom.minidom as minidom -from six.moves import range - logger = logging.getLogger('madevent.stdout') # -> stdout pjoin = os.path.join diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/systematics.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/systematics.py index 34ad5a6586..927f93ce1e 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/systematics.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/systematics.py @@ -15,8 +15,6 @@ from __future__ import division from __future__ import absolute_import -from six.moves import range -from six.moves import zip if __name__ == "__main__": import sys import os @@ -41,7 +39,7 @@ import re import sys import time -from six import StringIO +from io import StringIO pjoin = os.path.join root = os.path.dirname(__file__) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/particles.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/particles.py index 2ca0a71f33..5a17a46bb6 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/particles.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/particles.py @@ -219,7 +219,7 @@ width = Param.ZERO, texname = 'G0', antitexname = 'G0', - GoldstoneBoson = True, + goldstoneboson = True, charge = 0, GhostNumber = 0, Y = 0) @@ -233,7 +233,7 @@ width = Param.ZERO, texname = 'G+', antitexname = 'G-', - GoldstoneBoson = True, + goldstoneboson = True, charge = 1, GhostNumber = 0, Y = 0) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..9620cf3e3f 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/ufomodel/write_param_card.py @@ -109,18 +109,18 @@ def write_param(self, param, lhablock): else: text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real) self.fsock.write(text) - - - - + def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + + local_vars = {} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), {"cmath": cmath}, local_vars) except Exception: pass + text = "## Not dependent paramater.\n" text += "## Those values should be edited following analytical the \n" text += "## analytical expression. Some generator could simply ignore \n" @@ -132,15 +132,16 @@ def write_dep_param_block(self, lhablock): else: data = self.dep_width prefix = "DECAY " + for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, {"cmath": cmath}, local_vars)).real else: value = param.value - text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code, + text += """%s %s %f # %s : %s \n""" % (prefix, part.pdg_code, value, part.name, param.value) - self.fsock.write(text) + self.fsock.write(text) sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25] data="""Block QNUMBERS %(pdg)d # %(name)s diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/newprocess_mg5 b/epochX/cudacpp/susy_gg_tt.mad/bin/newprocess_mg5 index 8378f7bd8b..dba4767861 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/newprocess_mg5 +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/newprocess_mg5 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # First get to main level directory for this process # 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 ff86b89cd7..757c0f7799 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d516172f15..3aa2bb9514 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 abb34a8657..d672f1e1a5 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 5ef40ad902..b81f934340 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,8 +1,6 @@ WARNING:root:python3.12+ support: For reweighting feature, please use 3.6.X release. Running MG5 in debug mode Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT -Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.7.0. -It has been validated for the last time with version: 3.6.5 ************************************************************ * * * W E L C O M E to * @@ -15,8 +13,8 @@ It has been validated for the last time with version: 3.6.5 * * * * * * * * * * * * -* VERSION 3.7.0 2026-01-05 * -* GIT r991-8-gf0884cb7d HEAD * +* VERSION 3.7.1 2026-04-29 * +* GIT v3.7.1 HEAD * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * http://madgraph.phys.ucl.ac.be/ * @@ -49,12 +47,15 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs set lhapdf to /home/dmass/Apps/HEPTools/lhapdf6_py3/bin/lhapdf-config 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 -import /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt.mg +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 set zerowidth_tchannel F import model MSSM_SLHA2 +INFO: load particles +INFO: load vertices +DEBUG: model prefixing takes 0.1649765968322754  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  @@ -550,13 +551,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.103 s +1 processes with 3 diagrams generated in 0.042 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/copilot-igraph/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 @@ -565,30 +566,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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_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_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.090 s +ALOHA: aloha creates 2 routines in 0.043 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h -FileWriter for /home/dmass/Development/madgraph4gpu/copilot-igraph/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/copilot-igraph/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. and /home/dmass/Development/madgraph4gpu/copilot-igraph/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.091s -user 0m0.998s -sys 0m0.091s -Code generation completed in 1 seconds +real 0m0.848s +user 0m0.773s +sys 0m0.062s +Code generation completed in 0 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 59e9d29536..10c27d8bd9 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 58e1bfe668..1ec9f43b9f 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 ff86b89cd7..757c0f7799 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 d516172f15..3aa2bb9514 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // 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 abb34a8657..d672f1e1a5 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.7.0, 2026-01-05 +// MadGraph5_aMC@NLO v. 3.7.1, 2026-04-29 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //==========================================================================