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
Allow for more than 3 skipped LHE files. #7795
Allow for more than 3 skipped LHE files. #7795
Conversation
Currently, the LHESource reads by calling nextEvent(), which in turn calls LHEReader::next(). The latter method returns an empty reference at the end of a file [1]. When reading an event in a fourth file, nextEvent() is first called in the constructor of LHESource [2], returning an empty reference at the end of the fist file. The other calls to nextEvent(), [3] and [4], return an empty reference at the end of the second and third file. But there is a check after [4], and LHESource quits reading files without attempting to open the fourth file. Try to address the situation by keeping reading files as long as new files are opened and empty events are returned. This potentially also removes the need for the check after [4]. Also pertains to dmwm/CRABServer#4659. [1]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/src/LHEReader.cc#0491 [2]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/plugins/LHESource.cc#0042 [3]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/plugins/LHESource.cc?v=CMSSW_7_4_0_pre5#0166 [4]: http://cmslxr.fnal.gov/lxr/source/GeneratorInterface/LHEInterface/plugins/LHESource.cc?v=CMSSW_7_4_0_pre5#0169
A new Pull Request was created by @cmsbuild for CMSSW_7_5_X. Allow for more than 3 skipped LHE files. It involves the following packages: GeneratorInterface/LHEInterface @vciulli, @covarell, @thuer, @cmsbuild, @nclopezo, @bendavid can you please review it and eventually sign? Thanks. |
+1 |
I assume this is obsolete. Will close |
How so? I've asked for some more feedback via email a while ago, but not received any. We have added a warning to CRAB when processing more than one LHE file, but merging several LHE files does not seem trivial to do (from a user's perspective.) Having this fixed one way or another would be nice. |
Indeed this is not obsolete, but we would really like framework experts to at least have a quick look at the code. |
Seems everyone is too patient if waiting since a month for comments from @wmtan. Maybe @Dr15Jones is better to contact here. |
I don't see any obvious problems. Of course, I'm assuming someone actually tested that the change works. |
What happens if the last file in the list doesn't have anything? Does it properly stop? |
I've set skippedEvents to an unreasonably large value and deleted every Does that answer your question? |
I guess it answers the question. Seems lik the LHE file format has no way of specifying a file containing no events. |
This, #7795, was the actual pull request (ported from 7_4_X). While @Dr15Jones has looked at this, I'm still not sure what the status w.r.t. merging is? |
+1 Turns out that it's also relevant for pLHE production, which is obvious in retrospect. |
Allow for more than 3 skipped LHE files.
Currently, the LHESource reads by calling nextEvent(), which in turn
calls LHEReader::next(). The latter method returns an empty reference
at the end of a file 1.
When reading an event in a fourth file, nextEvent() is first called in
the constructor of LHESource 2, returning an empty reference at the
end of the fist file. The other calls to nextEvent(), 3 and 4,
return an empty reference at the end of the second and third file.
But there is a check after 4, and LHESource quits reading files
without attempting to open the fourth file.
Try to address the situation by keeping reading files as long as new
files are opened and empty events are returned. This potentially also
removes the need for the check after 4.
Also pertains to dmwm/CRABServer#4659.
Automatically ported from CMSSW_7_4_X #7642