adding random seed as argument to generate_events

Asked by Josh McFayden on 2017-06-18

Hi everyone,

Would it be possible to add a flag to generate_events such that the random seed can be set at command execution time?

For example, when I am running from a "gridpack" in NLO mode I often execute a command like this:
./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8

It would be nice if I could execute multiple runs from the command line with different random seeds like this:
./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8_S1 -s 1
./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8_S2 -s 2
./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8_S3 -s 3

(You could even automatically add the "_S<seed>" suffix to the run name, but I leave that up to you.)

Best,

Josh

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
2017-06-18
Last reply:
2017-06-19

Hi Josh,

I do not like the idea to have something only for the seed.
If I'm allowing to be able to edit the seed from the shell then I also want to be allowed to edit any entry in the param_card/run_card in the same way.
Therefore, this would need to have a more elaborate syntax.

I'm not yet 100% sure how to do that but I will think of something.

Cheers,

Olivier

> On 18 Jun 2017, at 18:53, Josh McFayden <email address hidden> wrote:
>
> New question #644167 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/644167
>
> Hi everyone,
>
> Would it be possible to add a flag to generate_events such that the random seed can be set at command execution time?
>
> For example, when I am running from a "gridpack" in NLO mode I often execute a command like this:
> ./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8
>
>
> It would be nice if I could execute multiple runs from the command line with different random seeds like this:
> ./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8_S1 -s 1
> ./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8_S2 -s 2
> ./bin/generate_events --nocompile --only_generation -f --parton --name=XZY_NLO_13TeV_PYTHIA8_S3 -s 3
>
> (You could even automatically add the "_S<seed>" suffix to the run name, but I leave that up to you.)
>
> Best,
>
> Josh
>
> --
> 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 Josh McFayden for more information if necessary.

To post a message you must log in.