In gridpack while combining events for 500k getting error "fail to reach target 500000".

Asked by Debabrata Sahoo

So I am trying to use gridpack for event generation in madgraph. So for more than 1 cores it is working fine for 500k events. But for a one core i am getting error as such

Using random number seed offset = 1
INFO: Generating 500000.0 unweighted events.
sum of cpu time of last step: 18 seconds
INFO: need to improve 4 channels
combine_events
INFO: fail to reach target 500000
store_events
  === Results Summary for run: GridRun_1 tag: tag_1 ===

     Cross-section : 0 +- 0 pb
     Nb of events : 203

decay_events -from_cards
DONE
write ./events.lhe.gz

but for one core when i am generating 200k events, it is working fine.
So is there a limit on how many a single core can generate events?

Question information

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

Hi,

Your question is quite confusing...

For the generation of the gridpack, the number of events requested is irrelevant.
And for the running of the gridpack, the number of core is irrelevant (it will always be a single core).

So I'm not sure to really understand your question...
Especially since having only 203 events seems to indicate a real problem.

Note that the point of gridpack is to ask (many) one core computation for event generation (with a quite low request of number of events).

To answer your question, yes they are a limit in the number of events that you can generate from the gridpack, but this is not a know limit (just a limit related to the efficiency of the code, the maximum number of iteration allowed, ....) in other words each process (and each cuts) will have a different limit (and the limit technically also depend of the seed).

Cheers,

Olivier

> On 2 Sep 2024, at 16:55, Debabrata Sahoo <email address hidden> wrote:
>
> New question #818628 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/818628
>
> So I am trying to use gridpack for event generation in madgraph. So for more than 1 cores it is working fine for 500k events. But for a one core i am getting error as such
>
> Using random number seed offset = 1
> INFO: Generating 500000.0 unweighted events.
> sum of cpu time of last step: 18 seconds
> INFO: need to improve 4 channels
> combine_events
> INFO: fail to reach target 500000
> store_events
> === Results Summary for run: GridRun_1 tag: tag_1 ===
>
> Cross-section : 0 +- 0 pb
> Nb of events : 203
>
> decay_events -from_cards
> DONE
> write ./events.lhe.gz
>
> but for one core when i am generating 200k events, it is working fine.
> So is there a limit on how many a single core can generate events?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Debabrata Sahoo (dpops98) said :
#2

Thank you, Olivier, for such a quick response.

Yes, I got a little confused about the parallelization of event generation using gridpack.

So I did this

cd madevent
./bin/compile
./bin/clean4grid
./run.sh 500000 20

and got the above here.

So here, 500k is the number of events, right?
But if I use 200k, it works.

So you are saying the reason for my error might be due to "limit related to the efficiency of the code, the maximum number of iteration allowed, or it might be different for different process and cuts in the run card"?

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

> So here, 500k is the number of events, right?
> But if I use 200k, it works.

It is a bit surprising that it got only 203 events at the end...
What can happen is that you are pushing the code to too many iteration/... and that the code starts to overfit and from there the efficiency drop. This is something the "normal" code is avoiding but I do not think the gridpack has such feature.

For me, 200k is already asking (much) too many events for one gridpack.
If you want one sample of 200k or 500k, then it is better to not use the gridpack mode.
gridpack mode is really designed for you to run a large number of gridpack on a single core.
(and you have readonly gridpack for running them in parralel on a same machine if you want to do multi-process on one machine (and soon we will have openmp mode available to fill one node too).

Cheers,

Olivier

> On 2 Sep 2024, at 18:00, Debabrata Sahoo <email address hidden> wrote:
>
> Question #818628 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/818628
>
> Status: Answered => Open
>
> Debabrata Sahoo is still having a problem:
> Thank you, Olivier, for such a quick response.
>
> Yes, I got a little confused about the parallelization of event
> generation using gridpack.
>
> So I did this
>
> cd madevent
> ./bin/compile
> ./bin/clean4grid
> ./run.sh 500000 20
>
> and got the above here.
>
> So here, 500k is the number of events, right?
> But if I use 200k, it works.
>
>
> So you are saying the reason for my error might be due to "limit related to the efficiency of the code, the maximum number of iteration allowed, or it might be different for different process and cuts in the run card"?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Debabrata Sahoo (dpops98) said :
#4

Thanks Olivier Mattelaer, that solved my question.