Pythia Can't find unweighted_events LHE File

Asked by Max Fieg on 2020-06-22

Hello,

I have a small problem. When I try to run madgraph with pythia8 turned on, madgraph generates the LHE output no problem. But when it is Pythia's turn to run, I get the following error:

################################################
Command "generate_events run_04" interrupted with error:
IOError : [Errno 2] No such file or directory: '/data/users/mfieg/nxxbbM70_100k/Events/run_04/unweighted_events.lhe_0.lhe.gz'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/data/users/mfieg/nxxbbM70_100k/run_04_tag_1_debug.log'.
Please attach this file to your report.
#################################################

In this folder, I have 2 LHE files, one zipped and one not:
unweighted_events.lhe.gz
and
unweighted_events.lhe_0.lhe

So it seems like pythia is looking for the wrong filename, or there is some kind of renaming going on somewhere; any ideas for this? Perhaps it could be fixed by simply renaming the default LHE output, but I am not sure where to find this. Bug report attached below.

Thanks

#************************************************************
#* MadGraph5_aMC@NLO/MadEvent *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.7.2 2020-03-17 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadEvent *
#* *
#* run as ./bin/madevent.py filename *
#* *
#************************************************************
generate_events run_04
Traceback (most recent call last):
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/extended_cmd.py", line 1515, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/madevent_interface.py", line 2469, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/common_run_interface.py", line 6963, in new_fct
    original_fct(obj, *args, **opts)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/madevent_interface.py", line 2577, in run_generate_events
    self.exec_cmd('shower --no_default', postcmd=False, printcmd=False)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/extended_cmd.py", line 1544, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/madevent_interface.py", line 3854, in do_shower
    postcmd=False, printcmd=False)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/extended_cmd.py", line 1544, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/data/apps/madgraph5/v2.7.2/madgraph/interface/madevent_interface.py", line 4478, in do_pythia8
    pjoin(parallelization_dir,split_files[-1]))
  File "/usr/lib64/python2.6/shutil.py", line 260, in move
    copy2(src, real_dst)
  File "/usr/lib64/python2.6/shutil.py", line 95, in copy2
    copyfile(src, dst)
  File "/usr/lib64/python2.6/shutil.py", line 50, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/data/users/mfieg/nxxbbM70_100k/Events/run_04/unweighted_events.lhe_0.lhe.gz'
Related File: /data/users/mfieg/nxxbbM70_100k/Events/run_04/unweighted_events.lhe_0.lhe.gz
                              Run Options
                              -----------
               stdout_level : 20 (user set)

                         MadEvent Options
                         ----------------
     automatic_html_opening : False (user set)
        notification_center : True
          cluster_temp_path : None
             cluster_memory : None (user set)
               cluster_size : 100
              cluster_queue : None (user set)
                    nb_core : 64 (user set)
               cluster_time : 64 (user set)
                   run_mode : 2

                      Configuration Options
                      ---------------------
                text_editor : None
         cluster_local_path : None
      cluster_status_update : (600, 30)
               pythia8_path : /data/apps/madgraph5/v2.7.2/HEPTools/pythia8 (user set)
                  hwpp_path : None (user set)
            pythia-pgs_path : /data/apps/madgraph5/v2.7.2/pythia-pgs (user set)
                    td_path : None (user set)
               delphes_path : None (user set)
                thepeg_path : None (user set)
               cluster_type : condor
          madanalysis5_path : None (user set)
           cluster_nb_retry : 1
                 eps_viewer : None
                web_browser : None
               syscalc_path : None (user set)
           madanalysis_path : None (user set)
                     lhapdf : /data/apps/madgraph5/v2.7.2/HEPTools/lhapdf6/bin/lhapdf-config (user set)
              f2py_compiler : None
                 hepmc_path : None (user set)
         cluster_retry_wait : 300
           fortran_compiler : None
                auto_update : 7 (user set)
        exrootanalysis_path : None (user set)
                    timeout : 60
               cpp_compiler : None
#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.7.0 2020-01-20 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#************************************************************
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
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
import model xxy
add process xr xr > b b~
output nxxbbM70_100k
######################################################################
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 FOLLOWING UFO MODEL ####
######################################################################
## ##
## Width set on Auto will be computed following the information ##
## present in the decay.py files of the model. ##
## See arXiv:1402.1178 for more details. ##
## ##
######################################################################

###################################
## INFORMATION FOR CKMBLOCK
###################################
Block ckmblock
    1 2.277360e-01 # cabi

###################################
## INFORMATION FOR DMINPUTS
###################################
Block dminputs
    1 1.000000e+00 # gSXr
    2 0.000000e+00 # gSXc
    3 1.000000e+00 # gSXd
    4 0.000000e+00 # gPXd
    5 1.000000e+00 # gSd11
    6 1.000000e+00 # gSu11
    7 1.000000e+00 # gSd22
    8 1.000000e+00 # gSu22
    9 1.000000e+00 # gSd33
   10 1.000000e+00 # gSu33
   11 0.000000e+00 # gPd11
   12 0.000000e+00 # gPu11
   13 0.000000e+00 # gPd22
   14 0.000000e+00 # gPu22
   15 0.000000e+00 # gPd33
   16 0.000000e+00 # gPu33
   17 1.000000e+04 # Lambda
   18 0.000000e+00 # gSg
   19 0.000000e+00 # gPg

###################################
## INFORMATION FOR MASS
###################################
Block mass
    1 5.040000e-03 # MD
    2 2.550000e-03 # MU
    3 1.010000e-01 # MS
    4 1.270000e+00 # MC
    5 4.700000e+00 # MB
    6 1.720000e+02 # MT
   11 5.110000e-04 # Me
   13 1.056600e-01 # MMU
   15 1.777000e+00 # MTA
   23 9.118760e+01 # MZ
   25 1.250000e+02 # MH
   51 1.000000e+01 # MXc
   52 1.000000e+01 # MXd
   54 1.000000e+05 # MY0
  5000001 1.000000e+01 # MXr
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
  12 0.000000e+00 # ve : 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 7.982436e+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.279000e+02 # aEWM1
    2 1.166370e-05 # Gf
    3 1.184000e-01 # aS

###################################
## INFORMATION FOR YUKAWA
###################################
Block yukawa
    1 5.040000e-03 # ymdo
    2 2.550000e-03 # ymup
    3 1.010000e-01 # yms
    4 1.270000e+00 # ymc
    5 4.700000e+00 # ymb
    6 1.720000e+02 # ymt
   11 5.110000e-04 # yme
   13 1.056600e-01 # ymm
   15 1.777000e+00 # ymtau

###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 1.508336e+00 # WT
DECAY 23 2.495200e+00 # WZ
DECAY 24 2.085000e+00 # WW
DECAY 25 4.070000e-03 # WH
DECAY 54 1.000000e+01 # WY0
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
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
DECAY 51 0.000000e+00 # xc : 0.0
DECAY 52 0.000000e+00 # xd : 0.0
DECAY 5000001 0.000000e+00 # xr : 0.0
#===========================================================
# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
#===========================================================

Block QNUMBERS 5000001 # xr
        1 0 # 3 times electric charge
        2 1 # number of spin states (2S+1)
        3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 0 # Particle/Antiparticle distinction (0=own anti)
Block QNUMBERS 51 # xc
        1 0 # 3 times electric charge
        2 1 # number of spin states (2S+1)
        3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 1 # Particle/Antiparticle distinction (0=own anti)
Block QNUMBERS 52 # xd
        1 0 # 3 times electric charge
        2 2 # number of spin states (2S+1)
        3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 1 # Particle/Antiparticle distinction (0=own anti)
Block QNUMBERS 54 # y0
        1 0 # 3 times electric charge
        2 1 # number of spin states (2S+1)
        3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 0 # Particle/Antiparticle distinction (0=own anti)
#*********************************************************************
# MadGraph5_aMC@NLO *
# *
# run_card.dat MadEvent *
# *
# This file is used to set the parameters of the run. *
# *
# Some notation/conventions: *
# *
# Lines starting with a '# ' are info or comments *
# *
# mind the format: value = variable ! comment *
# *
# To display more options, you can type the command: *
# update full_run_card *
#*********************************************************************
#
#*********************************************************************
# Tag name for the run (one word) *
#*********************************************************************
  tag_1 = run_tag ! name of the run
#*********************************************************************
# Number of events and rnd seed *
# Warning: Do not generate more than 1M events in a single run *
#*********************************************************************
  1 = nevents ! Number of unweighted events requested
  0 = iseed ! rnd seed (0=assigned automatically=default))
#*********************************************************************
# Collider type and energy *
# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=photon from proton, *
# 3=photon from electron *
#*********************************************************************
  0 = lpp1 ! beam 1 type
  0 = lpp2 ! beam 2 type
  70.0 = ebeam1 ! beam 1 total energy in GeV
  70.0 = ebeam2 ! beam 2 total energy in GeV
#*********************************************************************
# Beam polarization from -100 (left-handed) to 100 (right-handed) *
#*********************************************************************
  0.0 = polbeam1 ! beam polarization for beam 1
  0.0 = polbeam2 ! beam polarization for beam 2

#*********************************************************************
# PDF CHOICE: this automatically fixes also alpha_s and its evol. *
#*********************************************************************
  nn23lo1 = pdlabel ! PDF set
  230000 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number
# To see heavy ion options: type "update ion_pdf"
#*********************************************************************
# Renormalization and factorization scales *
#*********************************************************************
  False = fixed_ren_scale ! if .true. use fixed ren scale
  False = fixed_fac_scale ! if .true. use fixed fac scale
  91.188 = scale ! fixed ren scale
  91.188 = dsqrt_q2fact1 ! fixed fact scale for pdf1
  91.188 = dsqrt_q2fact2 ! fixed fact scale for pdf2
  -1 = dynamical_scale_choice ! Choose one of the preselected dynamical choices
  1.0 = scalefact ! scale factor for event-by-event scales
#*********************************************************************
# Type and output format
#*********************************************************************
  False = gridpack !True = setting up the grid pack
  -1.0 = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)
  average = event_norm ! average/sum. Normalization of the weight in the LHEF
# To see MLM/CKKW merging options: type "update MLM" or "update CKKW"

#*********************************************************************
#
#*********************************************************************
# handling of the helicities:
# 0: sum over all helicities
# 1: importance sampling over helicities
#*********************************************************************
  0 = nhel ! using helicities importance sampling or not.
#*********************************************************************
# Generation bias, check the wiki page below for more information: *
# 'cp3.irmp.ucl.ac.be/projects/madgraph/wiki/LOEventGenerationBias' *
#*********************************************************************
  None = bias_module ! Bias type of bias, [None, ptj_bias, -custom_folder-]
  {} = bias_parameters ! Specifies the parameters of the module.
#
#*******************************
# Parton level cuts definition *
#*******************************
#
#
#*********************************************************************
# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$" and decay
#*********************************************************************
  10000000.0 = bwcutoff ! (M+/-bwcutoff*Gamma)
#*********************************************************************
# Standard Cuts *
#*********************************************************************
# Minimum and maximum pt's (for max, -1 means no cut) *
#*********************************************************************
  0.0 = ptb ! minimum pt for the b
  -1.0 = ptbmax ! maximum pt for the b
  {} = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle
  {} = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50})
#
# For display option for energy cut in the partonic center of mass frame type 'update ecut'
#
#*********************************************************************
# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
#*********************************************************************
  -1.0 = etab ! max rap for the b
  0.0 = etabmin ! min rap for the b
  {} = eta_min_pdg ! rap cut for other particles (use pdg code). Applied on particle and anti-particle
  {} = eta_max_pdg ! rap cut for other particles (syntax e.g. {6: 2.5, 23: 5})
#*********************************************************************
# Minimum and maximum DeltaR distance *
#*********************************************************************
  0.0 = drbb ! min distance between b's
  -1.0 = drbbmax ! max distance between b's
#*********************************************************************
# Minimum and maximum invariant mass for pairs *
#*********************************************************************
  0.0 = mmbb ! min invariant mass of a b pair
  -1.0 = mmbbmax ! max invariant mass of a b pair
  {} = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})
  {'default': False} = mxx_only_part_antipart ! if True the invariant mass is applied only
                       ! to pairs of particle/antiparticle and not to pairs of the same pdg codes.
#*********************************************************************
# Inclusive cuts *
#*********************************************************************
  0.0 = xptb ! minimum pt for at least one b
 #*********************************************************************
 # Control the Ht(k)=Sum of k leading jets *
 #*********************************************************************
  0.0 = ihtmin !inclusive Ht for all partons (including b)
  -1.0 = ihtmax !inclusive Ht for all partons (including b)
#*********************************************************************
# maximal pdg code for quark to be considered as a light jet *
# (otherwise b cuts are applied) *
#*********************************************************************
  4 = maxjetflavor ! Maximum jet pdg code
#*********************************************************************
#
#*********************************************************************
# Store info for systematics studies *
# WARNING: Do not use for interference type of computation *
#*********************************************************************
  False = use_syst ! Enable systematics studies
#
  systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++]
['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule
# Syscalc is deprecated but to see the associate options type'update syscalc'#*********************************************************************
# Additional hidden parameters
#*********************************************************************
  ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments # Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Max Fieg
Solved:
2020-06-25
Last query:
2020-06-25
Last reply:
2020-06-22

Hi,

Do you have access to python2.7 ? (or 3.7 or 3.8)
python2.6 is out of support (by python collaboration) since 2014.
What you are facing is related to a python2.6 bug that has been fixed in python2.7 (which is actually also out of support now).

We are going to drop the possibility to run with python2.6 very soon now (likely for MG5aMC 2.8) so I do not think it makes sense to implement additional work around for that bug in the code.

Cheers,

Olivier

Max Fieg (maxfieg) said : #2

Thanks for the quick reply Oliver

Yes I believe we have access to python 2.7; this question concerns running mg5 on an HPC cluster. To solve this problem, do we just have recompile everything using 2.7?

The operator at my cluster compiled it, I'm not sure why it was done on 2.6.

Thanks

Hi,

HPC cluster typically uses "module" to allow user to choose their version of Python.
trying to do
module spider Python
or
module av Python
should give you details of which version of Python was installed by your sys-admin.

> The
> operator at my cluster compiled it, I'm not sure why it was done on
> 2.6.

MadGraph is not compiled...
I guess that you use a default python version shipped on centos6.
(note that centos6 is also on end of life --in october--, which means soon your sys-admin will have to change the image of those machines for security issues)

> To solve this problem, do we just have
> recompile everything using 2.7?

just load your python2.7 module, then launch madgraph

Cheers,

Olivier

> On 22 Jun 2020, at 22:25, Max Fieg <email address hidden> wrote:
>
> Question #691471 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/691471
>
> Max Fieg posted a new comment:
> Thanks for the quick reply Oliver
>
> Yes I believe we have access to python 2.7; this question concerns
> running mg5 on an HPC cluster. To solve this problem, do we just have
> recompile everything using 2.7?
>
> The operator at my cluster compiled it, I'm not sure why it was done on
> 2.6.
>
> Thanks
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Max Fieg (maxfieg) said : #4

You've done it again Olivier. Reloading python worked like a charm