Skip to content

Commit ff9dcf4

Browse files
committed
Reduce compile time / memory footprint of DQ
1 parent 5b4bf8c commit ff9dcf4

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

PWGDQ/Tasks/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
1111

12+
# tableReader_withAssoc.cxx is 5000 lines of task definitions, and seven
13+
# workflow variants below #include it verbatim -- differing only in which
14+
# adaptAnalysisTask<> entries they list, with identical preprocessor state and
15+
# identical link libraries. Without this it is parsed and instantiated seven
16+
# times, and it is the heaviest thing in the PWG: a cc1plus compiling one of
17+
# these was OOM-killed at ~8 GB RSS.
18+
#
19+
# Skipped under recc, which caches compilations remotely instead.
20+
add_library(TableReaderWithAssocPCH OBJECT tableReaderWithAssocPCH.cxx)
21+
target_link_libraries(TableReaderWithAssocPCH PUBLIC O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore)
22+
if(NOT DEFINED ENV{USE_RECC})
23+
target_precompile_headers(TableReaderWithAssocPCH PRIVATE
24+
[["PWGDQ/Tasks/tableReader_withAssoc.cxx"]])
25+
endif()
26+
1227
o2physics_add_dpl_workflow(table-reader
1328
SOURCES tableReader.cxx
1429
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGDQCore O2Physics::MLCore
@@ -17,36 +32,43 @@ o2physics_add_dpl_workflow(table-reader
1732
o2physics_add_dpl_workflow(table-reader-with-assoc
1833
SOURCES tableReader_withAssoc_workflowSpec.cxx
1934
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore
35+
REUSE_FROM TableReaderWithAssocPCH
2036
COMPONENT_NAME Analysis)
2137

2238
o2physics_add_dpl_workflow(table-reader-with-assoc-same-event-pairing-barrel-only
2339
SOURCES tableReader_withAssoc_SameEventPairingBarrelOnly_workflowSpec.cxx
2440
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore
41+
REUSE_FROM TableReaderWithAssocPCH
2542
COMPONENT_NAME Analysis)
2643

2744
o2physics_add_dpl_workflow(table-reader-with-assoc-same-event-pairing-muon-only
2845
SOURCES tableReader_withAssoc_SameEventPairingMuonOnly_workflowSpec.cxx
2946
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore
47+
REUSE_FROM TableReaderWithAssocPCH
3048
COMPONENT_NAME Analysis)
3149

3250
o2physics_add_dpl_workflow(table-reader-with-assoc-same-event-pairing
3351
SOURCES tableReader_withAssoc_SameEventPairing_workflowSpec.cxx
3452
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore
53+
REUSE_FROM TableReaderWithAssocPCH
3554
COMPONENT_NAME Analysis)
3655

3756
o2physics_add_dpl_workflow(table-reader-with-assoc-asymmetric-pairing
3857
SOURCES tableReader_withAssoc_AsymmetricPairing_workflowSpec.cxx
3958
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore
59+
REUSE_FROM TableReaderWithAssocPCH
4060
COMPONENT_NAME Analysis)
4161

4262
o2physics_add_dpl_workflow(table-reader-with-assoc-dilepton-track-pairing
4363
SOURCES tableReader_withAssoc_DileptonTrackPairing_workflowSpec.cxx
4464
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore
65+
REUSE_FROM TableReaderWithAssocPCH
4566
COMPONENT_NAME Analysis)
4667

4768
o2physics_add_dpl_workflow(table-reader-with-assoc-dilepton-track-track-pairing
4869
SOURCES tableReader_withAssoc_DileptonTrackTrackPairing_workflowSpec.cxx
4970
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore O2Physics::MLCore
71+
REUSE_FROM TableReaderWithAssocPCH
5072
COMPONENT_NAME Analysis)
5173

5274
o2physics_add_dpl_workflow(table-reader-with-assoc-direct
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
// Carrier for the precompiled header shared by the tableReader_withAssoc
13+
// workflow variants; see TableReaderWithAssocPCH in this directory's
14+
// CMakeLists.txt. It exists only to own the PCH.

0 commit comments

Comments
 (0)