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

Switch to std::chrono::steady_clock #41291

Merged
merged 1 commit into from
Apr 7, 2023
Merged

Conversation

Dr15Jones
Copy link
Contributor

PR description:

cppreference.com strongly suggests to not use high_resolution_clock, especially for timing differences as that clock is not guaranteed to always be monotonically increasing. One should use steady_clock for timing differences.

PR validation:

code compiles.

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 5, 2023

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41291/35077

  • This PR adds an extra 24KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

cppreference.com strongly suggests to not use high_resolution_clock, especially for timing differences as that clock is not guaranteed to always be monotonically increasing.
One should use steady_clock for timing differences.
@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 5, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41291/35078

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 5, 2023

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

  • FWCore/Services (core)
  • Utilities/StorageFactory (core)
  • Utilities/XrdAdaptor (core)

@makortel, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @missirol, @wddgit, @fwyzard this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor

makortel commented Apr 5, 2023

Would it be feasible to address also the uses of system_clock and gettimeofday() (i.e. #41199) as part of this PR, or those go beyond?

@Dr15Jones
Copy link
Contributor Author

You are supposed to use system_clock for stuff involving 'absolute' time (i.e. a time stamp). So changing the places where it is used for a time diff would match with this PR. I'd say 'gettimeofday' should wait to another PR since that is going to be more involved.

@makortel
Copy link
Contributor

makortel commented Apr 5, 2023

So changing the places where it is used for a time diff would match with this PR.

Right, that's exactly what I had in mind. By quick look the system_clock is used for duration measurement (within FWCore) only in CondorStatusService (which after #41165 reports subtracts gettimeofday() time stamp from system_clock time stamp). But ok, let's leave it for a later PR.

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 5, 2023

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-650840/31851/summary.html
COMMIT: 45329c0
CMSSW: CMSSW_13_1_X_2023-04-05-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/41291/31851/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-650840/31851/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-650840/31851/git-merge-result

Comparison Summary

Summary:

  • You potentially added 31 lines to the logs
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 47
  • DQMHistoTests: Total histograms compared: 3365163
  • DQMHistoTests: Total failures: 4
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3365137
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 46 files compared)
  • Checked 202 log files, 155 edm output root files, 47 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor

makortel commented Apr 5, 2023

23234.0 shows a difference in L1T/L1TPhase2/Muons/TkMuon/control_variables/TkMuonZ0
image

(mainly documenting for future reference, can not be caused by this PR)

@makortel
Copy link
Contributor

makortel commented Apr 6, 2023

@cmsbuild, please test

Let's see if the difference repeats

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 6, 2023

-1

Failed Tests: RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-650840/31875/summary.html
COMMIT: 45329c0
CMSSW: CMSSW_13_1_X_2023-04-06-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/41291/31875/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

  • 4.64.6_MinimumBias2010A/step2_MinimumBias2010A.log
  • 1002.31002.3_RunZeroBias2022B/step2_RunZeroBias2022B.log

Comparison Summary

Summary:

  • You potentially added 4 lines to the logs
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3459609
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3459584
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 207 log files, 159 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor

makortel commented Apr 6, 2023

The RelVal-INPUT jobs were "terminated early" as indicated by the framework job report

<FrameworkJobReport>
<FrameworkError ExitStatus="8901" Type="UnexpectedJobTermination"/>
</FrameworkJobReport>

(demonstrating #41124 !)

@makortel
Copy link
Contributor

makortel commented Apr 6, 2023

+1

(the earlier comparison difference did not repeat)

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 6, 2023

This pull request is fully signed and it will be integrated in one of the next master IBs (but tests are reportedly failing). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

perrotta commented Apr 7, 2023

+1

@perrotta
Copy link
Contributor

perrotta commented Apr 7, 2023

merge

@cmsbuild cmsbuild merged commit c643d72 into cms-sw:master Apr 7, 2023
@makortel
Copy link
Contributor

makortel commented Apr 7, 2023

@Dr15Jones Could you backport this PR to 13_0_X?

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.

4 participants