Suppress TBB Warnings with C++20, 23.0 branch (2023.07.06.)
I hate this proposal, but just can not come up with a better solution for the issue described in ATLINFR-4996.
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/ROOT/v6-28-00-patches/x86_64-el9-gcc13-opt/bin/genreflex \
/mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers/AthContainers/AthContainersDict.h -o AthContainersDictReflexDict.cxx \
--noIncludePaths --rootmap=AthContainersDict.dsomap --rootmap-lib=libAthContainersDict.so --library=libAthContainersDict.so \
--select="/mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers/AthContainers/selection.xml" \
-I "/mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/AthenaExternals/24.0.8/InstallArea/x86_64-el9-gcc13-opt/lib/CLHEP-2.4.1.3/../../include" \
-isystem "/mnt/hdd1/krasznaa/projects/gcc13/build/Control/AthContainers/CMakeFiles" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/ROOT/v6-28-00-patches/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/AthenaExternals/24.0.8/InstallArea/x86_64-el9-gcc13-opt/lib/CLHEP-2.4.1.3/../../include" \
-isystem "/mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/ROOT/v6-28-00-patches/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/ROOT/v6-28-00-patches/x86_64-el9-gcc13-opt/include" -isystem "/mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/Boost/1.82.0/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/Athena/24.0.8/InstallArea/x86_64-el9-gcc13-opt/src/Control/AthContainersInterfaces" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/Athena/24.0.8/InstallArea/x86_64-el9-gcc13-opt/src/Control/CxxUtils" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/Boost/1.82.0/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/Athena/24.0.8/InstallArea/x86_64-el9-gcc13-opt/src/Control/AthenaKernel" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/Boost/1.82.0/x86_64-el9-gcc13-opt/include" \
-isystem "/usr/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/Athena/24.0.8/InstallArea/x86_64-el9-gcc13-opt/src/Control/DataModelRoot" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/ROOT/v6-28-00-patches/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/AthenaExternals/24.0.8/InstallArea/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/AthenaExternals/24.0.8/InstallArea/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/latest/Boost/1.82.0-fbfc9/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/latest/Boost/1.82.0-fbfc9/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/latest/Boost/1.82.0-fbfc9/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/latest/Boost/1.82.0-fbfc9/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/latest/Boost/1.82.0-fbfc9/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/ROOT/v6-28-00-patches/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/cppgsl/3.1.0/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/fmt/10.0.0/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/jsonmcpp/3.10.5/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/jsonmcpp/3.10.5/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/rangev3/0.11.0/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/Athena/24.0.8/InstallArea/x86_64-el9-gcc13-opt/src/Control/AthLinks" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/Boost/1.82.0/x86_64-el9-gcc13-opt/include" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/Athena/24.0.8/InstallArea/x86_64-el9-gcc13-opt/src/Control/SGTools" \
-isystem "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master--dev4LCG_Athena_x86_64-el9-gcc13-opt/2023-07-05T0730/Athena/24.0.8/InstallArea/x86_64-el9-gcc13-opt/src/Control/AthAllocators" \
-isystem "/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/Boost/1.82.0/x86_64-el9-gcc13-opt/include" \
-DGAUDI_V20_COMPAT -DATLAS_PACKAGE_NAME=\"AthContainers\" -DEIGEN_DONT_VECTORIZE -DBOOST_FILESYSTEM_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK \
-DBOOST_THREAD_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK \
-DFMT_SHARED -DJSON_USE_IMPLICIT_CONVERSIONS=1 -DJSON_DIAGNOSTICS=0
i.e. by way over-using -isystem
, I would still see the following warning with GCC 13 / C++20:
In file included from input_line_7:10:
In file included from /mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers/AthContainers/AuxTypeRegistry.h:23:
In file included from /mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers/AthContainers/tools/threading.h:133:
In file included from /cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include/tbb/concurrent_vector.h:25:
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include/tbb/atomic.h:240:18: warning: volatile-qualified parameter type 'const volatile long long' is deprecated [-Wdeprecated-volatile]
converter(value_type a_value) : value(a_value) {}
^
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include/tbb/atomic.h:269:21: note: in instantiation of template class 'tbb::internal::atomic_impl<long long>::converter<const volatile long long>' requested here
static typename converter<value_t>::bits_type & to_bits_ref(value_t& value){
^
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include/tbb/atomic.h:311:42: note: while substituting deduced template arguments into function template 'to_bits_ref' [with value_t = const volatile long long]
__TBB_load_with_acquire( to_bits_ref(my_storage.my_value) )
^
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include/tbb/atomic.h:454:1: note: in instantiation of member function 'tbb::internal::atomic_impl<long long>::operator long long' requested here
__TBB_DECL_ATOMIC(__TBB_LONG_LONG)
^
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include/tbb/atomic.h:441:78: note: expanded from macro '__TBB_DECL_ATOMIC'
atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;} \
...
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Wed/tbb/2020_U2/x86_64-el9-gcc13-opt/include/tbb/concurrent_vector.h:873:16: note: in instantiation of member function 'tbb::concurrent_vector<SG::AuxTypeRegistry::typeinfo_t, tbb::cache_aligned_allocator<SG::AuxTypeRegistry::typeinfo_t> >::internal_subscript' requested here
return internal_subscript(index);
^
/mnt/hdd1/krasznaa/projects/gcc13/athena/Control/AthContainers/AthContainers/AuxTypeRegistry.icc:48:17: note: in instantiation of member function 'tbb::concurrent_vector<SG::AuxTypeRegistry::typeinfo_t, tbb::cache_aligned_allocator<SG::AuxTypeRegistry::typeinfo_t> >::operator[]' requested here
return m_types[auxid].m_factory;
At the same time, I just couldn't reproduce the same behaviour in any simple example in which I was trying to use tbb::concurrent_vector
in the same way in whith SG::AuxTypeRegistry
is doing it.
So I bring this to @ssnyder and @fwinkl: should we do this ugly thing, or continue with the debugging, involving the ROOT developers in the fun as well? I'm not sure myself what would be the best to do.
Merge request reports
Activity
Another "strategy" could be to simply wait for the upgrade of the dev4 nightlies to oneAPI TBB, which may fix those warnings at the source. But that will probably take a few more weeks. So I would vote for going ahead with this at least as a short-term fix. That will allow us to get an idea how many real compiler warnings we have in our gcc13 nightlies.
Let me re-point it to 23.0 then, just so that we would do it properly...added 33 commits
- 0646e364...1a4fb761 - 23 earlier commits
- 97ed44ad - Make ATLFAST3F_G4MS configuration match ATLFAST3 configuration except that ISF...
- ccc154b7 - Merge branch 'ATLFAST3F_G4MS_23.0' into '23.0'
- 5bd27595 - Include !63964 (merged) in 23.0
- 9df62f66 - Merge branch 'svanstro-23.0-patch-42251' into '23.0'
- 66fbc398 - MuonGeoModelTest - Add CSC tester
- cee54637 - Merge branch 'CscILines' into '23.0'
- 19978723 - Merge branch '23.0_improve_error_messages_of_expression_parser' into '23.0'
- fbdf5495 - Demo script to produce a bad channel list
- a8a7eaa8 - Merge branch 'LArCusterCellMonReader' into '23.0'
- 38e8e8bc - Suppress warnings about volatile variables for Cling.
Toggle commit listThis merge request affects 1 package:
- Control/AthContainers
This merge request affects 1 file:
- Control/AthContainers/AthContainers/tools/threading.h
Adding @ssnyder as watcher
added 23.0 Core analysis-review-required review-pending-level-1 labels
CI Result SUCCESS (hash 38e8e8bc)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 74028]removed review-pending-level-1 label
added review-approved label
added review-approved-tier0 label
added analysis-review-approved label and removed analysis-review-required label
added review-approved-point1 label
mentioned in commit fad4671a
mentioned in merge request !64217 (merged)
Hey
there are many warnings
from /build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Tracking/Acts/ActsDataPreparation/src/ActsCoreStripSpacePointFormationTool.cxx:5: /build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Control/AthContainers/AthContainers/tools/threading.h:137: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] 137 | #pragma clang diagnostic push | /build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Control/AthContainers/AthContainers/tools/threading.h:138: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] 138 | #pragma clang diagnostic ignored "-Wdeprecated-volatile" | /build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Control/AthContainers/AthContainers/tools/threading.h:142: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] 142 | #pragma clang diagnostic pop
Do now know if
defined(__clang__)
is needed i.e
#if defined(__clang__) #if __cplusplus > 201703L #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-volatile" #endif // >C++17 #include "tbb/concurrent_vector.h" #if __cplusplus > 201703L #pragma clang diagnostic pop #endif // >C++17 #endif //clang
I don't know how I missed these.
See !64240 (merged) for my fix attempt.
mentioned in merge request !64240 (merged)
But how many dictionary generation commands would we need to add that flag to?Clang compilation will not show this issue. Since clang respects
-isystem
just fine. Without an issue ingenreflex
with it not respecting-isystem
, we would not have had to do any of this.All in all, I still think that this addition (together with !64240 (merged)) was the most pragmatic thing to do...
One --- in the atlas_generate_reflex_dictionary cmake function. (Ok, maybe also in atlas_add_root_dictionary.)
And i wasn't referring to the instance of this in the TBB headers, but rather some hypothetical instance of it in the Athena code. The point was that disabling this warning globally for all genreflex runs won't blind us to instances of this in our code since they should still be diagnosed by the clang builds. (Though i don't think we have anything that would actually trip this warning.)