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

atomize counters in BaseIsolator.h #26586

Merged
merged 1 commit into from May 3, 2019
Merged

Conversation

slava77
Copy link
Contributor

@slava77 slava77 commented May 1, 2019

some mutables are used as counters and are showing up as static analyzer warnings. In the case of BaseIsolator, the simplest is to atomize them, as done in this PR.

The counters here are used for printing of statistics of the test method calls. I do not see a strong need for a correctness of this in a multithreaded environment.
The atomic is effectively to just silence the warning.

both try_ and fail_ counters should nominally be updated in sync.
@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26586/9512

  • This PR adds an extra 16KB to repository

@slava77
Copy link
Contributor Author

slava77 commented May 1, 2019

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/34443/console Started: 2019/05/01 18:42

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2019

A new Pull Request was created by @slava77 (Slava Krutelyov) for master.

It involves the following packages:

PhysicsTools/PatAlgos
RecoEgamma/EgammaTools

@perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks.
@TaiSakuma, @gouskos, @jainshilpi, @rappoccio, @HeinerTholen, @peruzzim, @varuns23, @seemasharmafnal, @mmarionncern, @ahinzmann, @smoortga, @acaudron, @lgray, @jdolen, @drkovalskyi, @ferencek, @Sam-Harper, @jdamgov, @nhanvtran, @gkasieczka, @schoef, @clelange, @JyothsnaKomaragiri, @mverzett, @gpetruc, @mariadalfonso, @pvmulder this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2019

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3211964
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211759
  • DQMHistoTests: Total skipped: 204
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/34460/console Started: 2019/05/02 17:53

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2019

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 5 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3211964
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211759
  • DQMHistoTests: Total skipped: 204
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@slava77
Copy link
Contributor Author

slava77 commented May 2, 2019

+1

for #26586 777a272

  • technical
  • jenkins tests pass

@fabiocos
Copy link
Contributor

fabiocos commented May 3, 2019

@slava77 I am not sure I fully get the meaning of your last sentence in the PR description. Defining the counters as atomic ensures that there is no conflicting updates by multiple threads, but the global counter should still finally be correct. Or am I missing something? The problem might happen if a thread is reading the counters while another is writing them

@slava77
Copy link
Contributor Author

slava77 commented May 3, 2019

Ideally,

  • both counters should be updated in sync.
  • the print statement, which is now the only place to use the counters knows nothing about updates in other threads and one may hope for consistent results in the same thread between the call to a test method and the print method.

I do not consider having the above done appropriately as a requirement for this code full thread consistency/safety. Hence, my last message in the PR description.

@fabiocos
Copy link
Contributor

fabiocos commented May 3, 2019

+1

@fabiocos
Copy link
Contributor

fabiocos commented May 3, 2019

merge

@cmsbuild cmsbuild merged commit e9909fb into cms-sw:master May 3, 2019
@santocch
Copy link

santocch commented May 4, 2019

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented May 4, 2019

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 be automatically merged.

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

4 participants