Command "launch auto " interrupted with error: IndexError : list index out of range when generating FO events

Asked by Hesham El Faham on 2020-09-16

I am trying to run a NLO QCD process generating fixed order events. Everything works fine and I get a summary report with the process cross-section prompted, also a quite big .lhe file suggesting that the generation ran "properly". However, I get this error message by the end of the generation process:
-->
Command "launch auto " interrupted with error:
IndexError : list index out of range
<--
this error is not consistent, sometimes it appears and sometimes not, and I am not sure if I can consistently reproduce it.
the debug file is here:
-->
launch auto
Traceback (most recent call last):
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/interface/extended_cmd.py", line 1515, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/interface/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/interface/amcatnlo_run_interface.py", line 1688, in do_launch
    evt_file = self.run(mode, options)
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/interface/amcatnlo_run_interface.py", line 1860, in run
    self.finalise_run_FO(folder_names[mode],jobs_to_collect)
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/interface/amcatnlo_run_interface.py", line 2934, in finalise_run_FO
    self.combine_plots_FO(folder_name,jobs)
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/interface/amcatnlo_run_interface.py", line 2669, in combine_plots_FO
    self.combine_FO_lhe(jobs)
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/interface/amcatnlo_run_interface.py", line 2760, in combine_FO_lhe
    and event == neweventsgroup[-1]:
  File "/auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/madgraph/various/lhe_parser.py", line 2138, in __eq__
    if p.E != other[i].E:
IndexError: list index out of range
Value of current Options:
              text_editor : None
             notification_center : True
             cluster_local_path : /cvmfs/cp3.uclouvain.be/madgraph/
             default_unset_couplings : 99
             group_subprocesses : Auto
             ignore_six_quark_processes : False
             loop_optimized_output : True
             cluster_status_update : (900, 60)
             fortran_compiler : None
             hepmc_path : None
             collier : ./HEPTools/lib
              auto_update : 7
             pythia8_path : /auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/HEPTools/pythia8
             hwpp_path : None
             low_mem_multicore_nlo_generation : False
             golem : None
             pythia-pgs_path : None
             td_path : None
             delphes_path : None
             thepeg_path : None
             cluster_type : slurm
             madanalysis5_path : None
             exrootanalysis_path : None
             OLP : MadLoop
             applgrid : applgrid-config
             eps_viewer : None
             fastjet : None
             run_mode : 1
             web_browser : None
             automatic_html_opening : False
             cluster_temp_path : None
             cluster_size : 150
             cluster_queue : None
             syscalc_path : None
             madanalysis_path : None
             lhapdf : /home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/HEPTools/lhapdf6/bin/lhapdf-config
             stdout_level : 20
             nb_core : 5
             f2py_compiler : None
             ninja : /home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/HEPTools/lib
             amcfast : amcfast-config
             cluster_retry_wait : 300
             output_dependencies : external
             crash_on_error : False
             mg5amc_py8_interface_path : /auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2/HEPTools/MG5aMC_PY8_interface
              loop_color_flows : False
              samurai : None
              cluster_nb_retry : 1
              mg5_path : /auto/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v2_7_2
              timeout : 60
              gauge : unitary
              complex_mass_scheme : False
              cpp_compiler : None
              max_npoint_for_channel : 0
set default_unset_couplings 99
set group_subprocesses Auto
set ignore_six_quark_processes False
set loop_optimized_output True
set loop_color_flows False
set gauge unitary
set complex_mass_scheme False
set max_npoint_for_channel 0
import model sm-no_b_mass
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
define p = 21 2 4 1 3 -2 -4 -1 -3 5 -5 # pass to 5 flavors
define j = p
define p = g u c d s u~ c~ d~ s~ b b~
define j = g u c d s u~ c~ d~ s~ b b~
define w = w+ w-
define tt = t t~
define l+ = e+ mu+
define l- = e- mu-
import model loop_sm-no_b_mass
generate p p > tt w l+ l- [QCD]
output /nfs/scratch/fynu/elfaham/tllW_NLO_5F
######################################################################
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 ####
######################################################################
###################################
## INFORMATION FOR LOOP
###################################
BLOCK LOOP #
      1 9.118800e+01 # mu_r
###################################
## INFORMATION FOR MASS
###################################
BLOCK MASS #
      6 1.730000e+02 # mt
      15 1.777000e+00 # mta
      23 9.118800e+01 # mz
      25 1.250000e+02 # mh
      1 0.000000e+00 # d : 0.0
      2 0.000000e+00 # u : 0.0
      3 0.000000e+00 # s : 0.0
      4 0.000000e+00 # c : 0.0
      5 0.000000e+00 # b : 0.0
      11 0.000000e+00 # e- : 0.0
      12 0.000000e+00 # ve : 0.0
      13 0.000000e+00 # mu- : 0.0
      14 0.000000e+00 # vm : 0.0
      16 0.000000e+00 # vt : 0.0
      21 0.000000e+00 # g : 0.0
      22 0.000000e+00 # a : 0.0
      24 8.041900e+01 # w+ : cmath.sqrt(mz__exp__2/2. + cmath.sqrt(mz__exp__4/4. - (aew*cmath.pi*mz__exp__2)/(gf*sqrt__2)))
###################################
## INFORMATION FOR SMINPUTS
###################################
BLOCK SMINPUTS #
      1 1.325070e+02 # aewm1
      2 1.166390e-05 # gf
      3 1.180000e-01 # as
###################################
## INFORMATION FOR YUKAWA
###################################
BLOCK YUKAWA #
      6 1.730000e+02 # ymt
      15 1.777000e+00 # ymtau
###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 0.000000e+00 # wt
DECAY 23 2.441404e+00 # wz
DECAY 24 2.047600e+00 # ww
DECAY 25 6.382339e-03 # wh
DECAY 1 0.000000e+00 # d : 0.0
DECAY 2 0.000000e+00 # u : 0.0
DECAY 3 0.000000e+00 # s : 0.0
DECAY 4 0.000000e+00 # c : 0.0
DECAY 5 0.000000e+00 # b : 0.0
DECAY 11 0.000000e+00 # e- : 0.0
DECAY 12 0.000000e+00 # ve : 0.0
DECAY 13 0.000000e+00 # mu- : 0.0
DECAY 14 0.000000e+00 # vm : 0.0
DECAY 15 0.000000e+00 # ta- : 0.0
DECAY 16 0.000000e+00 # vt : 0.0
DECAY 21 0.000000e+00 # g : 0.0
DECAY 22 0.000000e+00 # a : 0.0
###################################
## INFORMATION FOR QNUMBERS 82
###################################
BLOCK QNUMBERS 82 # gh
      1 0 # 3 times electric charge
      2 1 # number of spin states (2s+1)
      3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
      4 1 # particle/antiparticle distinction (0=own anti)
#
#*******************
# Running parameters
#*******************
#
#***********************************************************************
# Tag name for the run (one word) *
#***********************************************************************
  run_01 = run_tag ! name of the run
#***********************************************************************
# Number of LHE events (and their normalization) and the required *
# (relative) accuracy on the Xsec. *
# These values are ignored for fixed order runs *
#***********************************************************************
  500000 = nevents ! Number of unweighted events requested
  -1.0 = req_acc ! Required accuracy (-1=auto determined from nevents)
  -1 = nevt_job ! Max number of events per job in event generation.
                 ! (-1= no split).
#***********************************************************************
# Normalize the weights of LHE events such that they sum or average to *
# the total cross section *
#***********************************************************************
  average = event_norm ! valid settings: average, sum, bias
#***********************************************************************
# Number of points per itegration channel (ignored for aMC@NLO runs) *
#***********************************************************************
  0.001 = req_acc_fo ! Required accuracy (-1=ignored, and use the
                           ! number of points and iter. below)
# These numbers are ignored except if req_acc_FO is equal to -1
  5000 = npoints_fo_grid ! number of points to setup grids
  4 = niters_fo_grid ! number of iter. to setup grids
  10000 = npoints_fo ! number of points to compute Xsec
  6 = niters_fo ! number of iter. to compute Xsec
#***********************************************************************
# Random number seed *
#***********************************************************************
  0 = iseed ! rnd seed (0=assigned automatically=default))
#***********************************************************************
# Collider type and energy *
#***********************************************************************
  1 = lpp1 ! beam 1 type (0 = no PDF)
  1 = lpp2 ! beam 2 type (0 = no PDF)
  6500.0 = ebeam1 ! beam 1 energy in GeV
  6500.0 = ebeam2 ! beam 2 energy in GeV
#***********************************************************************
# PDF choice: this automatically fixes also alpha_s(MZ) and its evol. *
#***********************************************************************
  lhapdf = pdlabel ! PDF set
  303400 = lhaid ! If pdlabel=lhapdf, this is the lhapdf number. Only
              ! numbers for central PDF sets are allowed. Can be a list;
              ! PDF sets beyond the first are included via reweighting.
#***********************************************************************
# Include the NLO Monte Carlo subtr. terms for the following parton *
# shower (HERWIG6 | HERWIGPP | PYTHIA6Q | PYTHIA6PT | PYTHIA8) *
# WARNING: PYTHIA6PT works only for processes without FSR!!!! *
  PYTHIA8 = parton_shower
  1.0 = shower_scale_factor ! multiply default shower starting
                                  ! scale by this factor
#***********************************************************************
# Renormalization and factorization scales *
# (Default functional form for the non-fixed scales is the sum of *
# the transverse masses divided by two of all final state particles *
# and partons. This can be changed in SubProcesses/set_scales.f or via *
# dynamical_scale_choice option) *
#***********************************************************************
  False = fixed_ren_scale ! if .true. use fixed ren scale
  False = fixed_fac_scale ! if .true. use fixed fac scale
  91.118 = mur_ref_fixed ! fixed ren reference scale
  91.118 = muf_ref_fixed ! fixed fact reference scale
  -1 = dynamical_scale_choice ! Choose one (or more) of the predefined
           ! dynamical choices. Can be a list; scale choices beyond the
           ! first are included via reweighting
  0.5 = mur_over_ref ! ratio of current muR over reference muR
  0.5 = muf_over_ref ! ratio of current muF over reference muF
#***********************************************************************
# Reweight variables for scale dependence and PDF uncertainty *
#***********************************************************************
  1.0, 2.0, 0.5 = rw_rscale ! muR factors to be included by reweighting
  1.0, 2.0, 0.5 = rw_fscale ! muF factors to be included by reweighting
  True = reweight_scale ! Reweight to get scale variation using the
            ! rw_rscale and rw_fscale factors. Should be a list of
            ! booleans of equal length to dynamical_scale_choice to
            ! specify for which choice to include scale dependence.
  False = reweight_pdf ! Reweight to get PDF uncertainty. Should be a
            ! list booleans of equal length to lhaid to specify for
            ! which PDF set to include the uncertainties.
#***********************************************************************
# Store reweight information in the LHE file for off-line model- *
# parameter reweighting at NLO+PS accuracy *
#***********************************************************************
  False = store_rwgt_info ! Store info for reweighting in LHE file
#***********************************************************************
# ickkw parameter: *
# 0: No merging *
# 3: FxFx Merging - WARNING! Applies merging only at the hard-event *
# level. After showering an MLM-type merging should be applied as *
# well. See http://amcatnlo.cern.ch/FxFx_merging.htm for details. *
# 4: UNLOPS merging (with pythia8 only). No interface from within *
# MG5_aMC available, but available in Pythia8. *
# -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]. *
#***********************************************************************
  0 = ickkw
#***********************************************************************
#
#***********************************************************************
# BW cutoff (M+/-bwcutoff*Gamma). Determines which resonances are *
# written in the LHE event file *
#***********************************************************************
  15.0 = bwcutoff
#***********************************************************************
# Cuts on the jets. Jet clustering is performed by FastJet. *
# - When matching to a parton shower, these generation cuts should be *
# considerably softer than the analysis cuts. *
# - More specific cuts can be specified in SubProcesses/cuts.f *
#***********************************************************************
  1.0 = jetalgo ! FastJet jet algorithm (1=kT, 0=C/A, -1=anti-kT)
  0.7 = jetradius ! The radius parameter for the jet algorithm
  10.0 = ptj ! Min jet transverse momentum
  -1.0 = etaj ! Max jet abs(pseudo-rap) (a value .lt.0 means no cut)
#***********************************************************************
# Cuts on the charged leptons (e+, e-, mu+, mu-, tau+ and tau-) *
# More specific cuts can be specified in SubProcesses/cuts.f *
#***********************************************************************
  0.0 = ptl ! Min lepton transverse momentum
  -1.0 = etal ! Max lepton abs(pseudo-rap) (a value .lt.0 means no cut)
  0.0 = drll ! Min distance between opposite sign lepton pairs
  0.0 = drll_sf ! Min distance between opp. sign same-flavor lepton pairs
  30.0 = mll ! Min inv. mass of all opposite sign lepton pairs
  30.0 = mll_sf ! Min inv. mass of all opp. sign same-flavor lepton pairs
#***********************************************************************
# Photon-isolation cuts, according to hep-ph/9801442. When ptgmin=0, *
# all the other parameters are ignored. *
# More specific cuts can be specified in SubProcesses/cuts.f *
#***********************************************************************
  20.0 = ptgmin ! Min photon transverse momentum
  -1.0 = etagamma ! Max photon abs(pseudo-rap)
  0.4 = r0gamma ! Radius of isolation code
  1.0 = xn ! n parameter of eq.(3.4) in hep-ph/9801442
  1.0 = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
  True = isoem ! isolate photons from EM energy (photons and leptons)
#***********************************************************************
# Cuts associated to MASSIVE particles identified by their PDG codes. *
# All cuts are applied to both particles and anti-particles, so use *
# POSITIVE PDG CODES only. Example of the syntax is {6 : 100} or *
# {6:100, 25:200} for multiple particles *
#***********************************************************************
  {} = pt_min_pdg ! Min pT for a massive particle
  {} = pt_max_pdg ! Max pT for a massive particle
  {} = mxx_min_pdg ! inv. mass for any pair of (anti)particles
#***********************************************************************
# For aMCfast+APPLGRID use in PDF fitting (http://amcfast.hepforge.org)*
#***********************************************************************
  0 = iappl ! aMCfast switch (0=OFF, 1=prepare grids, 2=fill grids)
#***********************************************************************
#*********************************************************************
# Additional hidden parameters
#*********************************************************************
  5 = maxjetflavor # hidden_parameter
<--
May you please help with that? Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2020-09-28
Last query:
2020-09-28
Last reply:
2020-09-16

Hi,

I guess the quickest way to avoid that is to use the flag:
FO_LHE_postprocessing = noidentification
in the FO_analyse_card.dat

Here is the description of that mode (from the UpdatesNotes):

     OM+RF: Allowing for creation of LHE like output of the fixed order run at NLO.
          This LHEF file is unvalid for parton-shower (all PS should crash on such file). It will be
          unphysical to shower such sample anyway.
          Two hidden parameters of the FO_analyse_card.dat allow some control on the LHEF creation
          "fo_lhe_weight_ratio" allows to control the strength of a partial unweighting [default:1e-3]
             increasing this number reduce the LHEF size.
          "fo_lhe_postprocessing" can take value like nogrouping, norandom, noidentification.
             nogrouping forbids the appearance of the LHEF(version2) tag <eventgroup>
             norandom does not apply the randomization of the events.
             noidentification does not merge born event with other born like counter-event

Otherwise you can use the following patch:
=== modified file 'madgraph/various/lhe_parser.py'
--- madgraph/various/lhe_parser.py 2020-04-23 19:05:44 +0000
+++ madgraph/various/lhe_parser.py 2020-09-16 21:05:34 +0000
@@ -2142,6 +2142,8 @@

         if other is None:
             return False
+ if len(self) != len(other):
+ return False

         for i,p in enumerate(self):
             if p.E != other[i].E:

Thanks for the help and the very clear bug report,

Cheers,

Olivier

> On 16 Sep 2020, at 20:05, Hesham El Faham <email address hidden> wrote:
>
> _2/madgraph/interface/amcatnlo_run_interface.py

Hesham El Faham (helfaham) said : #2

Thanks Olivier Mattelaer, that solved my question.