Skip to content

Conversation

@Dr15Jones
Copy link
Contributor

PR description:

  • now that all our compilers support the new standard library, switch to using it.
  • this uncovered cases where we had missing standard library header includes.

PR validation:

Code compiles.

Can now use the standard format library with our compilers.
@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2025

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49086/46324

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2025

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

It involves the following packages:

  • DataFormats/FEDRawData (daq)
  • DataFormats/Provenance (core)
  • FWCore/Framework (core)
  • FWCore/Integration (core)
  • FWCore/MessageLogger (core)
  • FWCore/MessageService (core)
  • FWCore/Services (core)
  • FWCore/Utilities (core)
  • IOPool/Common (core)
  • IOPool/Input (core)
  • Utilities/StorageFactory (core)

@Dr15Jones, @emeschi, @makortel, @smorovic, @smuzaffar can you please review it and eventually sign? Thanks.
@felicepantaleo, @fwyzard, @makortel, @missirol, @mmusich, @rovere, @wddgit this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2025

-1

Failed Tests: Build HeaderConsistency
Size: This PR adds an extra 104KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-94d267/48526/summary.html
COMMIT: 3b732c2
CMSSW: CMSSW_16_0_X_2025-10-07-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/49086/48526/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation error when building:

/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/gcc/13.4.0-6908cfdf803923e783448096ca4f0923/bin/c++ -MMD -MF tmp/el8_amd64_gcc13/src/CUDADataFormats/SiPixelCluster/src/CUDADataFormatsSiPixelCluster/lcgdict/CUDADataFormatsSiPixelCluster_xr.cc.d -I. -c -DCMS_MICRO_ARCH='x86-64-v3' -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=130400 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DBOOST_MPL_IGNORE_PARENTHESES_WARNING -DCMSSW_GIT_HASH='CMSSW_16_0_X_2025-10-07-1100' -DPROJECT_NAME='CMSSW' -DPROJECT_VERSION='CMSSW_16_0_X_2025-10-07-1100' -Isrc -Ipoison -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/cms/cmssw-patch/CMSSW_16_0_X_2025-10-07-1100/src -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/pcre/8.43-6d98fda3bfd074ebb583e2d6a2c75d25/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/boost/1.80.0-f5051ff020fe9f6f1a74162002ac1ea0/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/bz2lib/1.0.6-d113e1c6278c07eeaff5f84db9548446/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/libuuid/2.34-5ba7a8abfc0c5fecdc448cca360c25ff/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/lcg/root/6.32.13-2ba92f62034c9fcccda180513e8d0814/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/tbb/v2022.0.0-ede4a930df4abec602e96e3f3ad15914/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/xz/5.6.4-b9c4ffbc390ed320a5d57fd552e29a05/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/zlib/1.2.13-589f6bb51bbeba38a7adf5a10ea8a093/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/cuda/12.9.1-cff83d5f72da96ebfea8cafd87a05296/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-95c02b8a883b2934decb8bb53ff9b486/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-95c02b8a883b2934decb8bb53ff9b486/include/eigen3 -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/md5/1.0.0-26057075013e190e56dad37d35219376/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02910/el8_amd64_gcc13/external/tinyxml2/6.2.0-67924ead96ecb4e69aad321b767979a5/include -DCMSSW_REFLEX_DICT -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++20 -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -Wno-error=array-bounds -Warray-bounds -fuse-ld=bfd -march=x86-64-v3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -DEIGEN_DONT_PARALLELIZE -DEIGEN_MAX_ALIGN_BYTES=64 -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -Os -Wno-unused-variable -flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr  -fPIC  tmp/el8_amd64_gcc13/src/CUDADataFormats/SiPixelCluster/src/CUDADataFormatsSiPixelCluster/lcgdict/CUDADataFormatsSiPixelCluster_xr.cc -o tmp/el8_amd64_gcc13/src/CUDADataFormats/SiPixelCluster/src/CUDADataFormatsSiPixelCluster/lcgdict/CUDADataFormatsSiPixelCluster_xr.cc.o
In file included from src/DataFormats/SoATemplate/interface/SoALayout.h:11,
                 from src/CUDADataFormats/SiPixelCluster/interface/SiPixelClustersCUDA.h:8,
                 from ./src/CUDADataFormats/SiPixelCluster/src/classes.h:5,
                 from tmp/el8_amd64_gcc13/src/CUDADataFormats/SiPixelCluster/src/CUDADataFormatsSiPixelCluster/lcgdict/CUDADataFormatsSiPixelCluster_xr.cc:38:
src/DataFormats/SoATemplate/interface/SoACommon.h:20:10: fatal error: fmt/format.h: No such file or directory
   20 | #include 
      |          ^~~~~~~~~~~~~~
compilation terminated.
gmake: *** [tmp/el8_amd64_gcc13/src/CUDADataFormats/SiPixelCluster/src/CUDADataFormatsSiPixelCluster/lcgdict/CUDADataFormatsSiPixelCluster_xr.cc.o] Error 1
gmake: *** [tmp/el8_amd64_gcc13/src/CUDADataFormats/SiPixelCluster/src/CUDADataFormatsSiPixelCluster/lcgdict/CUDADataFormatsSiPixelCluster_xr.cc.o] Error 1


The dependence on fmt was not being forwarded properly by SCRAM
so switching to std::format solves compiling issues.
@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2025

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49086/46329

@makortel
Copy link
Contributor

makortel commented Oct 9, 2025

+core

@fwyzard
Copy link
Contributor

fwyzard commented Oct 9, 2025

ChatGPT suggests

  • Use std::format if you value portability and standard compliance.
  • Use {fmt} if you:
    • Want maximum performance or latest features (e.g., fmt::runtime, fmt::memory_buffer, custom formatting types).
    • Want better compile times or smaller binaries.

If the cost in compile time and binary size is negligible, I guess we can mix {fmt} for the additional features (coloured MessageLogger output anyone?) and std::format for the basic stuff.

@fwyzard
Copy link
Contributor

fwyzard commented Oct 9, 2025

+heterogeneous

@Dr15Jones
Copy link
Contributor Author

@smuzaffar not all of the '+' signatures have been registered by the bot.

@BenjaminRS
Copy link
Contributor

+l1

@nothingface0
Copy link
Contributor

nothingface0 commented Oct 10, 2025

@Dr15Jones sorry for keeping this from merging, just want to be 100%.

We're now trying to test this PR on our machines by applying on top of 16_0_0_pre1 but we get the following:

Copying tmp/el8_amd64_gcc13/src/HeterogeneousCore/CUDAUtilities/test/gpuOneToManyAssoc_debug/gpuOneToManyAssoc_debug to productstore area:
In file included from /opt/offline/el8_amd64_gcc13/external/rocm/6.4.3-8bc52e5de186aa7fa61c7d17f290f0df/include/rocm_smi/rocm_smi.h:57,
                 from src/HeterogeneousCore/ROCmServices/plugins/ROCmService.cc:15:                                
/opt/offline/el8_amd64_gcc13/external/rocm/6.4.3-8bc52e5de186aa7fa61c7d17f290f0df/include/rocm_smi/kfd_ioctl.h:26:10: fatal error: libdrm/drm.h: No such file or directory
   26 | #include <libdrm/drm.h>                                                                                               
      |          ^~~~~~~~~~~~~~                                                                                  

Are we missing some system package?

Edit: libdrm is installed system-wide. Retrying now with CPLUS_INCLUDE_PATH=/usr/include scram b -j just in case it works (it didn't).

We're probably missing libdrm-devel in our machine.

@fwyzard
Copy link
Contributor

fwyzard commented Oct 10, 2025

That

/opt/offline/el8_amd64_gcc13/external/rocm/6.4.3-8bc52e5de186aa7fa61c7d17f290f0df/include/rocm_smi/kfd_ioctl.h:26:10: fatal error: libdrm/drm.h: No such file or directory

is pretty much unrelated to this PR.

@nothingface0
Copy link
Contributor

+dqm

  • P5 tests OK

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

@nothingface0
Copy link
Contributor

pretty much unrelated to this PR.

Yes, yes, I understood that much, I was just trying to build it on our machine and was asking for guidance on this. I figured it out.

@fwyzard
Copy link
Contributor

fwyzard commented Oct 10, 2025

Ah, sorry, I misunderstood !

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit cacaf2d into cms-sw:master Oct 10, 2025
10 checks passed
@Dr15Jones Dr15Jones deleted the fmt_to_std branch October 10, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment