Madgraph taking a long time to compile the process

Asked by Shu Tian Eu

Hi, I am trying to generate a process: mu+ mu- > mu+ mu- z z z z QCD=0, and Madgraph is taking a very long time to compile the process:
Generating 100 events with run name run_01
survey run_01
INFO: compile directory
compile Source Directory
Using random number seed offset = 24
INFO: Running Survey
Creating Jobs
Working on SubProcesses
INFO: Compiling for process 1/1.
INFO: P1_ll_llzzzz
 27%|████████████████████████████████████████▋ | 5573/20961 [32:08:11<137:36:04, 32.19s/it]

May I know if this is something expected? Thank you!

For your reference, it was the SM default parameter card used, and the run card:
# Number of events and rnd seed *
# Warning: Do not generate more than 1M events in a single run *
#*********************************************************************
  100 = 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, 4=photon from muon *
#*********************************************************************
     0 = lpp1 ! beam 1 type
     0 = lpp2 ! beam 2 type
     1500.0 = ebeam1 ! beam 1 total energy in GeV
     1500.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"

#*********************************************************************
#
#*********************************************************************
# Phase-Space Optimization strategy (basic options)
#*********************************************************************
   0 = nhel ! using helicities importance sampling or not.
                             ! 0: sum over helicity, 1: importance sampling
   1 = sde_strategy ! default integration strategy (hep-ph/2021.00773)
                             ! 1 is old strategy (using amp square)
        ! 2 is new strategy (using only the denominator)
# To see advanced option for Phase-Space optimization: type "update psoptim"
#*********************************************************************
# 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) *
#*********************************************************************
 30.0 = ptl ! minimum pt for the charged leptons
 -1.0 = ptlmax ! maximum pt for the charged leptons
 {} = 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})
#*********************************************************************
# Minimum and maximum E's (in the center of mass frame) *
#*********************************************************************
  0.0 = ej ! minimum E for the jets
  0.0 = eb ! minimum E for the b
  0.0 = ea ! minimum E for the photons
  0.0 = el ! minimum E for the charged leptons
  -1.0 = ejmax ! maximum E for the jets
 -1.0 = ebmax ! maximum E for the b
 -1.0 = eamax ! maximum E for the photons
 -1.0 = elmax ! maximum E for the charged leptons
 {} = e_min_pdg ! E cut for other particles (use pdg code). Applied on particle and anti-particle
 {} = e_max_pdg ! E cut for other particles (syntax e.g. {6: 100, 25: 50})

#*********************************************************************
# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
#*********************************************************************
 2.5 = etal ! max rap for the charged leptons
 0.0 = etalmin ! main rap for the charged leptons
 {} = 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 = drll ! min distance between leptons
 -1.0 = drllmax ! max distance between leptons
#*********************************************************************
# Minimum and maximum invariant mass for pairs *
#*********************************************************************
 0.0 = mmll ! min invariant mass of l+l- (same flavour) lepton pair
 -1.0 = mmllmax ! max invariant mass of l+l- (same flavour) lepton 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.
 #*********************************************************************
 # Minimum and maximum invariant mass for all letpons *
 #*********************************************************************
 0.0 = mmnl ! min invariant mass for all letpons (l+- and vl)
 -1.0 = mmnlmax ! max invariant mass for all letpons (l+- and vl)
 #*********************************************************************
 # Minimum and maximum pt for 4-momenta sum of leptons / neutrino *
 # for pair of lepton includes only same flavor, opposite charge
 #*********************************************************************
 0.0 = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)
 -1.0 = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)
#*********************************************************************
# Inclusive cuts *
#*********************************************************************
 0.0 = ptheavy ! minimum pt for at least one heavy final state
 0.0 = xptl ! minimum pt for at least one charged lepton
 #*********************************************************************
 # Control the pt's of leptons sorted by pt *
 #*********************************************************************
 0.0 = ptl1min ! minimum pt for the leading lepton in pt
 0.0 = ptl2min ! minimum pt for the second lepton in pt
 -1.0 = ptl1max ! maximum pt for the leading lepton in pt
 -1.0 = ptl2max ! maximum pt for the second lepton in pt
#*********************************************************************
# 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'

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

You can bypass that step if you want by setting in the run_card
hel_recycling to False.

You will bypass that step but the generated code will be slower (likely 4 to 8 times slower for this case).
Now if you are only interested in 100 events, this is indeed a good trade off.

Cheers,

Olivier

> On 6 Feb 2024, at 16:50, Shu Tian Eu <email address hidden> wrote:
>
> New question #709219 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/709219
>
> Hi, I am trying to generate a process: mu+ mu- > mu+ mu- z z z z QCD=0, and Madgraph is taking a very long time to compile the process:
> Generating 100 events with run name run_01
> survey run_01
> INFO: compile directory
> compile Source Directory
> Using random number seed offset = 24
> INFO: Running Survey
> Creating Jobs
> Working on SubProcesses
> INFO: Compiling for process 1/1.
> INFO: P1_ll_llzzzz
> 27%|████████████████████████████████████████▋ | 5573/20961 [32:08:11<137:36:04, 32.19s/it]
>
>
> May I know if this is something expected? Thank you!
>
> For your reference, it was the SM default parameter card used, and the run card:
> # Number of events and rnd seed *
> # Warning: Do not generate more than 1M events in a single run *
> #*********************************************************************
> 100 = 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, 4=photon from muon *
> #*********************************************************************
> 0 = lpp1 ! beam 1 type
> 0 = lpp2 ! beam 2 type
> 1500.0 = ebeam1 ! beam 1 total energy in GeV
> 1500.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"
>
> #*********************************************************************
> #
> #*********************************************************************
> # Phase-Space Optimization strategy (basic options)
> #*********************************************************************
> 0 = nhel ! using helicities importance sampling or not.
> ! 0: sum over helicity, 1: importance sampling
> 1 = sde_strategy ! default integration strategy (hep-ph/2021.00773)
> ! 1 is old strategy (using amp square)
> ! 2 is new strategy (using only the denominator)
> # To see advanced option for Phase-Space optimization: type "update psoptim"
> #*********************************************************************
> # 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) *
> #*********************************************************************
> 30.0 = ptl ! minimum pt for the charged leptons
> -1.0 = ptlmax ! maximum pt for the charged leptons
> {} = 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})
> #*********************************************************************
> # Minimum and maximum E's (in the center of mass frame) *
> #*********************************************************************
> 0.0 = ej ! minimum E for the jets
> 0.0 = eb ! minimum E for the b
> 0.0 = ea ! minimum E for the photons
> 0.0 = el ! minimum E for the charged leptons
> -1.0 = ejmax ! maximum E for the jets
> -1.0 = ebmax ! maximum E for the b
> -1.0 = eamax ! maximum E for the photons
> -1.0 = elmax ! maximum E for the charged leptons
> {} = e_min_pdg ! E cut for other particles (use pdg code). Applied on particle and anti-particle
> {} = e_max_pdg ! E cut for other particles (syntax e.g. {6: 100, 25: 50})
>
> #*********************************************************************
> # Maximum and minimum absolute rapidity (for max, -1 means no cut) *
> #*********************************************************************
> 2.5 = etal ! max rap for the charged leptons
> 0.0 = etalmin ! main rap for the charged leptons
> {} = 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 = drll ! min distance between leptons
> -1.0 = drllmax ! max distance between leptons
> #*********************************************************************
> # Minimum and maximum invariant mass for pairs *
> #*********************************************************************
> 0.0 = mmll ! min invariant mass of l+l- (same flavour) lepton pair
> -1.0 = mmllmax ! max invariant mass of l+l- (same flavour) lepton 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.
> #*********************************************************************
> # Minimum and maximum invariant mass for all letpons *
> #*********************************************************************
> 0.0 = mmnl ! min invariant mass for all letpons (l+- and vl)
> -1.0 = mmnlmax ! max invariant mass for all letpons (l+- and vl)
> #*********************************************************************
> # Minimum and maximum pt for 4-momenta sum of leptons / neutrino *
> # for pair of lepton includes only same flavor, opposite charge
> #*********************************************************************
> 0.0 = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)
> -1.0 = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)
> #*********************************************************************
> # Inclusive cuts *
> #*********************************************************************
> 0.0 = ptheavy ! minimum pt for at least one heavy final state
> 0.0 = xptl ! minimum pt for at least one charged lepton
> #*********************************************************************
> # Control the pt's of leptons sorted by pt *
> #*********************************************************************
> 0.0 = ptl1min ! minimum pt for the leading lepton in pt
> 0.0 = ptl2min ! minimum pt for the second lepton in pt
> -1.0 = ptl1max ! maximum pt for the leading lepton in pt
> -1.0 = ptl2max ! maximum pt for the second lepton in pt
> #*********************************************************************
> # 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'
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Shu Tian Eu (shueu) said :
#2

Hi Olivier,

Thanks for the answer! Eventually I would want to have 10k events. In that case are there any other ways to make it quicker? Or is it so that this process in general would take a long time due to its complicated nature?

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

HI,

We do have those two mode with helicity recycling and without.
helicity recycling has an upfront cost but a faster code.
Maybe in your case, the upfront cost is too large, this might be the case, but can not tell in advance.

Cheers,

Olivier

> On 6 Feb 2024, at 22:00, Shu Tian Eu <email address hidden> wrote:
>
> Question #709219 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/709219
>
> Status: Answered => Open
>
> Shu Tian Eu is still having a problem:
> Hi Olivier,
>
> Thanks for the answer! Eventually I would want to have 10k events. In
> that case are there any other ways to make it quicker? Or is it so that
> this process in general would take a long time due to its complicated
> nature?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask Shu Tian Eu for more information if necessary.

To post a message you must log in.