Generating 1M (or more events with multi_run)

Asked by Debajyoti Sengupta on 2021-02-01

Is there a way to use the multi_run option with the bash script method prescribed here : (https://answers.launchpad.net/mg5amcnlo/+faq/2186)

I am trying to generate 1M events, but as I understand it is not recommended generating more than 100k per run.

Additional info: I am on a SLURM based cluster. I have a bash script for the MG like so:

```
#!/bin/bash

generate p p > t t~, (t > w+ b, w+ > j j), (t~ > w- b~, w- > j j)
output ttbardijet
launch ttbardijet
shower=Pythia8
detector=Delphes
done
set nevents 100000
set ptj1min 450
set ptj1max 1200
done
```

After that I submit this to the scheduler.

Thanks,
Deb

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2021-02-02
Last query:
2021-02-02
Last reply:
2021-02-01

Hi,

Actually our suggestion now is (copy the message of the run_card):
# Warning: Do not generate more than 1M events in a single run *

In the past the issue limiting at 100k was the size of the pythia6 output file (which could not be larger than 2G since it was sing 32 bit adress structure).

But to answer your question.
instead of "launch"
you can do do something like

generate p p > t t~
output
launch -i
multi_run 10
set nevents 100k
set mt 100
set wt auto
multi_run 10
set nevents 100k
set mt 200
set wt auto
print_results --path=./cross_section_top.txt --format=short

Cheers,

Olivier

Debajyoti Sengupta (harvious) said : #2

Hi Olivier,
Thanks for the prompt reply.

I am a bit confused as to the multiple 'launch -i' s in your example.

Should the example read as follows (for my usecase):

#!/bin/bash

generate p p > t t~, (t > w+ b, w+ > j j), (t~ > w- b~, w- > j j)
output ttbardijet
launch ttbardijet
multi_run 10
shower=Pythia8
detector=Delphes
done
set nevents 100000
set ptj1min 450
set ptj1max 1200
done

hi,

You do not need the shebang "#!/bin/bash", this is not a bash script so this is a bad idea to include such line within your file.
I have never tried to set a shebang to such file but you can try to setup the path to mg5_aMC exectuables (but I'm not sure it will work)

Then you were missing the "-i" options which switch to the command line interface associated to the directory.
which contains many functions (like "lauch", "multi_run", "pythia8", "print_results", ...)

generate p p > t t~, (t > w+ b, w+ > j j), (t~ > w- b~, w- > j j)
output ttbardijet
launch ttbardijet -i
multi_run 10
shower=Pythia8
detector=Delphes
done
set nevents 100000
set ptj1min 450
set ptj1max 1200
done

Cheers,

Olivier

PS: I think that your cuts are fine like this, but in case you do not see them applied, then think to set cut_decays to True

Debajyoti Sengupta (harvious) said : #4

Thanks Olivier Mattelaer, that solved my question.