Is it possible to make several copies of a Madgraph output directory and launch it in some parallel runs?

Asked by Reza Jafari

Dear Experts,

I'm trying to "launch" the same directory of Madgraph output that has been copied multiple times with several parallel runs. I do this in order to split the cores so that the total run time is reduced when Delphes is running. But I get the following error. Could you please let me know how I can solve this issue?

Thanks,
Reza
--

command "multi_run 5" with error:
AttributeError : 'NoneType' object has no attribute 'cluster_submit'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo

Here is the debug log file contents:

#************************************************************
#* MadGraph5_aMC@NLO/MadEvent *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.7.3 20xx-xx-xx *
#* *
#* 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 *
#* *
#************************************************************
multi_run 5
Traceback (most recent call last):
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1515, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1155, in do_import
    self.import_command_file(args[1])
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1661, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1544, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/madevent_interface.py", line 2964, in do_multi_run
    self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1544, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/madevent_interface.py", line 2468, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/common_run_interface.py", line 7011, in new_fct
    original_fct(obj, *args, **opts)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/madevent_interface.py", line 2508, in run_generate_events
    postcmd=False)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1544, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/madevent_interface.py", line 3360, in do_survey
    jobs, P_zero_result = ajobcreator.launch()
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/gen_ximprove.py", line 192, in launch
    self.submit_to_cluster(job_list)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/gen_ximprove.py", line 277, in submit_to_cluster
    return self.submit_to_cluster_no_splitting(job_list)
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/gen_ximprove.py", line 307, in submit_to_cluster_no_splitting
    cwd=pjoin(self.me_dir,'SubProcesses' , Pdir))
  File "/data/rjafari/MG/MG5_b2/b21/bin/internal/madevent_interface.py", line 5510, in launch_job
    self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument,
AttributeError: 'NoneType' object has no attribute 'cluster_submit'
                              Run Options
                              -----------
               stdout_level : None

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

                      Configuration Options
                      ---------------------
                text_editor : None
         cluster_local_path : None
      cluster_status_update : (600, 30)
               pythia8_path : /data/rjafari/MG/MG5_b1/HEPTools/pythia8 (user set)
                  hwpp_path : None (user set)
            pythia-pgs_path : None (user set)
                    td_path : None (user set)
               delphes_path : /data/rjafari/MG/MG5_b2/Delphes (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/rjafari/MG/MG5_b1/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.3 2020-06-21 *
#* *
#* 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
define p = p b b~
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~
define p = p b b~
define j = j b b~
generate p e- > vl j c c~ /z weighted<=99
output b2
######################################################################
## 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 MASS
###################################
Block mass
    5 4.700000e+00 # MB
    6 1.730000e+02 # MT
   15 1.777000e+00 # MTA
   23 9.118800e+01 # MZ
   25 1.250000e+02 # MH
## 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.
  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
  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
    5 4.700000e+00 # ymb
    6 1.730000e+02 # ymt
   15 1.777000e+00 # ymtau

###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 1.491500e+00 # WT
DECAY 23 2.441404e+00 # WZ
DECAY 24 2.047600e+00 # WW
DECAY 25 6.382339e-03 # WH
## 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
#*********************************************************************
# 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 *
#*********************************************************************
  200000 = 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 *
#*********************************************************************
  1 = lpp1 ! beam 1 type
  0 = lpp2 ! beam 2 type
  7000.0 = ebeam1 ! beam 1 total energy in GeV
  60.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
#*********************************************************************
  15.0 = bwcutoff ! (M+/-bwcutoff*Gamma)
#*********************************************************************
# Standard Cuts *
#*********************************************************************
# Minimum and maximum pt's (for max, -1 means no cut) *
#*********************************************************************
  10.0 = ptj ! minimum pt for the jets
  0.0 = misset ! minimum missing Et (sum of neutrino's momenta)
  -1.0 = ptjmax ! maximum pt for the jets
  -1.0 = missetmax ! maximum missing Et (sum of neutrino's momenta)
  {} = 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) *
#*********************************************************************
  5.0 = etaj ! max rap for the jets
  {} = 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.4 = drjj ! min distance between jets
  -1.0 = drjjmax ! max distance between jets
#*********************************************************************
# Minimum and maximum invariant mass for pairs *
#*********************************************************************
  0.0 = mmjj ! min invariant mass of a jet pair
  -1.0 = mmjjmax ! max invariant mass of a jet 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 = xptj ! minimum pt for at least one jet
 #*********************************************************************
 # Control the pt's of the jets sorted by pt *
 #*********************************************************************
  0.0 = ptj1min ! minimum pt for the leading jet in pt
  0.0 = ptj2min ! minimum pt for the second jet in pt
  0.0 = ptj3min ! minimum pt for the third jet in pt
  -1.0 = ptj1max ! maximum pt for the leading jet in pt
  -1.0 = ptj2max ! maximum pt for the second jet in pt
  -1.0 = ptj3max ! maximum pt for the third jet in pt
  0 = cutuse ! reject event if fails any (0) / all (1) jet pt cuts
 #*********************************************************************
 # Control the Ht(k)=Sum of k leading jets *
 #*********************************************************************
  0.0 = htjmin ! minimum jet HT=Sum(jet pt)
  -1.0 = htjmax ! maximum jet HT=Sum(jet pt)
  0.0 = ihtmin !inclusive Ht for all partons (including b)
  -1.0 = ihtmax !inclusive Ht for all partons (including b)
  0.0 = ht2min ! minimum Ht for the two leading jets
  0.0 = ht3min ! minimum Ht for the three leading jets
  -1.0 = ht2max ! maximum Ht for the two leading jets
  -1.0 = ht3max ! maximum Ht for the three leading jets
 #*********************************************************************
 # WBF cuts *
 #*********************************************************************
  0.0 = xetamin ! minimum rapidity for two jets in the WBF case
  0.0 = deltaeta ! minimum rapidity for two jets in the WBF case
#*********************************************************************
# 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 *
#*********************************************************************
  True = 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
#*********************************************************************
  10.0 = ptl # hidden_parameter
  0.4 = drll # hidden_parameter
  10.0 = ptb # hidden_parameter
  10.0 = pta # hidden_parameter
  5.0 = etal # hidden_parameter
  ['--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.
  0.4 = drbb # hidden_parameter
  True = cut_decays # hidden_parameter
  0.4 = drbl # hidden_parameter
  0.4 = drbj # hidden_parameter
  5.0 = etaa # hidden_parameter
  5.0 = etab # hidden_parameter
  0.4 = drjl # hidden_parameter
  0.4 = draa # hidden_parameter
  0.4 = drab # hidden_parameter
  0.4 = dral # hidden_parameter
  0.4 = draj # hidden_parameter

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

You can do that in principle, but you then need to setup a starting seed for each directory and check that the seed does not overlap.
The seed is update by X after each run, where X is a number which should be equal to the number of Subprocesses/channel for your process. So in general, I run twice and check the value of the seed between the two run (written in the event banner) to know the value of X.

Then if I want to run N times in M different directory, I need to ensure that the starting seed in each of the M directory is at least
X*N apart.

For the crash, my first suggestion is to try with 2.9.13, they are so many bug fix (and so many years) between 2.7.3 and 2.9.13 that is possible that your crash above has already been fixed. I'm not able to run 2.7.3 on my laptop anymore and therefore I will not able to provide a patch/check that version to see what's going on.

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Reza Jafari for more information if necessary.

To post a message you must log in.