Geant4 LTO Improvements / Fixes, main branch (2024.05.10.)
As @elmsheus found in ATLINFR-5372, !71255 (merged) managed to break our Clang nightly.
https://bigpanda.cern.ch/nview/?nightly=main_Athena_x86_64-el9-clang17-opt
It turns out that LTO doesn't come as easily to Clang as it does to GCC.
As described in ATLINFR-5372, I found that I would need to do two things:
- Turn off
ATLAS_GEANT4_USE_LTO
when check_ipo_supported(...) tells us to do so. This is what I did inAthena/CMakeLists.txt
andAthSimulation/CMakeLists.txt
. - Make sure that INTERPROCEDURAL_OPTIMIZATION would be set explicitly on all clients of the G4 OBJECT libraries. Since IPO/LTO is not a transitive property in CMake, and Clang's linking needs LTO to be enabled to understand what to do with the object files that were created using LTO.
During the latter I also found a package that escaped being merged into AtlasGeant4
: MuonSensitiveDetectorsR4. In this MR I'm adding that to AtlasGeant4
as well. But I'm not absolutely sure that I should...
Merge request reports
Activity
added bugfix label
This merge request affects 16 packages:
- ForwardDetectors/ALFA/ALFA_G4_SD
- ForwardDetectors/LUCID/LUCID_G4_SD
- ForwardDetectors/ZDC/ZDC_SD
- InnerDetector/InDetG4/BCM_G4_SD
- InnerDetector/InDetG4/BLM_G4_SD
- InnerDetector/InDetG4/PixelG4_SD
- InnerDetector/InDetG4/SCT_G4_SD
- InnerDetector/InDetG4/TRT_G4Utilities
- InnerDetector/InDetG4/TRT_G4_SD
- LArCalorimeter/LArG4/LArG4Code
- MuonSpectrometer/MuonG4/MuonG4SD
- MuonSpectrometer/MuonPhaseII/MuonG4/MuonSensitiveDetectorsR4
- Projects/AthSimulation
- Projects/Athena
- Simulation/AtlasGeant4
- Simulation/ISF/ISF_Core/ISF_Services
Affected files list will not be printed in this case
Adding @rosati ,@pscholer ,@calfayan ,@battagl ,@jojungge ,@lmijovic ,@apsallid ,@lshan ,@kluit ,@rbianchi ,@goetz ,@pavol ,@stsuno ,@cgrefe ,@akraszna ,@jchapman ,@sroe ,@stavrop as watchers
CI Result FAILUREAthena AthSimulation externals cmake make N/A N/A tests N/A N/A Due to problems in externals build or cmake configuration the job is stopped, results are not available on the ATLAS CI monitor
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-EL9 9340] (remote access info)added 1 commit
- 03b5b2bf - Added a check for whether LTO can be turned on.
This merge request affects 16 packages:
- ForwardDetectors/ALFA/ALFA_G4_SD
- ForwardDetectors/LUCID/LUCID_G4_SD
- ForwardDetectors/ZDC/ZDC_SD
- InnerDetector/InDetG4/BCM_G4_SD
- InnerDetector/InDetG4/BLM_G4_SD
- InnerDetector/InDetG4/PixelG4_SD
- InnerDetector/InDetG4/SCT_G4_SD
- InnerDetector/InDetG4/TRT_G4Utilities
- InnerDetector/InDetG4/TRT_G4_SD
- LArCalorimeter/LArG4/LArG4Code
- MuonSpectrometer/MuonG4/MuonG4SD
- MuonSpectrometer/MuonPhaseII/MuonG4/MuonSensitiveDetectorsR4
- Projects/AthSimulation
- Projects/Athena
- Simulation/AtlasGeant4
- Simulation/ISF/ISF_Core/ISF_Services
Affected files list will not be printed in this case
Adding @lmijovic ,@cgrefe ,@jchapman ,@calfayan ,@rosati ,@stavrop ,@apsallid ,@battagl ,@akraszna ,@kluit ,@stsuno ,@sroe ,@jojungge ,@rbianchi ,@lshan ,@goetz ,@pscholer ,@pavol as watchers
Dang... I should've turned on full-unit-tests and full-integration-tests. I'm afraid we'll have to re-build the MR with those enabled as well...
But for now let's just wait for the "lightweight" build to finish first.Edited by Attila Krasznahorkayadded full-unit-tests label
added full-integration-tests label
- Resolved by John Derek Chapman
Thanks for the quick fixes on this @akraszna! On the MuonSensitiveDetectorsR4, that was discovered in the LTO work and there's ATLASSIM-7172 on this. I think the consensus, but @jchapman and @jojungge should confirm, was to merge it into
AtlasGeant4
.
CI Result SUCCESS (hash 03b5b2bf)Athena AthSimulation 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
For experts only: Jenkins output [CI-MERGE-REQUEST-EL9 9342] (remote access info)This merge request affects 16 packages:
- ForwardDetectors/ALFA/ALFA_G4_SD
- ForwardDetectors/LUCID/LUCID_G4_SD
- ForwardDetectors/ZDC/ZDC_SD
- InnerDetector/InDetG4/BCM_G4_SD
- InnerDetector/InDetG4/BLM_G4_SD
- InnerDetector/InDetG4/PixelG4_SD
- InnerDetector/InDetG4/SCT_G4_SD
- InnerDetector/InDetG4/TRT_G4Utilities
- InnerDetector/InDetG4/TRT_G4_SD
- LArCalorimeter/LArG4/LArG4Code
- MuonSpectrometer/MuonG4/MuonG4SD
- MuonSpectrometer/MuonPhaseII/MuonG4/MuonSensitiveDetectorsR4
- Projects/AthSimulation
- Projects/Athena
- Simulation/AtlasGeant4
- Simulation/ISF/ISF_Core/ISF_Services
Affected files list will not be printed in this case
Adding @jojungge ,@pavol ,@lshan ,@calfayan ,@stsuno ,@apsallid ,@kluit ,@rbianchi ,@sroe ,@jchapman ,@akraszna ,@battagl ,@cgrefe ,@pscholer ,@lmijovic ,@goetz ,@stavrop ,@rosati as watchers
CI Result SUCCESS (hash 03b5b2bf)Athena AthSimulation 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
For experts only: Jenkins output [CI-MERGE-REQUEST-EL9 9358] (remote access info)added review-approved label and removed review-pending-level-1 label
mentioned in commit 5093bae0