From 4ef00e32e661c4c7e1a3f6096b4a76607770215c Mon Sep 17 00:00:00 2001 From: Chris Green Date: Mon, 10 Jul 2023 15:39:42 -0500 Subject: [PATCH 01/36] Cetmodules -> 3.22.01 --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 95219240..65289518 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -250,7 +250,7 @@ perllib product_dir product version qual flags canvas v3_15_02 - catch v3_3_2 - only_for_build -cetmodules v3_21_02 - only_for_build +cetmodules v3_22_01 - only_for_build range v3_0_12_0 - only_for_build end_product_list #################################### From 1ce91c380d0295910723106ff0aa4d8efebbed1b Mon Sep 17 00:00:00 2001 From: Marc Paterno Date: Thu, 27 Jul 2023 16:03:19 -0500 Subject: [PATCH 02/36] Make ConnectionFactory return unique_ptr --- art/Framework/Services/System/DatabaseConnection.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/art/Framework/Services/System/DatabaseConnection.h b/art/Framework/Services/System/DatabaseConnection.h index a818d671..f1dca601 100644 --- a/art/Framework/Services/System/DatabaseConnection.h +++ b/art/Framework/Services/System/DatabaseConnection.h @@ -3,10 +3,12 @@ // vim: set sw=2 expandtab : #include "art/Framework/Services/Registry/ServiceDeclarationMacros.h" +#include "cetlib/sqlite/Connection.h" #include "cetlib/sqlite/ConnectionFactory.h" #include "cetlib/sqlite/detail/DefaultDatabaseOpenPolicy.h" #include "fhiclcpp/fwd.h" +#include #include #include @@ -18,7 +20,7 @@ namespace art { template - cet::sqlite::Connection* + std::unique_ptr get(std::string const& filename, PolicyArgs&&... policyArgs) { return factory_.make_connection( From f53e3939ccae5580ce9e84379e8357ad55632bcf Mon Sep 17 00:00:00 2001 From: Marc Paterno Date: Wed, 9 Aug 2023 13:17:09 -0500 Subject: [PATCH 03/36] Deal with a full SQLite db --- .../Optional/MemoryTrackerLinux_service.cc | 33 +++++++++++++++---- .../Services/Optional/TimeTracker_service.cc | 22 +++++++++++++ 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/art/Framework/Services/Optional/MemoryTrackerLinux_service.cc b/art/Framework/Services/Optional/MemoryTrackerLinux_service.cc index f56b2ded..6997795a 100644 --- a/art/Framework/Services/Optional/MemoryTrackerLinux_service.cc +++ b/art/Framework/Services/Optional/MemoryTrackerLinux_service.cc @@ -137,6 +137,7 @@ namespace art { void recordPeakUsages_(); void flushTables_(); void summary_(); + bool anyTableFull_() const; LinuxProcMgr procInfo_{}; string const fileName_; @@ -425,17 +426,35 @@ namespace art { mf::LogAbsolute log{"MemoryTracker"}; HorizontalRule const rule{100}; log << '\n' << rule('=') << '\n'; - log << std::left << "MemoryTracker summary (base-10 MB units used)\n\n"; - log << " Peak virtual memory usage (VmPeak) : " << unique_value(rVMax) - << " MB\n" - << " Peak resident set size usage (VmHWM): " << unique_value(rRMax) - << " MB\n"; - if (!(fileName_.empty() || fileName_ == ":memory:")) { - log << " Details saved in: '" << fileName_ << "'\n"; + + if (anyTableFull_()) { + log << "The SQLite database connected to the MemoryTracker exceeded the " + "available resources.\n"; + log << "No memory usage summary is available.\n"; + log << "The database at " << fileName_ + << " will contain an incomplete record of this job's memory usage.\n"; + } else { + log << std::left << "MemoryTracker summary (base-10 MB units used)\n\n"; + log << " Peak virtual memory usage (VmPeak) : " << unique_value(rVMax) + << " MB\n" + << " Peak resident set size usage (VmHWM): " << unique_value(rRMax) + << " MB\n"; + if (!(fileName_.empty() || fileName_ == ":memory:")) { + log << " Details saved in: '" << fileName_ << "'\n"; + } } log << rule('='); } + bool + MemoryTracker::anyTableFull_() const + { + return peakUsageTable_.full() || otherInfoTable_.full() || + eventTable_.full() || moduleTable_.full() || + (eventHeapTable_ && eventHeapTable_->full()) || + (moduleHeapTable_ && moduleHeapTable_->full()); + } + } // namespace art DECLARE_ART_SERVICE(art::MemoryTracker, SHARED) diff --git a/art/Framework/Services/Optional/TimeTracker_service.cc b/art/Framework/Services/Optional/TimeTracker_service.cc index 32ab0c93..13795bc4 100644 --- a/art/Framework/Services/Optional/TimeTracker_service.cc +++ b/art/Framework/Services/Optional/TimeTracker_service.cc @@ -161,6 +161,7 @@ namespace art { void recordTime(ModuleContext const& mc, string const& suffix); void logToDestination_(Statistics const& evt, vector const& modules); + bool anyTableFull_() const; tbb::concurrent_unordered_map Date: Wed, 23 Aug 2023 14:57:37 -0500 Subject: [PATCH 07/36] Adapt to new interface of InputToken and ViewToken --- art/Framework/Principal/ProductRetriever.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/art/Framework/Principal/ProductRetriever.h b/art/Framework/Principal/ProductRetriever.h index d65405ee..cbe5294e 100644 --- a/art/Framework/Principal/ProductRetriever.h +++ b/art/Framework/Principal/ProductRetriever.h @@ -259,7 +259,7 @@ namespace art { Handle ProductRetriever::getHandle(ProductToken const& token) const { - return getHandle(token.inputTag_); + return getHandle(token.inputTag()); } // ========================================================================= @@ -275,7 +275,7 @@ namespace art { ValidHandle ProductRetriever::getValidHandle(ProductToken const& token) const { - return getValidHandle(token.inputTag_); + return getValidHandle(token.inputTag()); } template @@ -358,9 +358,9 @@ namespace art { ProductRetriever::getView(ViewToken const& token, std::vector& result) const { - return getView(token.inputTag_.label(), - token.inputTag_.instance(), - token.inputTag_.process(), + return getView(token.inputTag().label(), + token.inputTag().instance(), + token.inputTag().process(), result); } @@ -410,9 +410,9 @@ namespace art { ProductRetriever::getView(ViewToken const& token, View& result) const { - return getView(token.inputTag_.label(), - token.inputTag_.instance(), - token.inputTag_.process(), + return getView(token.inputTag().label(), + token.inputTag().instance(), + token.inputTag().process(), result); } From 33bd8784b5d7b1e3f28f46415938b99342df29dc Mon Sep 17 00:00:00 2001 From: Marc Paterno Date: Wed, 23 Aug 2023 15:51:40 -0500 Subject: [PATCH 08/36] Simplify implementations for getView taking tokens --- art/Framework/Principal/ProductRetriever.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/art/Framework/Principal/ProductRetriever.h b/art/Framework/Principal/ProductRetriever.h index cbe5294e..1d3f5cb1 100644 --- a/art/Framework/Principal/ProductRetriever.h +++ b/art/Framework/Principal/ProductRetriever.h @@ -358,10 +358,7 @@ namespace art { ProductRetriever::getView(ViewToken const& token, std::vector& result) const { - return getView(token.inputTag().label(), - token.inputTag().instance(), - token.inputTag().process(), - result); + return getView(token.inputTag(), result); } template @@ -410,10 +407,7 @@ namespace art { ProductRetriever::getView(ViewToken const& token, View& result) const { - return getView(token.inputTag().label(), - token.inputTag().instance(), - token.inputTag().process(), - result); + return getView(token.inputTag(), result); } // ======================================================================= From 8b551a150bdad682297c2e6a4a769a3b49a5adc4 Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel Date: Wed, 23 Aug 2023 20:34:03 -0500 Subject: [PATCH 09/36] Apply clang-format. --- art/Framework/Core/TriggerPathsExecutor.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/art/Framework/Core/TriggerPathsExecutor.cc b/art/Framework/Core/TriggerPathsExecutor.cc index 1b055dad..1bee416f 100644 --- a/art/Framework/Core/TriggerPathsExecutor.cc +++ b/art/Framework/Core/TriggerPathsExecutor.cc @@ -232,10 +232,9 @@ namespace art { TDEBUG_END_FUNC_SI(4, scheduleID); return; } - auto pathsDoneTask = - make_waiting_task( - PathsDoneTask{this, endPathTask, event_principal, taskGroup_}, - triggerPathsInfo_.paths().size()); + auto pathsDoneTask = make_waiting_task( + PathsDoneTask{this, endPathTask, event_principal, taskGroup_}, + triggerPathsInfo_.paths().size()); for (auto& path : triggerPathsInfo_.paths()) { // Start each path running. The path will start a spawn chain // going to run each worker in the order specified on the From de2371a67addd8bfe5499644af2ee7df79733d7e Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel Date: Mon, 11 Sep 2023 09:49:52 -0500 Subject: [PATCH 10/36] Remove unnecessary header include. --- art/Framework/Core/PathManager.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/art/Framework/Core/PathManager.cc b/art/Framework/Core/PathManager.cc index 4baad47b..4a14c3dc 100644 --- a/art/Framework/Core/PathManager.cc +++ b/art/Framework/Core/PathManager.cc @@ -2,7 +2,6 @@ // vim: set sw=2 expandtab : #include "art/Framework/Core/ModuleBase.h" -#include "art/Framework/Core/ModuleMacros.h" #include "art/Framework/Core/PathsInfo.h" #include "art/Framework/Core/TriggerResultInserter.h" #include "art/Framework/Core/WorkerInPath.h" From bdcd070babee0906a7c1251ca0a2941d203df2be Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel Date: Thu, 2 Nov 2023 16:07:23 -0500 Subject: [PATCH 11/36] Accommodate mallinfo() deprecation for AL9. --- art/Framework/Services/Optional/detail/LinuxMallInfo.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/art/Framework/Services/Optional/detail/LinuxMallInfo.h b/art/Framework/Services/Optional/detail/LinuxMallInfo.h index 62aae88a..1955de90 100644 --- a/art/Framework/Services/Optional/detail/LinuxMallInfo.h +++ b/art/Framework/Services/Optional/detail/LinuxMallInfo.h @@ -36,7 +36,12 @@ namespace art { class LinuxMallInfo { public: + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + // FIXME: The 'mallinfo()' function is deprecated for AL9. LinuxMallInfo() : minfo_(mallinfo()) {} +#pragma GCC diagnostic pop struct mallinfo get() const From 1cc4e2c5a7c650313fec0093a30ad8a3651cd7cf Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 7 Nov 2023 10:04:54 -0600 Subject: [PATCH 12/36] New issue type: "gripe" --- .github/ISSUE_TEMPLATE/gripe.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/gripe.md diff --git a/.github/ISSUE_TEMPLATE/gripe.md b/.github/ISSUE_TEMPLATE/gripe.md new file mode 100644 index 00000000..a5547418 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/gripe.md @@ -0,0 +1,17 @@ +--- +name: Gripe +about: Describe a bug, problem, or annoyance that doesn't have a simple reproducer +title: '' +labels: + - best effort +assignees: '' + +--- + +**[ If you are able to define a minimal reproducer for the issue, please use a different issue type ]** + +**[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ]** + +**[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ]** + +**Describe your issue in as much detail as possible** From c8025bd6af96a0100410ccf2077655109b03cb44 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 7 Nov 2023 10:13:03 -0600 Subject: [PATCH 13/36] Alternative definition for "gripe" issue type --- .github/ISSUE_TEMPLATE/gripe.md | 17 ----------------- .github/ISSUE_TEMPLATE/gripe.yml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/gripe.md create mode 100644 .github/ISSUE_TEMPLATE/gripe.yml diff --git a/.github/ISSUE_TEMPLATE/gripe.md b/.github/ISSUE_TEMPLATE/gripe.md deleted file mode 100644 index a5547418..00000000 --- a/.github/ISSUE_TEMPLATE/gripe.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Gripe -about: Describe a bug, problem, or annoyance that doesn't have a simple reproducer -title: '' -labels: - - best effort -assignees: '' - ---- - -**[ If you are able to define a minimal reproducer for the issue, please use a different issue type ]** - -**[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ]** - -**[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ]** - -**Describe your issue in as much detail as possible** diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml new file mode 100644 index 00000000..dfcda70d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -0,0 +1,20 @@ +name: Gripe +about: Describe a bug, problem, or annoyance that doesn't have a simple reproducer +labels: ["best effort"] +body: + - type: markdown + attributes: + value: >- + **[ If you are able to define a minimal reproducer for the issue, please use a different issue type ] + + **[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ] + + **[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ] + + - type: textarea + id: gripe-details + attributes: + label: best effort + placeholder: [ describe your issue in as much detail as possible ] + validations: + required: true From 2e6ed14e1a886ebe76675df6347162e2c7eceafc Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 7 Nov 2023 10:21:35 -0600 Subject: [PATCH 14/36] Next attempt --- .github/ISSUE_TEMPLATE/gripe.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index dfcda70d..8fa2584c 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -1,10 +1,11 @@ name: Gripe -about: Describe a bug, problem, or annoyance that doesn't have a simple reproducer +description: Describe a bug, problem, or annoyance that doesn't have a simple reproducer labels: ["best effort"] +title: "[Gripe]: " body: - type: markdown attributes: - value: >- + value: | **[ If you are able to define a minimal reproducer for the issue, please use a different issue type ] **[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ] @@ -14,7 +15,5 @@ body: - type: textarea id: gripe-details attributes: - label: best effort - placeholder: [ describe your issue in as much detail as possible ] - validations: - required: true + label: Details + placeholder: Please describe your issue in as much detail as possible From da506182af0d62a4ab35b07bde07fa6496f65be2 Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:23:26 -0600 Subject: [PATCH 15/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 8fa2584c..6e8cc80a 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -1,16 +1,14 @@ name: Gripe description: Describe a bug, problem, or annoyance that doesn't have a simple reproducer labels: ["best effort"] -title: "[Gripe]: <title>" +title: "[Gripe]: " body: - type: markdown attributes: value: | - **[ If you are able to define a minimal reproducer for the issue, please use a different issue type ] - + ****[ If you are able to define a minimal reproducer for the issue, please use a different issue type ] **[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ] - - **[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ] + **[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ]** - type: textarea id: gripe-details From 95e71f42c5aa4bb36668dfaaa1ea28cd81e7960f Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:24:21 -0600 Subject: [PATCH 16/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 6e8cc80a..0fbf5d15 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -6,9 +6,9 @@ body: - type: markdown attributes: value: | - ****[ If you are able to define a minimal reproducer for the issue, please use a different issue type ] - **[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ] - **[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ]** + ****[ If you are able to define a minimal reproducer for the issue, please use a different issue type ]** + ****[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ]** + ****[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ]** - type: textarea id: gripe-details From d6e95538a67669fd4ac939476d0a9e60f3b19aa6 Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:25:40 -0600 Subject: [PATCH 17/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 0fbf5d15..7d047c4c 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -5,11 +5,10 @@ title: "[Gripe]: " body: - type: markdown attributes: - value: | - ****[ If you are able to define a minimal reproducer for the issue, please use a different issue type ]** - ****[ Gripes will be dealt with on a "best effort" basis only, and cannot be high priority ]** - ****[ Multiple iterations may be necessary to understand your issue well enough to posit a remedy ]** - + value: >- + * ** ** If you are able to define a minimal reproducer for the issue, please use a different issue type.** + * ** ** Gripes will be dealt with on a "best effort" basis only, and cannot be high priority.** + * **** Multiple iterations may be necessary to understand your issue well enough to posit a remedy.** - type: textarea id: gripe-details attributes: From cab69ee9a7f4fa08200fbaa0416214252180d8f9 Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:26:13 -0600 Subject: [PATCH 18/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 7d047c4c..52c38dc9 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -5,10 +5,10 @@ title: "[Gripe]: " body: - type: markdown attributes: - value: >- - * ** ** If you are able to define a minimal reproducer for the issue, please use a different issue type.** - * ** ** Gripes will be dealt with on a "best effort" basis only, and cannot be high priority.** - * **** Multiple iterations may be necessary to understand your issue well enough to posit a remedy.** + value: | + * **** If you are able to define a minimal reproducer for the issue, please use a different issue type.** + * **** Gripes will be dealt with on a "best effort" basis only, and cannot be high priority.** + * ****Multiple iterations may be necessary to understand your issue well enough to posit a remedy.** - type: textarea id: gripe-details attributes: From 8ae9467f0748548855607cddfe5e86bd9d743fca Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:26:51 -0600 Subject: [PATCH 19/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 52c38dc9..7f47740f 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -7,8 +7,11 @@ body: attributes: value: | * **** If you are able to define a minimal reproducer for the issue, please use a different issue type.** + * **** Gripes will be dealt with on a "best effort" basis only, and cannot be high priority.** + * ****Multiple iterations may be necessary to understand your issue well enough to posit a remedy.** + - type: textarea id: gripe-details attributes: From 3507d71ddd233572823b0abfde170c418fc08d5f Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:27:38 -0600 Subject: [PATCH 20/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 7f47740f..976cfdb2 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -6,11 +6,11 @@ body: - type: markdown attributes: value: | - * **** If you are able to define a minimal reproducer for the issue, please use a different issue type.** + * ** If you are able to define a minimal reproducer for the issue, please use a different issue type. - * **** Gripes will be dealt with on a "best effort" basis only, and cannot be high priority.** + * ** Gripes will be dealt with on a "best effort" basis only, and cannot be high priority. - * ****Multiple iterations may be necessary to understand your issue well enough to posit a remedy.** + * **Multiple iterations may be necessary to understand your issue well enough to posit a remedy. - type: textarea id: gripe-details From 89f095d0812275e99eaff1b83ffbdda0d9785bef Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:28:40 -0600 Subject: [PATCH 21/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 976cfdb2..32ae0f5f 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -6,12 +6,9 @@ body: - type: markdown attributes: value: | - * ** If you are able to define a minimal reproducer for the issue, please use a different issue type. - - * ** Gripes will be dealt with on a "best effort" basis only, and cannot be high priority. - - * **Multiple iterations may be necessary to understand your issue well enough to posit a remedy. - + * **If you are able to define a minimal reproducer for the issue, please use a different issue type.** + * **Gripes will be dealt with on a "best effort" basis only, and cannot be high priority.** + * **Multiple iterations may be necessary to understand your issue well enough to posit a remedy.** - type: textarea id: gripe-details attributes: From 7a8924b22ccb253ac7328c4398eda008cf8d6b6e Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Tue, 7 Nov 2023 10:29:42 -0600 Subject: [PATCH 22/36] Formatting tweaks --- .github/ISSUE_TEMPLATE/gripe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/gripe.yml b/.github/ISSUE_TEMPLATE/gripe.yml index 32ae0f5f..ceb3f172 100644 --- a/.github/ISSUE_TEMPLATE/gripe.yml +++ b/.github/ISSUE_TEMPLATE/gripe.yml @@ -13,4 +13,4 @@ body: id: gripe-details attributes: label: Details - placeholder: Please describe your issue in as much detail as possible + placeholder: Please describe your issue in as much detail as possible. From e595940024a7b346161ff944c51a3c2e69b12ced Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Mon, 27 Nov 2023 11:42:56 -0600 Subject: [PATCH 23/36] Reenable RT signals after custom signal handler is installed --- art/Utilities/UnixSignalHandlers.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/art/Utilities/UnixSignalHandlers.cc b/art/Utilities/UnixSignalHandlers.cc index e9fd69ff..4ffba808 100644 --- a/art/Utilities/UnixSignalHandlers.cc +++ b/art/Utilities/UnixSignalHandlers.cc @@ -76,7 +76,7 @@ namespace art { #ifdef __linux__ void - disableRTSigs() + tweakRTSigs_(int how) { sigset_t myset; abort_on_error(sigemptyset(&myset)); @@ -87,7 +87,7 @@ namespace art { abort_on_error(sigaddset(&myset, num)); abort_on_error(sigaction(num, &tmpact, nullptr)); } - abort_on_error(pthread_sigmask(SIG_BLOCK, &myset, 0)); + abort_on_error(pthread_sigmask(how, &myset, 0)); } #endif // __linux__ @@ -105,9 +105,12 @@ namespace art { sigset_t oldset; disableAllSigs(&oldset); #ifdef __linux__ - disableRTSigs(); + tweakRTSigs_(SIG_BLOCK); #endif // __linux__ installSig(signum, func); +#ifdef __linux__ + tweakRTSigs_(SIG_UNBLOCK); +#endif // __linux__ reenableSigs(&oldset); } From cae65dbb70f28fac9aa347aa1c4a7b1e49bee7ba Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Thu, 4 Jan 2024 17:19:38 -0600 Subject: [PATCH 24/36] Cetmodules -> 3.23.01 --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index a986fc9a..757bb62e 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ product version qual flags <table_format=2> canvas v3_16_03 hep_concurrency v1_09_02 catch v3_3_2 - only_for_build -cetmodules v3_22_02 - only_for_build +cetmodules v3_23_01 - only_for_build range v3_0_12_0 - only_for_build end_product_list #################################### From 727ce9e96b66631fd9a22e8a35f9fab7fd8ce6eb Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Fri, 14 Jul 2023 09:28:35 -0500 Subject: [PATCH 25/36] Changes required by improvements to `fhicl::Table` _et al._ --- art/Framework/Core/Modifier.h | 4 ++-- art/Framework/Core/ProducerTable.h | 9 ++------- art/Framework/Core/ResultsProducer.h | 4 ++-- art/Framework/Core/detail/Analyzer.h | 7 ++----- art/Framework/Core/detail/Producer.h | 4 ++-- art/Utilities/ToolConfigTable.h | 7 ++----- 6 files changed, 12 insertions(+), 23 deletions(-) diff --git a/art/Framework/Core/Modifier.h b/art/Framework/Core/Modifier.h index b0e18d9d..4643d556 100644 --- a/art/Framework/Core/Modifier.h +++ b/art/Framework/Core/Modifier.h @@ -15,9 +15,9 @@ namespace art { class Modifier : public ModuleBase, private ProductRegistryHelper { public: - template <typename UserConfig, typename UserKeysToIgnore = void> + template <typename UserConfig, typename... UserKeysToIgnore> using Table = - ProducerTable<UserConfig, detail::ModuleConfig, UserKeysToIgnore>; + ProducerTable<UserConfig, detail::ModuleConfig, UserKeysToIgnore...>; ~Modifier() noexcept; Modifier(); diff --git a/art/Framework/Core/ProducerTable.h b/art/Framework/Core/ProducerTable.h index 2bc8774a..722beac6 100644 --- a/art/Framework/Core/ProducerTable.h +++ b/art/Framework/Core/ProducerTable.h @@ -12,10 +12,9 @@ #include <string> namespace art { - template <typename UserConfig, typename ImplicitConfig, - typename UserKeysToIgnore = void> + typename... UserKeysToIgnore> class ProducerTable : public fhicl::ConfigurationTable { private: // TYPES template <typename T, typename U = ImplicitConfig> @@ -26,11 +25,7 @@ namespace art { fhicl::TableFragment<T> user; }; - using KeysToIgnore_t = std::conditional_t< - std::is_void<UserKeysToIgnore>::value, - typename ImplicitConfig::IgnoreKeys, - fhicl::KeysToIgnore<typename ImplicitConfig::IgnoreKeys, - UserKeysToIgnore>>; + using KeysToIgnore_t = fhicl::KeysToIgnore<typename ImplicitConfig::IgnoreKeys, UserKeysToIgnore...>; public: // MEMBER FUNCTIONS -- Special Member Functions explicit ProducerTable(fhicl::Name&& name) : fullConfig_{std::move(name)} {} diff --git a/art/Framework/Core/ResultsProducer.h b/art/Framework/Core/ResultsProducer.h index 530e2033..85767df8 100644 --- a/art/Framework/Core/ResultsProducer.h +++ b/art/Framework/Core/ResultsProducer.h @@ -98,8 +98,8 @@ namespace art { ResultsProducer() noexcept(false); - template <typename UserConfig, typename KeysToIgnore = void> - using Table = ProducerTable<UserConfig, detail::PluginConfig, KeysToIgnore>; + template <typename UserConfig, typename... KeysToIgnore> + using Table = ProducerTable<UserConfig, detail::PluginConfig, KeysToIgnore...>; void doBeginJob(); void doEndJob(); diff --git a/art/Framework/Core/detail/Analyzer.h b/art/Framework/Core/detail/Analyzer.h index cc572175..2d03d425 100644 --- a/art/Framework/Core/detail/Analyzer.h +++ b/art/Framework/Core/detail/Analyzer.h @@ -33,7 +33,7 @@ namespace art { namespace art::detail { class Analyzer : public Observer { public: - template <typename UserConfig, typename UserKeysToIgnore = void> + template <typename UserConfig, typename... UserKeysToIgnore> class Table : public fhicl::ConfigurationTable { template <typename T> struct FullConfig { @@ -42,10 +42,7 @@ namespace art::detail { fhicl::TableFragment<T> user; }; - using KeysToIgnore_t = std::conditional_t< - std::is_void<UserKeysToIgnore>::value, - ModuleConfig::IgnoreKeys, - fhicl::KeysToIgnore<ModuleConfig::IgnoreKeys, UserKeysToIgnore>>; + using KeysToIgnore_t = fhicl::KeysToIgnore<typename ModuleConfig::IgnoreKeys, UserKeysToIgnore...>; public: explicit Table(fhicl::Name&& name) : fullConfig_{std::move(name)} {} diff --git a/art/Framework/Core/detail/Producer.h b/art/Framework/Core/detail/Producer.h index f66eec3e..11686087 100644 --- a/art/Framework/Core/detail/Producer.h +++ b/art/Framework/Core/detail/Producer.h @@ -22,8 +22,8 @@ namespace art::detail { class Producer : public Modifier { public: - template <typename UserConfig, typename KeysToIgnore = void> - using Table = Modifier::Table<UserConfig, KeysToIgnore>; + template <typename UserConfig, typename... KeysToIgnore> + using Table = Modifier::Table<UserConfig, KeysToIgnore...>; virtual ~Producer() noexcept; explicit Producer(fhicl::ParameterSet const&); diff --git a/art/Utilities/ToolConfigTable.h b/art/Utilities/ToolConfigTable.h index 77f20b5d..b4ab92bf 100644 --- a/art/Utilities/ToolConfigTable.h +++ b/art/Utilities/ToolConfigTable.h @@ -25,7 +25,7 @@ namespace art { }; }; - template <typename UserConfig, typename UserKeysToIgnore = void> + template <typename UserConfig, typename... UserKeysToIgnore> class ToolConfigTable : public fhicl::ConfigurationTable { public: ToolConfigTable(fhicl::Name&& name) : fullConfig_{std::move(name)} {} @@ -56,10 +56,7 @@ namespace art { fhicl::TableFragment<T> user; }; - using KeysToIgnore_t = std::conditional_t< - std::is_void<UserKeysToIgnore>::value, - MinimalToolConfig::KeysToIgnore, - fhicl::KeysToIgnore<MinimalToolConfig::KeysToIgnore, UserKeysToIgnore>>; + using KeysToIgnore_t = fhicl::KeysToIgnore<typename MinimalToolConfig::KeysToIgnore, UserKeysToIgnore...>; fhicl::Table<FullConfig<UserConfig>, KeysToIgnore_t> fullConfig_; cet::exempt_ptr<fhicl::detail::ParameterBase const> From f0b10a8c64f203e37383095115fa0645ddfabd9f Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Sat, 6 Jan 2024 15:10:54 -0600 Subject: [PATCH 26/36] Format with `format-code` --- art/Framework/Core/ProducerTable.h | 4 +++- art/Framework/Core/ResultsProducer.h | 3 ++- art/Framework/Core/detail/Analyzer.h | 4 +++- art/Framework/Services/Optional/detail/LinuxMallInfo.h | 1 - art/Utilities/ToolConfigTable.h | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/art/Framework/Core/ProducerTable.h b/art/Framework/Core/ProducerTable.h index 722beac6..a69fdbc5 100644 --- a/art/Framework/Core/ProducerTable.h +++ b/art/Framework/Core/ProducerTable.h @@ -25,7 +25,9 @@ namespace art { fhicl::TableFragment<T> user; }; - using KeysToIgnore_t = fhicl::KeysToIgnore<typename ImplicitConfig::IgnoreKeys, UserKeysToIgnore...>; + using KeysToIgnore_t = + fhicl::KeysToIgnore<typename ImplicitConfig::IgnoreKeys, + UserKeysToIgnore...>; public: // MEMBER FUNCTIONS -- Special Member Functions explicit ProducerTable(fhicl::Name&& name) : fullConfig_{std::move(name)} {} diff --git a/art/Framework/Core/ResultsProducer.h b/art/Framework/Core/ResultsProducer.h index 85767df8..e5e1384c 100644 --- a/art/Framework/Core/ResultsProducer.h +++ b/art/Framework/Core/ResultsProducer.h @@ -99,7 +99,8 @@ namespace art { ResultsProducer() noexcept(false); template <typename UserConfig, typename... KeysToIgnore> - using Table = ProducerTable<UserConfig, detail::PluginConfig, KeysToIgnore...>; + using Table = + ProducerTable<UserConfig, detail::PluginConfig, KeysToIgnore...>; void doBeginJob(); void doEndJob(); diff --git a/art/Framework/Core/detail/Analyzer.h b/art/Framework/Core/detail/Analyzer.h index 2d03d425..b9e25ef2 100644 --- a/art/Framework/Core/detail/Analyzer.h +++ b/art/Framework/Core/detail/Analyzer.h @@ -42,7 +42,9 @@ namespace art::detail { fhicl::TableFragment<T> user; }; - using KeysToIgnore_t = fhicl::KeysToIgnore<typename ModuleConfig::IgnoreKeys, UserKeysToIgnore...>; + using KeysToIgnore_t = + fhicl::KeysToIgnore<typename ModuleConfig::IgnoreKeys, + UserKeysToIgnore...>; public: explicit Table(fhicl::Name&& name) : fullConfig_{std::move(name)} {} diff --git a/art/Framework/Services/Optional/detail/LinuxMallInfo.h b/art/Framework/Services/Optional/detail/LinuxMallInfo.h index 1955de90..eb1d35e9 100644 --- a/art/Framework/Services/Optional/detail/LinuxMallInfo.h +++ b/art/Framework/Services/Optional/detail/LinuxMallInfo.h @@ -36,7 +36,6 @@ namespace art { class LinuxMallInfo { public: - #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" // FIXME: The 'mallinfo()' function is deprecated for AL9. diff --git a/art/Utilities/ToolConfigTable.h b/art/Utilities/ToolConfigTable.h index b4ab92bf..e0a96b1a 100644 --- a/art/Utilities/ToolConfigTable.h +++ b/art/Utilities/ToolConfigTable.h @@ -56,7 +56,9 @@ namespace art { fhicl::TableFragment<T> user; }; - using KeysToIgnore_t = fhicl::KeysToIgnore<typename MinimalToolConfig::KeysToIgnore, UserKeysToIgnore...>; + using KeysToIgnore_t = + fhicl::KeysToIgnore<typename MinimalToolConfig::KeysToIgnore, + UserKeysToIgnore...>; fhicl::Table<FullConfig<UserConfig>, KeysToIgnore_t> fullConfig_; cet::exempt_ptr<fhicl::detail::ParameterBase const> From 22cf3cf78fb829eb74ef9f6e339b712635cef394 Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel <knoepfel@fnal.gov> Date: Thu, 2 Nov 2023 11:00:56 -0500 Subject: [PATCH 27/36] Use cet_transitive_paths to setup CET_PLUGIN_PATH --- art/test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/art/test/CMakeLists.txt b/art/test/CMakeLists.txt index 114c73a9..b5449731 100644 --- a/art/test/CMakeLists.txt +++ b/art/test/CMakeLists.txt @@ -2,6 +2,9 @@ include(CetTest) cet_enable_asserts() cet_test_env("FHICL_FILE_PATH=.") +cet_transitive_paths(LIBRARY_DIR BINARY IN_TREE) +cet_test_env_prepend(CET_PLUGIN_PATH ${TRANSITIVE_PATHS_WITH_LIBRARY_DIR}) + find_package(Boost COMPONENTS filesystem graph REQUIRED) find_package(Catch2 REQUIRED) find_package(canvas REQUIRED EXPORT) From f0f2ad26c763fd582988dfed49d936ff38efb08d Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel <knoepfel@fnal.gov> Date: Thu, 8 Feb 2024 16:14:53 -0600 Subject: [PATCH 28/36] Add missing CMake include --- Modules/ArtMake.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/ArtMake.cmake b/Modules/ArtMake.cmake index ed73e187..51992e03 100644 --- a/Modules/ArtMake.cmake +++ b/Modules/ArtMake.cmake @@ -110,6 +110,7 @@ cmake_minimum_required(VERSION 3.14 FATAL_ERROR) include(BuildPlugins) include(CetMake) +include(CetMakeCommand) include(Compatibility) include(CetTest) From 45ead1cb17758ef310ed6c3145ce607867863a64 Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Wed, 14 Feb 2024 10:38:51 -0600 Subject: [PATCH 29/36] Cetmodules -> 3.24.00 --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 757bb62e..1faec43c 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ product version qual flags <table_format=2> canvas v3_16_03 hep_concurrency v1_09_02 catch v3_3_2 - only_for_build -cetmodules v3_23_01 - only_for_build +cetmodules v3_24_00 - only_for_build range v3_0_12_0 - only_for_build end_product_list #################################### From 7a2dc708cd0938d69b48d142ae0f0d259a2018e5 Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Thu, 15 Feb 2024 10:51:53 -0600 Subject: [PATCH 30/36] Minor sync with `Cetmodules/Modules/art/compat/` --- Modules/ArtMake.cmake | 4 ++-- Modules/BuildPlugins.cmake | 4 ++-- Modules/art::module.cmake | 4 ++-- Modules/art::plugin.cmake | 4 ++-- Modules/art::service.cmake | 4 ++-- Modules/art::source.cmake | 4 ++-- Modules/art::tool.cmake | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Modules/ArtMake.cmake b/Modules/ArtMake.cmake index 51992e03..1b0a1823 100644 --- a/Modules/ArtMake.cmake +++ b/Modules/ArtMake.cmake @@ -1,7 +1,7 @@ ### MIGRATE-NO-ACTION #[================================================================[.rst: X -= +- #]================================================================] # art_make # @@ -106,7 +106,7 @@ X include_guard() -cmake_minimum_required(VERSION 3.14 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14...3.27 FATAL_ERROR) include(BuildPlugins) include(CetMake) diff --git a/Modules/BuildPlugins.cmake b/Modules/BuildPlugins.cmake index ce045700..f9d029b1 100644 --- a/Modules/BuildPlugins.cmake +++ b/Modules/BuildPlugins.cmake @@ -1,6 +1,6 @@ #[================================================================[.rst: X -= +- #]================================================================] # macros for building plugin libraries # @@ -26,7 +26,7 @@ X ######################################################################## include_guard() -cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.18.2...3.27 FATAL_ERROR) include(BasicPlugin) diff --git a/Modules/art::module.cmake b/Modules/art::module.cmake index 6a3b7e2c..57d1038a 100644 --- a/Modules/art::module.cmake +++ b/Modules/art::module.cmake @@ -1,10 +1,10 @@ #[================================================================[.rst: X -= +- #]================================================================] include_guard() -cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.18.2...3.27 FATAL_ERROR) include(BasicPlugin) diff --git a/Modules/art::plugin.cmake b/Modules/art::plugin.cmake index b56908da..1620c2be 100644 --- a/Modules/art::plugin.cmake +++ b/Modules/art::plugin.cmake @@ -1,10 +1,10 @@ #[================================================================[.rst: X -= +- #]================================================================] include_guard() -cmake_minimum_required(VERSION 3.18.2...3.22 FATAL_ERROR) +cmake_minimum_required(VERSION 3.18.2...3.27 FATAL_ERROR) include(BasicPlugin) diff --git a/Modules/art::service.cmake b/Modules/art::service.cmake index 0944639c..f2357bef 100644 --- a/Modules/art::service.cmake +++ b/Modules/art::service.cmake @@ -1,10 +1,10 @@ #[================================================================[.rst: X -= +- #]================================================================] include_guard() -cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.18.2...3.27 FATAL_ERROR) include(BasicPlugin) diff --git a/Modules/art::source.cmake b/Modules/art::source.cmake index 50a9c433..55a09f47 100644 --- a/Modules/art::source.cmake +++ b/Modules/art::source.cmake @@ -1,10 +1,10 @@ #[================================================================[.rst: X -= +- #]================================================================] include_guard() -cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.18.2...3.27 FATAL_ERROR) include(BasicPlugin) diff --git a/Modules/art::tool.cmake b/Modules/art::tool.cmake index 96fa7b96..eb0f6649 100644 --- a/Modules/art::tool.cmake +++ b/Modules/art::tool.cmake @@ -1,10 +1,10 @@ #[================================================================[.rst: X -= +- #]================================================================] include_guard() -cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.18.2...3.27 FATAL_ERROR) include(BasicPlugin) From 1fdf019c5fdb97670f4b6c0e15e75b3f895e7b9a Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Thu, 15 Feb 2024 11:03:02 -0600 Subject: [PATCH 31/36] Cetmodules -> 3.24.01 --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 1faec43c..23f3132d 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ product version qual flags <table_format=2> canvas v3_16_03 hep_concurrency v1_09_02 catch v3_3_2 - only_for_build -cetmodules v3_24_00 - only_for_build +cetmodules v3_24_01 - only_for_build range v3_0_12_0 - only_for_build end_product_list #################################### From 21a125ee25dc82e7db052111f733709e86532852 Mon Sep 17 00:00:00 2001 From: Chris Green <greenc@fnal.gov> Date: Mon, 22 Apr 2024 14:27:45 -0500 Subject: [PATCH 32/36] Cetmodules -> 3.25.00 --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index 2fd2be22..7c4ffc12 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -251,7 +251,7 @@ product version qual flags <table_format=2> canvas v3_16_04 hep_concurrency v1_09_02 catch v3_3_2 - only_for_build -cetmodules v3_24_01 - only_for_build +cetmodules v3_25_00 - only_for_build range v3_0_12_0 - only_for_build end_product_list #################################### From 9a405d1cdfd5e2ed170e5a25f6b61e82b328c48e Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel <knoepfel@fnal.gov> Date: Mon, 22 Apr 2024 14:37:20 -0500 Subject: [PATCH 33/36] Implement random offset for product mixing. --- art/Framework/IO/ProductMix/MixHelper.cc | 65 ++++++++++++++++++------ art/Framework/IO/ProductMix/MixHelper.h | 9 +++- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/art/Framework/IO/ProductMix/MixHelper.cc b/art/Framework/IO/ProductMix/MixHelper.cc index e701525f..6d5f2639 100644 --- a/art/Framework/IO/ProductMix/MixHelper.cc +++ b/art/Framework/IO/ProductMix/MixHelper.cc @@ -131,14 +131,14 @@ art::operator<<(std::ostream& os, MixHelper::Mode const mode) switch (mode) { case MixHelper::Mode::SEQUENTIAL: return os << "SEQUENTIAL"; + case MixHelper::Mode::RANDOM_OFFSET: + return os << "RANDOM_OFFSET"; case MixHelper::Mode::RANDOM_REPLACE: return os << "RANDOM_REPLACE"; case MixHelper::Mode::RANDOM_LIM_REPLACE: return os << "RANDOM_LIM_REPLACE"; case MixHelper::Mode::RANDOM_NO_REPLACE: return os << "RANDOM_NO_REPLACE"; - case MixHelper::Mode::UNKNOWN: - return os << "UNKNOWN"; // No default so compiler can warn. } return os; @@ -189,6 +189,27 @@ art::MixHelper::createEngine(seed_t const seed, seed, kind_of_engine_to_make, engine_label); } +bool +art::MixHelper::overThreshold_(size_t const nSecondaries, + size_t const nEventsInFile) const +{ + switch (readMode_) { + case Mode::SEQUENTIAL: + [[fallthrough]]; + case Mode::RANDOM_OFFSET: + [[fallthrough]]; + case Mode::RANDOM_NO_REPLACE: + return nEventsReadThisFile_ + nSecondaries > nEventsInFile; + case Mode::RANDOM_REPLACE: + [[fallthrough]]; + case Mode::RANDOM_LIM_REPLACE: + return nEventsReadThisFile_ + nSecondaries > + nEventsInFile * coverageFraction_; + } + assert(false); // unreachable + return false; +} + bool art::MixHelper::generateEventSequence(size_t const nSecondaries, EntryNumberSequence& enSeq, @@ -201,12 +222,7 @@ art::MixHelper::generateEventSequence(size_t const nSecondaries, } auto const nEventsInFile = ioHandle_->nEventsInFile(); - bool const over_threshold = - (readMode_ == Mode::SEQUENTIAL || readMode_ == Mode::RANDOM_NO_REPLACE) ? - ((nEventsReadThisFile_ + nSecondaries) > nEventsInFile) : - ((nEventsReadThisFile_ + nSecondaries) > - (nEventsInFile * coverageFraction_)); - if (over_threshold) { + if (overThreshold_(nSecondaries, nEventsInFile)) { if (!providerFunc_) { ++nOpensOverThreshold_; if (nOpensOverThreshold_ > filenames_.size()) { @@ -215,11 +231,13 @@ art::MixHelper::generateEventSequence(size_t const nSecondaries, "the current event.\n"} << "The number of requested secondaries (" << nSecondaries << ") exceeds the number of events in any\n" - << "of the files specified for product mixing. For a read mode of '" + << "of the files specified for product mixing. For a read mode of " + "'" << readMode_ << "',\n" << "the framework does not currently allow product-mixing to span " "multiple secondary\n" - << "input files for a given event. Please contact artists@fnal.gov " + << "input files for a given event. Please contact " + "artists@fnal.gov " "for more information.\n"; } } @@ -233,13 +251,15 @@ art::MixHelper::generateEventSequence(size_t const nSecondaries, nOpensOverThreshold_ = {}; switch (readMode_) { case Mode::SEQUENTIAL: + [[fallthrough]]; + case Mode::RANDOM_OFFSET: enSeq.resize(nSecondaries); std::iota(begin(enSeq), end(enSeq), nEventsReadThisFile_); break; case Mode::RANDOM_REPLACE: std::generate_n( std::back_inserter(enSeq), nSecondaries, [this, nEventsInFile] { - return dist_.get()->fireInt(nEventsInFile); + return dist_->fireInt(nEventsInFile); }); std::sort(enSeq.begin(), enSeq.end()); break; @@ -250,7 +270,7 @@ art::MixHelper::generateEventSequence(size_t const nSecondaries, std::generate_n( std::inserter(entries, entries.begin()), nSecondaries - entries.size(), - [this, nEventsInFile] { return dist_.get()->fireInt(nEventsInFile); }); + [this, nEventsInFile] { return dist_->fireInt(nEventsInFile); }); } enSeq.assign(cbegin(entries), cend(entries)); std::sort(begin(enSeq), end(enSeq)); @@ -367,8 +387,9 @@ art::MixHelper::initReadMode_(std::string const& mode) const -> Mode { // These regexes must correspond by index to the valid Mode enumerator // values. - static std::regex const robjs[4]{ + static std::regex const robjs[5]{ std::regex("^seq", std::regex_constants::icase), + std::regex("^randomoffset$", std::regex_constants::icase), std::regex("^random(replace)?$", std::regex_constants::icase), std::regex("^randomlimreplace$", std::regex_constants::icase), std::regex("^randomnoreplace$", std::regex_constants::icase)}; @@ -384,11 +405,25 @@ art::MixHelper::initReadMode_(std::string const& mode) const -> Mode << "Unrecognized value of readMode parameter: \"" << mode << "\". Valid values are:\n" << " sequential,\n" + << " randomOffset,\n" << " randomReplace (random is accepted for reasons of legacy),\n" << " randomLimReplace,\n" << " randomNoReplace.\n"; } +size_t +art::MixHelper::eventOffset_(size_t nEventsInFile) +{ + if (readMode_ == Mode::SEQUENTIAL && eventsToSkip_) { + return eventsToSkip_(); + } + if (readMode_ == Mode::RANDOM_OFFSET and not randomOffsetUsed_) { + randomOffsetUsed_ = true; + return dist_->fireInt(nEventsInFile); + } + return 0; +} + bool art::MixHelper::openNextFile_() { @@ -416,10 +451,8 @@ art::MixHelper::openNextFile_() } filename = *fileIter_; } - nEventsReadThisFile_ = (readMode_ == Mode::SEQUENTIAL && eventsToSkip_) ? - eventsToSkip_() : - 0; // Reset for this file. ioHandle_->openAndReadMetaData(filename, mixOps_); + nEventsReadThisFile_ = eventOffset_(ioHandle_->nEventsInFile()); eventIDIndex_ = buildEventIDIndex(ioHandle_->fileIndex()); auto transMap = buildProductIDTransMap(mixOps_); diff --git a/art/Framework/IO/ProductMix/MixHelper.h b/art/Framework/IO/ProductMix/MixHelper.h index aaaddf13..083529da 100644 --- a/art/Framework/IO/ProductMix/MixHelper.h +++ b/art/Framework/IO/ProductMix/MixHelper.h @@ -26,6 +26,8 @@ // are: // // sequential -- read the secondary events in order +// randomOffset -- sequential but starting from a random location +// in the file // randomReplace -- random with replacement // randomLimReplace -- events unique within a primary event // randomNoReplace -- events guaranteed to be used once only. @@ -248,10 +250,10 @@ namespace art { public: enum class Mode { SEQUENTIAL = 0, + RANDOM_OFFSET, RANDOM_REPLACE, RANDOM_LIM_REPLACE, - RANDOM_NO_REPLACE, - UNKNOWN + RANDOM_NO_REPLACE }; struct Config { @@ -386,7 +388,9 @@ namespace art { cet::exempt_ptr<base_engine_t> engine) const; bool consistentRequest_(std::string const& kind_of_engine_to_make, label_t const& engine_label) const; + bool overThreshold_(size_t nSecondaries, size_t nEventsInFile) const; Mode initReadMode_(std::string const& mode) const; + size_t eventOffset_(size_t nEventsInFile); bool openNextFile_(); ProdToProdMapBuilder::ProductIDTransMap buildProductIDTransMap_( @@ -413,6 +417,7 @@ namespace art { EntryNumberSequence shuffledSequence_{}; // RANDOM_NO_REPLACE only. bool haveSubRunMixOps_{false}; bool haveRunMixOps_{false}; + bool randomOffsetUsed_{false}; // RANDOM_OFFSET only. EventIDIndex eventIDIndex_{}; std::unique_ptr<MixIOPolicy> ioHandle_{nullptr}; From 5b500a6a3da02ea31220de988066822aac804ff9 Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel <knoepfel@fnal.gov> Date: Wed, 24 Apr 2024 12:01:45 -0500 Subject: [PATCH 34/36] Add description for MixHelper readMode parameter --- art/Framework/IO/ProductMix/MixHelper.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/art/Framework/IO/ProductMix/MixHelper.h b/art/Framework/IO/ProductMix/MixHelper.h index 083529da..bd948d4a 100644 --- a/art/Framework/IO/ProductMix/MixHelper.h +++ b/art/Framework/IO/ProductMix/MixHelper.h @@ -261,7 +261,23 @@ namespace art { fhicl::Atom<bool> compactMissingProducts{ fhicl::Name{"compactMissingProducts"}, false}; - fhicl::Atom<std::string> readMode{fhicl::Name{"readMode"}, "sequential"}; + fhicl::Atom<std::string> readMode{ + fhicl::Name{"readMode"}, + fhicl::Comment{R"(The readMode parameter specifies how secondary events +should be chosen from each file. Valid values are: + + - "sequential" (default) + read the secondary events in order + - "randomOffset" + sequential but starting from a random location in the file + - "randomReplace" + random with replacement + - "randomLimReplace" + events unique within a primary event + - "randomNoReplace" + events guaranteed to be used once only +)"}, + "sequential"}; fhicl::Atom<double> coverageFraction{fhicl::Name{"coverageFraction"}, 1.0}; fhicl::Atom<bool> wrapFiles{fhicl::Name{"wrapFiles"}, false}; From ca9f56fdd5bfba9c0cb909905c2859df34564674 Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel <knoepfel@fnal.gov> Date: Thu, 25 Apr 2024 11:45:56 -0500 Subject: [PATCH 35/36] C++20 only with e28 --- ups/product_deps | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ups/product_deps b/ups/product_deps index 7c4ffc12..fa4aba8b 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -87,7 +87,7 @@ #> define_pythonpath #################################### parent art -defaultqual e20 +defaultqual e28 #################################### #################################### @@ -308,16 +308,6 @@ end_product_list # #################################### qualifier catch hep_concurrency canvas notes -c14:debug c14 c14:debug c14:debug -c14:prof c14 c14:prof c14:prof -c15:debug c15 c15:debug c15:debug -c15:prof c15 c15:prof c15:prof -e20:debug e20 e20:debug e20:debug -e20:prof e20 e20:prof e20:prof -e26:debug e26 e26:debug e26:debug -e26:prof e26 e26:prof e26:prof -e27:debug e27 e27:debug e27:debug -e27:prof e27 e27:prof e27:prof e28:debug e28 e28:debug e28:debug e28:prof e28 e28:prof e28:prof end_qualifier_list From b1ec60e4e429026b5203a5f22a631c00bc640dbb Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel <knoepfel@fnal.gov> Date: Thu, 25 Apr 2024 12:07:49 -0500 Subject: [PATCH 36/36] Bump version for release. --- CMakeLists.txt | 2 +- ups/product_deps | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b14de653..94f41442 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.19 FATAL_ERROR) find_package(cetmodules 2.13.00 REQUIRED) -project(art VERSION 3.14.04 LANGUAGES CXX C) +project(art VERSION 3.15.00 LANGUAGES CXX C) include(CetCMakeEnv) cet_cmake_env() diff --git a/ups/product_deps b/ups/product_deps index fa4aba8b..e07140f9 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -248,8 +248,8 @@ perllib product_dir # #################################### product version qual flags <table_format=2> -canvas v3_16_04 -hep_concurrency v1_09_02 +canvas v3_17_00 +hep_concurrency v1_10_00 catch v3_3_2 - only_for_build cetmodules v3_25_00 - only_for_build range v3_0_12_0 - only_for_build