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

Migrate legacy modules in GenFilters to global #28946

Merged
merged 3 commits into from
Feb 27, 2020

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Feb 13, 2020

PR description:

Migrate 4 legacy modules in GeneratorInterface/GenFilters
to be global filters to improve multi threaded performance.

BCToEFilter
FourLepFilter
LHEGenericFilter
LHEVpTFilter

Includes some cleanup. (This is part 1, more of these PRs are coming
and they will repeat the patterns in this one. If there is something you
do not like, please let me know.)

PR validation:

Relies on existing tests. Output should not change, except that some
output to log files containing a count of events and events passed
is deleted.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28946/13758

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wddgit (W. David Dagenhart) for master.

It involves the following packages:

GeneratorInterface/GenFilters

@SiewYan, @efeyazgan, @mkirsano, @cmsbuild, @agrohsje, @alberto-sanchez, @qliphy can you please review it and eventually sign? Thanks.
@alberto-sanchez, @agrohsje, @mkirsano this is something you requested to watch as well.
@davidlange6, @silviodonato, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@wddgit
Copy link
Contributor Author

wddgit commented Feb 13, 2020

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 13, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/4635/console Started: 2020/02/13 07:53

@cmsbuild
Copy link
Contributor

+1
Tested at: 1e7e15f
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7a605a/4635/summary.html
CMSSW: CMSSW_11_1_X_2020-02-12-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7a605a/4635/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2694005
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2693658
  • DQMHistoTests: Total skipped: 346
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@cmsbuild
Copy link
Contributor

Pull request #28946 was updated. @SiewYan, @efeyazgan, @mkirsano, @cmsbuild, @agrohsje, @alberto-sanchez, @qliphy can you please check and sign again.

@wddgit
Copy link
Contributor Author

wddgit commented Feb 20, 2020

please test

rebased plus updated to be more careful about std::abs usage. I'm not sure that it was broken either by this PR or before, but make sure the needed headers are there and it's always looking in std:: for the overloads with no dependence on includes from includes.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 20, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/4799/console Started: 2020/02/20 18:57

@cmsbuild
Copy link
Contributor

+1
Tested at: f694dae
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7a605a/4799/summary.html
CMSSW: CMSSW_11_1_X_2020-02-19-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7a605a/4799/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2694086
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2693765
  • DQMHistoTests: Total skipped: 319
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@silviodonato
Copy link
Contributor

@alberto-sanchez @agrohsje @efeyazgan @mkirsano @qliphy @SiewYan
do you have any comments?

@agrohsje
Copy link

Looks good to me. Just one question. The old code kept track of the efficiency. Not sure this is used by someone, but I couldn't find the same info in the updated code. Is this still available?

@wddgit
Copy link
Contributor Author

wddgit commented Feb 25, 2020

The Framework provides something like this for free. Here is an example. Run

FWCore/​Framework/​test/​testBitsCount_cfg.py

Here are selected lines from the output log file:

...
TrigReport ---------- Module Summary ------------
TrigReport    Visited   Executed     Passed     Failed      Error Name
...
TrigReport         99         99          3         96          0 f1
TrigReport         99         99          1         98          0 f2
TrigReport         99         99          8         91          0 f3
TrigReport         99         99         30         69          0 f4
TrigReport         99         99         70         29          0 f5
TrigReport         99         99         12         87          0 f6
...

where f1, f2, f3, f4, f5, and f6 are the module labels of some
filters in the test. If you look in the configuration, this is the
part that turns it on.

process.options = cms.untracked.PSet(
    wantSummary = cms.untracked.bool(True)
)

The only thing that is missing is the efficiency itself which
can easily be calculated from the passed and executed columns.
The only other weaknesses of this compared to what was removed
from the modules is that this enables a significant amount of printout
in the log file and you have find your module label, plus you have
to remember to enable it in the configuration.

The downside of the counters that were in the modules is
that they are not const. In a global module, simple "int" counters
would not work. One could make them std::atomic's
and make that work, but that seems like a lot of overhead
for something the Framework provides for free. You are adding
some performance degradation when you add an atomic because
it has to be synchronized as the job runs. Also it clutters the code.
If you really think these are important, I will put them back as atomics
(assuming no one else objects). But I think the better solution is
just to remove them.

I'll also note some modules in GenFilters have these counters and some
don't and the printout is inconsistent, so it is not implemented in
a uniform way in the package...

@agrohsje
Copy link

Thanks @wddgit .
+1

@wddgit
Copy link
Contributor Author

wddgit commented Feb 26, 2020

@agrohsje Are you the generators official approver? For some reason, it says it still needs approval? Maybe the +1 needs to be on the first line? Thanks.

@qliphy
Copy link
Contributor

qliphy commented Feb 27, 2020

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @silviodonato, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 95fa94f into cms-sw:master Feb 27, 2020
@wddgit wddgit deleted the convertLegacyFilters1 branch May 21, 2020 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants