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 compatibility with FMT 10 #45467

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Fix compatibility with FMT 10 #45467

merged 1 commit into from
Jul 25, 2024

Conversation

iarspider
Copy link
Contributor

PR description:

Title says it all. When testing cms-sw/cmsdist#9293, the following errors are reported:

In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/format.h:49,
                 from src/FWCore/MessageLogger/interface/ErrorObj.h:28,
                 from src/FWCore/MessageLogger/interface/MessageSender.h:5,
                 from src/FWCore/MessageLogger/interface/MessageLogger.h:30,
                 from src/FWCore/Framework/interface/maker/Worker.h:37,
                 from src/FWCore/Framework/interface/maker/WorkerT.h:13,
                 from src/FWCore/Framework/interface/maker/WorkerMaker.h:8,
                 from src/FWCore/Framework/interface/MakerMacros.h:5,
                 from src/DQM/SiPixelHeterogeneous/plugins/SiPixelPhase1RawDataErrorComparator.cc:24:
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::basic_printf_context<char>; T = const {anonymous}::SiPixelFEDErrorCodes; typename std::enable_if<PACKED, int>::type <anonymous> = 0]':
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:1842:51:   required from 'constexpr fmt::v10::format_arg_store<Context, Args>::format_arg_store(T& ...) [with T = {const {anonymous}::SiPixelFEDErrorCodes}; Context = fmt::v10::basic_printf_context<char>; Args = {{anonymous}::SiPixelFEDErrorCodes}]'
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:1860:18:   required from 'constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_printf_context<char>; T = {const {anonymous}::SiPixelFEDErrorCodes}]'
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/printf.h:614:68:   required from 'std::__cxx11::basic_string<Char> fmt::v10::sprintf(const S&, const T& ...) [with S = char [14]; T = {{anonymous}::SiPixelFEDErrorCodes}; Char = char]'
src/DQM/SiPixelHeterogeneous/plugins/SiPixelPhase1RawDataErrorComparator.cc:287:61:   required from here
  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:1600:63: error: 'fmt::v10::detail::type_is_unformattable_for<const {anonymous}::SiPixelFEDErrorCodes, char> _' has incomplete type
  1600 |     type_is_unformattable_for<T, typename Context::char_type> _;
      |                                                               ^
  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:1604:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
  1604 |       formattable,
      |       ^~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:1604:7: note: 'formattable' evaluates to false

This worked before because of a bug in fmt, where enum was silently cast to int

In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/format.h:49,
                 from src/FWCore/MessageLogger/interface/ErrorObj.h:28,
                 from src/FWCore/MessageLogger/interface/MessageSender.h:5,
                 from src/FWCore/MessageLogger/interface/MessageLogger.h:30,
                 from src/FWCore/Framework/interface/maker/Worker.h:37,
                 from src/FWCore/Framework/interface/maker/WorkerT.h:13,
                 from src/FWCore/Framework/interface/maker/WorkerMaker.h:8,
                 from src/FWCore/Framework/interface/MakerMacros.h:5,
                 from src/SimCalorimetry/HGCalAssociatorProducers/plugins/SimTauCPLinkProducer.cc:17:
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h: In instantiation of 'constexpr decltype (ctx.begin()) fmt::v10::detail::parse_format_specs(ParseContext&) [with T = CaloParticle; ParseContext = compile_parse_context<char>; decltype (ctx.begin()) = const char*]':
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2684:51:   required from here
src/SimCalorimetry/HGCalAssociatorProducers/plugins/SimTauCPLinkProducer.cc:82:40:   in 'constexpr' expansion of 'fmt::v10::basic_format_string<char, long int&, const CaloParticle&>(" CP {} {}")'
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2787:40:   in 'constexpr' expansion of 'fmt::v10::detail::parse_format_string<true, char, format_string_checker<char, long int, CaloParticle> >(((fmt::v10::basic_format_string<char, long int&, const CaloParticle&>*)this)->fmt::v10::basic_format_string<char, long int&, const CaloParticle&>::str_, fmt::v10::detail::format_string_checker<char, long int, CaloParticle>(fmt::v10::basic_string_view<char>(((const char*)s))))'
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2534:44:   in 'constexpr' expansion of 'fmt::v10::detail::parse_replacement_field<char, format_string_checker<char, long int, CaloParticle>&>((p + -1), end, (* & handler))'
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2502:33:   in 'constexpr' expansion of '(& handler)->fmt::v10::detail::format_string_checker<char, long int, CaloParticle>::on_replacement_field((& handler)->fmt::v10::detail::format_string_checker<char, long int, CaloParticle>::on_arg_id(), begin)'
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2677:20:   in 'constexpr' expansion of '((fmt::v10::detail::format_string_checker<char, long int, CaloParticle>*)this)->fmt::v10::detail::format_string_checker<char, long int, CaloParticle>::on_format_specs(id, begin, begin)'
  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2593:45: error: 'fmt::v10::detail::type_is_unformattable_for<CaloParticle, char> _' has incomplete type
  2593 |     type_is_unformattable_for<T, char_type> _;
      |                                             ^
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h: In member function 'void SimTauProducer::buildSimTau(SimTauCPLink&, uint8_t, int, const reco::GenParticle&, int, edm::Handle<std::vector<CaloParticle> >, const std::vector<int>&) const':
  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2684:51: error: 'constexpr decltype (ctx.begin()) fmt::v10::detail::parse_format_specs(ParseContext&) [with T = CaloParticle; ParseContext = compile_parse_context<char>; decltype (ctx.begin()) = const char*]' called in a constant expression
  2684 |     return id >= 0 && id < num_args ? parse_funcs_[id](context_) : begin;
      |                                       ~~~~~~~~~~~~^
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-76ef466f9d9d21f087f9b7e4e843a9d9/include/fmt/core.h:2580:20: note: 'constexpr decltype (ctx.begin()) fmt::v10::detail::parse_format_specs(ParseContext&) [with T = CaloParticle; ParseContext = compile_parse_context<char>; decltype (ctx.begin()) = const char*]' is not usable as a 'constexpr' function because:
 2580 | FMT_CONSTEXPR auto parse_format_specs(ParseContext& ctx)
      |                    ^~~~~~~~~~~~~~~~~~

No idea why it stopped working. @cms-sw/simulation-l2 could you please verify that the code is supposed to print pdgId, and not some other property of CaloParticle?

PR validation:

Bot tests

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 15, 2024

cms-bot internal usage

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @iarspider for master.

It involves the following packages:

  • DQM/SiPixelHeterogeneous (dqm)
  • SimCalorimetry/HGCalAssociatorProducers (simulation, upgrade)

@antoniovagnerini, @civanch, @mdhildreth, @nothingface0, @rvenditti, @srimanob, @subirsarkar, @syuvivida, @tjavaid can you please review it and eventually sign? Thanks.
@fioriNTU, @idebruyn, @jandrea, @mmusich, @rovere, @sameasy, @threus this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-904835/40416/summary.html
COMMIT: 232f783
CMSSW: CMSSW_14_1_X_2024-07-15-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45467/40416/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

  • You potentially removed 11 lines from the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3345094
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3345074
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Jul 16, 2024

+1

@srimanob
Copy link
Contributor

+Upgrade

@srimanob
Copy link
Contributor

@cmsbuild please test

Refresh the test result.

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-904835/40526/summary.html
COMMIT: 232f783
CMSSW: CMSSW_14_1_X_2024-07-22-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45467/40526/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

@smuzaffar
Copy link
Contributor

please test

@smuzaffar
Copy link
Contributor

@cms-sw/dqm-l2 , can you please review this? For DQM, it is just a technical change to us ethe correct type.
This is blocking the update of pytorch which requires new fmt version.

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-904835/40590/summary.html
COMMIT: 232f783
CMSSW: CMSSW_14_1_X_2024-07-24-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45467/40590/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

@tjavaid
Copy link

tjavaid commented Jul 25, 2024

+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. @rappoccio, @mandrenguyen, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@smuzaffar
Copy link
Contributor

@cms-sw/orp-l2 , can you please include this for next 14.1.X IB. This allows us to move forward with pytorch 2.4.0

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 0efbba9 into cms-sw:master Jul 25, 2024
11 checks passed
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.

7 participants