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

Merged
merged 2 commits into from
Jul 16, 2020

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Jul 15, 2020

PR description:

Migrate from boost::format to the {fmt} library.

PR validation:

None.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 15, 2020

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-code-checks

ERROR: Build errors found during clang-tidy run.

HLTrigger/Timer/plugins/ThroughputService.cc:14:10: error: 'HLTrigger/Tools/interface/Logger.h' file not found [clang-diagnostic-error]
#include "HLTrigger/Tools/interface/Logger.h"
         ^
Suppressed 1622 warnings (1621 in non-user code, 1 with check filters).
--
HLTrigger/Timer/plugins/FastTimerServiceClient.cc:24:10: error: 'HLTrigger/Tools/interface/Logger.h' file not found [clang-diagnostic-error]
#include "HLTrigger/Tools/interface/Logger.h"
         ^
Suppressed 1875 warnings (1874 in non-user code, 1 with check filters).
--
HLTrigger/Timer/plugins/FastTimerService.cc:38:10: error: 'HLTrigger/Tools/interface/Logger.h' file not found [clang-diagnostic-error]
#include "HLTrigger/Tools/interface/Logger.h"
         ^
Suppressed 1914 warnings (1913 in non-user code, 1 with check filters).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:128: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 15, 2020

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-code-checks

ERROR: Build errors found during clang-tidy run.

HLTrigger/Timer/plugins/ThroughputService.cc:58:19: error: no member named 'sprintf' in namespace 'fmt'; did you mean 'printf'? [clang-diagnostic-error]
    m_dqm_path += fmt::sprintf(
                  ^~~~~~~~~~~~
                  printf
--
HLTrigger/Timer/plugins/ThroughputService.cc:72:37: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
    std::string y_axis_title = fmt::sprintf("events / %g s", m_time_resolution);
                                    ^
/cvmfs/cms-ib.cern.ch/nweek-02637/slc7_amd64_gcc820/external/fmt/6.2.1-hkbigh/include/fmt/core.h:1582:9: error: no matching constructor for initialization of 'basic_format_args<fmt::v6::format_context>' (aka 'basic_format_args<basic_format_context<std::back_insert_iterator<internal::buffer<char> >, char> >') [clang-diagnostic-error]
      : basic_format_args<format_context>(static_cast<Args&&>(args)...) {}
        ^
HLTrigger/Timer/plugins/ThroughputService.cc:72:62: note: in instantiation of function template specialization 'fmt::v6::format_args::format_args<const double &>' requested here
--
HLTrigger/Timer/plugins/FastTimerService.cc:380:33: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  std::string y_title_ms = fmt::sprintf("events / %.1f ms", ranges.time_resolution);
                                ^
HLTrigger/Timer/plugins/FastTimerService.cc:381:33: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  std::string y_title_kB = fmt::sprintf("events / %.1f kB", ranges.memory_resolution);
                                ^
HLTrigger/Timer/plugins/FastTimerService.cc:939:23: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
    dqm_path_ += fmt::sprintf(
                      ^
HLTrigger/Timer/plugins/FastTimerService.cc:1045:12: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
      fmt::sprintf("run %d, lumisection %d", gc.luminosityBlockID().run(), gc.luminosityBlockID().luminosityBlock());
           ^
HLTrigger/Timer/plugins/FastTimerService.cc:1073:28: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  auto const& label = fmt::sprintf("Run %d", gc.luminosityBlockID().run());
                           ^
HLTrigger/Timer/plugins/FastTimerService.cc:1125:15: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  out << fmt::sprintf("FastReport  %10.1f ms  %10.1f ms  %+10d kB  %+10d kB  %s\n",
              ^
HLTrigger/Timer/plugins/FastTimerService.cc:1135:15: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  out << fmt::sprintf("FastReport  %10.1f ms  %10.1f ms  %+10d kB  %+10d kB  %s\n",
              ^
HLTrigger/Timer/plugins/FastTimerService.cc:1219:15: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  out << fmt::sprintf(
              ^
HLTrigger/Timer/plugins/FastTimerService.cc:1233:15: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  out << fmt::sprintf(
              ^
HLTrigger/Timer/plugins/FastTimerService.cc:1253:15: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  out << fmt::sprintf(
              ^
HLTrigger/Timer/plugins/FastTimerService.cc:1267:15: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  out << fmt::sprintf(
              ^
HLTrigger/Timer/plugins/FastTimerService.cc:1283:15: error: no member named 'sprintf' in namespace 'fmt' [clang-diagnostic-error]
  out << fmt::sprintf(
              ^
/cvmfs/cms-ib.cern.ch/nweek-02637/slc7_amd64_gcc820/external/fmt/6.2.1-hkbigh/include/fmt/core.h:1582:9: error: no matching constructor for initialization of 'basic_format_args<fmt::v6::format_context>' (aka 'basic_format_args<basic_format_context<std::back_insert_iterator<internal::buffer<char> >, char> >') [clang-diagnostic-error]
      : basic_format_args<format_context>(static_cast<Args&&>(args)...) {}
        ^
HLTrigger/Timer/plugins/FastTimerService.cc:380:61: note: in instantiation of function template specialization 'fmt::v6::format_args::format_args<const double &>' requested here
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:128: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 15, 2020

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30693/16994

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 15, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

HLTrigger/JSONMonitoring
HLTrigger/Timer

@cmsbuild, @Martin-Grunewald, @fwyzard can you please review it and eventually sign? Thanks.
@Martin-Grunewald 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

+1
Tested at: 2d16e39
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-96d1af/7955/summary.html
CMSSW: CMSSW_11_2_X_2020-07-14-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-96d1af/7955/summary.html

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-96d1af/28234.0_TTbar_14TeV+TTbar_14TeV_TuneCP5_2026D60_GenSimHLBeamSpotFull14+DigiFullTrigger_2026D60+RecoFullGlobal_2026D60+HARVESTFullGlobal_2026D60

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2612943
  • DQMHistoTests: Total failures: 5
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2612889
  • DQMHistoTests: Total skipped: 48
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 34 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 146 log files, 17 edm output root files, 35 DQM output files

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 15, 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 (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit dc34686 into cms-sw:master Jul 16, 2020
@fwyzard fwyzard deleted the migrate_from_boost_format_to_fmt branch July 28, 2020 15:22
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

3 participants