Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limitation on the number of event for hepevt #1356

Closed
BrieucF opened this issue Nov 19, 2024 · 7 comments · Fixed by #1359
Closed

Limitation on the number of event for hepevt #1356

BrieucF opened this issue Nov 19, 2024 · 7 comments · Fixed by #1359
Labels
question Waiting for caller Waiting for issue opener to respond to question

Comments

@BrieucF
Copy link
Contributor

BrieucF commented Nov 19, 2024

Hi, what was the reason for this limitation to 1 M particles with the hepevt format:

if( NHEP > 1e6 ){
printout(ERROR,"EventReaderHepEvt::readParticles","Cannot read in more than million particles, but %d requested", NHEP );
return EVENT_READER_EOF;
}

@andresailer
Copy link
Member

Probably this

//check loop variable read from input file and chack that is reasonable
// should fix coverity issue: "Using tainted variable NHEP as a loop boundary."

@andresailer
Copy link
Member

Hi @BrieucF

Did this answer your question? Would you like to increase this limit?

@andresailer andresailer added the Waiting for caller Waiting for issue opener to respond to question label Nov 28, 2024
@BrieucF
Copy link
Contributor Author

BrieucF commented Nov 28, 2024

Hi Andre, I am afraid I do not fully understand the meaning of the two comments you quoted... If that limit is just to remain within what is deemed reasonable, yes I would like to increase it. Some beam induced background simulation provide a lot of particles, even with some filtering, but the simulation can still be run in a decent amount of time. If there is a deeper reason for this limit then we will have to find workarounds.

@andresailer
Copy link
Member

Coverity static Analysis complained that we read some value from a file and without checking used that as a loop boundary, so someone put a limit that seemed reasonable at the time. If you think a larger number is also reasonable we can increase the limit.

Regardless of the limit, time and memory for simulating one event should be kept in mind.

@BrieucF
Copy link
Contributor Author

BrieucF commented Nov 28, 2024

Indeed, time and memory should be kept in mind. But providing "sane" input file is somehow the user responsibility. I also do not see such limit for e.g. the HepMC3 reader. So yes, if a limit has to be kept for hepevt, it would be nice to increase it to e.g. 50M. Otherwise, I am also happy if we just remove this.

@andresailer
Copy link
Member

PR to increase the limit is welcome!

HepMC3 does its own validation, or is at least outside our purview.

@BrieucF
Copy link
Contributor Author

BrieucF commented Nov 28, 2024

Here it is: #1359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Waiting for caller Waiting for issue opener to respond to question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants