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 NVProfilerService from boost::format to {fmt} #30856

Merged

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Jul 21, 2020

PR description:

Migrate from boost::format to fmt::sprintf.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@@ -502,7 +502,7 @@ void NVProfilerService::preallocate(edm::service::SystemBounds const& bounds) {
// create the NVTX domains for per-EDM-stream transitions
stream_domain_.resize(concurrentStreams);
for (unsigned int sid = 0; sid < concurrentStreams; ++sid) {
stream_domain_[sid] = nvtxDomainCreate((boost::format("EDM Stream %d") % sid).str().c_str());
stream_domain_[sid] = nvtxDomainCreate(fmt::sprintf("EDM Stream %d", sid).c_str());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it actually safe ?
Does the C string live long enough to be copied by the nvtxDomainCreate function ?

Of course this would have been an issue also before...

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be safe. From 15.2 of N4659 (last C++17 draft)

Temporary objects are destroyed as the last step in evaluating the full-expression (4.6) that (lexically) contains the point where they were created. This is true even if that evaluation ends in throwing an exception. The value computations and side effects of destroying a temporary object are associated only with the full-expression, not with any specific subexpression.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30856/17213

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 21, 2020

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fwyzard (Andrea Bocci) for master.

It involves the following packages:

HeterogeneousCore/CUDAServices

@makortel, @cmsbuild, @fwyzard can you please review it and eventually sign? Thanks.
@makortel, @rovere this is something you requested to watch as well.
@silviodonato, @dpiparo you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 21, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 7b9d40c
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-22f533/8193/summary.html
CMSSW: CMSSW_11_2_X_2020-07-21-1100
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-22f533/8193/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: 2525996
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2525948
  • DQMHistoTests: Total skipped: 47
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 144 log files, 17 edm output root files, 34 DQM output files

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 28, 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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1
@fwyzard just a reminder if you want to open an issue to remember about #30856 (comment)

@cmsbuild cmsbuild merged commit 34eb876 into cms-sw:master Jul 28, 2020
@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 28, 2020

@fwyzard just a reminder if you want to open an issue to remember about #30856 (comment)

Thanks, but shouldn't be necessary - I made some standalone tests, and the code seems to behave correctly.

@fwyzard fwyzard deleted the migrate_boost_format_to_fmt_Heterogeneous branch July 28, 2020 15:21
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