How to implement multi_run in mg5?

Asked by Matthew Baumgart

Hello,

I have been requested by a collaborator to submit my events in files with no more than 10K events. I would like to be able to submit a job with, say, 100K events, and have it split into multiple runs. I've gathered that there's a 'multi_run' command that allows one to do this. I have not been able to figure out how to use it correctly. I normally run Madgraph on the command line by issuing a ./bin/mg5 command. Can I issue 'multi_run' from the command line? Is there a card file I need to modify to issue the multi_run command? At no point in the list of commands I issue at the command line was 'multi_run' recognized as correct syntax.

Under your faq, you have a question 'How many events can I generate in one run with MadEvent?' The answer mentions the 'multi_run' script. This is how I learned that the phrase 'multi_run' is part of the incantation that I need. Unfortunately, googling 'madgraph5 multi_run' and variants thereof have turned up no obvious way to use it.

Can you thus inform me how to split my event generation into multiple runs? Also, might I suggest the answer be placed in the Madgraph 5 faq under the question about the number of events?

Thank you.

m

Question information

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

Hi Mattew,

in the bin/mg5, you can do
launch PATH -i
and you arrive to a new shell with all the madevent option.
on that shell you have new command and one of them is
multi_run X

Cheers,

Olivier

On Jun 7, 2013, at 10:31 PM, Matthew Baumgart <email address hidden> wrote:

> New question #230393 on MadGraph5:
> https://answers.launchpad.net/madgraph5/+question/230393
>
> Hello,
>
> I have been requested by a collaborator to submit my events in files with no more than 10K events. I would like to be able to submit a job with, say, 100K events, and have it split into multiple runs. I've gathered that there's a 'multi_run' command that allows one to do this. I have not been able to figure out how to use it correctly. I normally run Madgraph on the command line by issuing a ./bin/mg5 command. Can I issue 'multi_run' from the command line? Is there a card file I need to modify to issue the multi_run command? At no point in the list of commands I issue at the command line was 'multi_run' recognized as correct syntax.
>
> Under your faq, you have a question 'How many events can I generate in one run with MadEvent?' The answer mentions the 'multi_run' script. This is how I learned that the phrase 'multi_run' is part of the incantation that I need. Unfortunately, googling 'madgraph5 multi_run' and variants thereof have turned up no obvious way to use it.
>
> Can you thus inform me how to split my event generation into multiple runs? Also, might I suggest the answer be placed in the Madgraph 5 faq under the question about the number of events?
>
> Thank you.
>
> m
>
> --
> You received this question notification because you are a member of
> MadTeam, which is an answer contact for MadGraph5.

Revision history for this message
marlon (chuchupachula) said :
#2

Is this working till now? you mean, i do ./bin/mg5_aMC then do launch PATH -i ?

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

yes this still works

> On 1 Dec 2019, at 09:45, marlon <email address hidden> wrote:
>
> Question #230393 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/230393
>
> marlon posted a new comment:
> Is this working till now? you mean, i do ./bin/mg5_aMC then do launch
> PATH -i ?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Zachary Warner (zwarner) said :
#4

Hello, I am not sure what I am doing wrong, but this does not work for me.

I start madgraph with ./bin/mg5_aMC

I then type launch PATH -i
where I replace PATH with the the path to my output file

Madgraphs output is

INFO: load configuration from /afs/cern.ch/work/z/zawarner/madgraph/MG5_aMC_v2_7_2/TriJet/Cards/amcatnlo_configuration.txt
INFO: load configuration from /afs/cern.ch/work/z/zawarner/madgraph/MG5_aMC_v2_7_2/input/mg5_configuration.txt
INFO: load configuration from /afs/cern.ch/work/z/zawarner/madgraph/MG5_aMC_v2_7_2/TriJet/Cards/amcatnlo_configuration.txt
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

At this stage I am given several options for command lines like: EOF, check_events, decay_events,... and so on.
However, no of these options is multi_run. Am I doing something wrong?

Thank you,

Zach

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

This is actually only implemented for LO computation.
Are you doing NLO computation?
In that case, you should use the option in the run_card
nevt_job ( I typically set it to 2000 when i need to generate large samples)

Cheers,

Olivier

> On 8 Apr 2020, at 22:57, Zachary Warner <email address hidden> wrote:
>
> Question #230393 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/230393
>
> Zachary Warner requested more information:
> Hello, I am not sure what I am doing wrong, but this does not work for
> me.
>
> I start madgraph with ./bin/mg5_aMC
>
> I then type launch PATH -i
> where I replace PATH with the the path to my output file
>
> Madgraphs output is
>
> INFO: load configuration from /afs/cern.ch/work/z/zawarner/madgraph/MG5_aMC_v2_7_2/TriJet/Cards/amcatnlo_configuration.txt
> INFO: load configuration from /afs/cern.ch/work/z/zawarner/madgraph/MG5_aMC_v2_7_2/input/mg5_configuration.txt
> INFO: load configuration from /afs/cern.ch/work/z/zawarner/madgraph/MG5_aMC_v2_7_2/TriJet/Cards/amcatnlo_configuration.txt
> 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
>
> At this stage I am given several options for command lines like: EOF, check_events, decay_events,... and so on.
> However, no of these options is multi_run. Am I doing something wrong?
>
> Thank you,
>
> Zach
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Zachary Warner (zwarner) said :
#6

Thank you Olivier. Yes, I am currently implementing NLO computations so I will try this out.
Is there a standard ratio between what you set nevt_job to and the number of events you want to generate, or does it depend on the complexity of the jobs you want to generate?

If I want say 30 million events of p p > j j j would you adjust from 2000 or is that standard? At some point I would assume that too high of a nevt_job would effect accuracy.

Thanks again for your help.

-Zach

Revision history for this message
marco zaro (marco-zaro) said :
#7

Hi,
there is no known effect on accuracy or efficiency related to nevents_job. It mostly depends on how much computing power you have (your example, 30M events in batches of 2k each means 15k jobs to be sent.
Another possibility, which has the advantage not to have a single big event file, is to have is to require a smaller number of events, say 1M, and then do

generate_events -o

several times. The -o flag will re-use the grids from the first run and only run event generation with an updated seed if you leave iseed=0 in the run_card. In the end you will have several files of 1M events each that can be combined together, and that are all statistically independent one from another. With this second possibility, if any error occurs in any of the generate_events -o commands, you simply throw away the corresponding events, but you can keep the others. In the first case, generating 30M events at once, if any error occurs you have to restart from scratch.

Let me know if you need more

Cheers,

Marco

Can you help with this problem?

Provide an answer of your own, or ask Matthew Baumgart for more information if necessary.

To post a message you must log in.