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

Fix clang warnings in FastSimulation/SimplifiedGeometryPropagator #26429

Merged
merged 2 commits into from Apr 12, 2019

Conversation

fabiocos
Copy link
Contributor

@fabiocos fabiocos commented Apr 10, 2019

PR description:

Fix clang warnings in FastSimulation/SimplifiedGeometryPropagator: use CMS_THREAD_GUARD, reuse std::once_flag in call_once to initialize static objects in NuclearInteraction, and remove unused [this] from lambda expression in plugin NuclearInteractionFTF.

PR validation:

Code compiles, workflow 2018.8 runs.

…S_THREAD_GUARD (reusing std::once_flag) and remove unused [this] from lambda expression
@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-26429/9208

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fabiocos (Fabio Cossutti) for master.

It involves the following packages:

FastSimulation/SimplifiedGeometryPropagator

@cmsbuild, @ssekmen, @lveldere, @mdhildreth, @civanch can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @matt-komm 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

@fabiocos
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 10, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/34133/console Started: 2019/04/10 18:53

@cmsbuild
Copy link
Contributor

-1

Tested at: 1048626

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-26429/34133/summary.html

I found follow errors while testing this PR

Failed tests: ClangBuild

  • Clang:

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

@cmsbuild
Copy link
Contributor

Comparison not run due to Build errors/Fireworks only changes/No short matrix requested (RelVals and Igprof tests were also skipped)

@@ -200,8 +202,8 @@ namespace fastsim
// TODO: Is this correct?
// Thread safety
static std::once_flag initializeOnce;
[[cms::thread_guard("initializeOnce")]] std::vector< std::vector<double> > NuclearInteraction::theRatiosMap;
[[cms::thread_guard("initializeOnce")]] std::map<int, int> NuclearInteraction::theIDMap;
CMS_THREAD_GUARD(initializeOnce) std::vector< std::vector<double> > NuclearInteraction::theRatiosMap;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dr15Jones do you see what is different here wrt to the case of NuclearInteractionFTF ? I might simply restore the previous syntax removing the once_flag declaration, but I do not understand what is wrong here...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed the other possible solution works in case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMS_THREAD_GUARD(initializeOnce) does not actually use the variable initializeOnce, it just creates the string "initializeOnce". As far as I can tell, the variable is not actually used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The varaibles theRatiosMap and theIDMap are not handled in a thread-safe way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dr15Jones ok, in the case of NuclearInteractionFTF initializeOnce is then used by std::call_once, that is the difference

@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-26429/9228

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

Pull request #26429 was updated. @cmsbuild, @ssekmen, @lveldere, @mdhildreth, @civanch can you please check and sign again.

@fabiocos
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 11, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/34147/console Started: 2019/04/11 11:51

@cmsbuild
Copy link
Contributor

@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-26429/34147/summary.html

Comparison Summary:

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

@fabiocos
Copy link
Contributor Author

@ssekmen this is a technical fix, could you please check it?

@ssekmen
Copy link
Contributor

ssekmen commented Apr 12, 2019

+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, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor Author

+1

@cmsbuild cmsbuild merged commit c769947 into cms-sw:master Apr 12, 2019
@fabiocos fabiocos deleted the fc-clangSimplifiedGeometryPropagator branch April 29, 2019 15:24
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