From a7ef862c9ff0b47e0a9c238e6dc6ccd8cd127352 Mon Sep 17 00:00:00 2001 From: Kate Richardson Date: Mon, 25 Jul 2022 19:26:41 +0200 Subject: [PATCH 1/3] remove RateVsTime histograms --- device/selections/Hlt1/include/GatherSelections.cuh | 1 - device/selections/Hlt1/src/GatherSelections.cpp | 10 ---------- stream/sequence/include/Constants.cuh | 5 ----- stream/sequence/src/Constants.cpp | 2 -- 4 files changed, 18 deletions(-) diff --git a/device/selections/Hlt1/include/GatherSelections.cuh b/device/selections/Hlt1/include/GatherSelections.cuh index 78e41d460dd..2bdfe8cda52 100644 --- a/device/selections/Hlt1/include/GatherSelections.cuh +++ b/device/selections/Hlt1/include/GatherSelections.cuh @@ -96,7 +96,6 @@ namespace gather_selections { mutable std::vector>> m_rate_counters; void* histogram_line_passes; void* histogram_line_rates; - std::vector histograms_rates_vs_time; #endif }; } // namespace gather_selections diff --git a/device/selections/Hlt1/src/GatherSelections.cpp b/device/selections/Hlt1/src/GatherSelections.cpp index 4254016bfd9..e8dec2cb722 100644 --- a/device/selections/Hlt1/src/GatherSelections.cpp +++ b/device/selections/Hlt1/src/GatherSelections.cpp @@ -27,11 +27,8 @@ void gather_selections::gather_selections_t::init_monitor() while (std::getline(is, line_name, ',')) { const std::string pass_counter_name {line_name + "Pass"}; const std::string rate_counter_name {line_name + "Rate"}; - const std::string rate_hist_name {line_name + "RateVsTime"}; m_pass_counters.push_back(std::make_unique>(this, pass_counter_name)); m_rate_counters.push_back(std::make_unique>(this, rate_counter_name)); - histograms_rates_vs_time.emplace_back((void*) new gaudi_histo_t<1>( - this, rate_hist_name, rate_hist_name, Gaudi::Accumulators::Axis {100, 0, 1000.})); line_labels.push_back(line_name); } unsigned int n_lines = line_labels.size(); @@ -70,20 +67,13 @@ void gather_selections::gather_selections_t::monitor_postscaled_operator( { auto* histogram_line_rates_p = reinterpret_cast*>(histogram_line_rates); auto hist_buf = histogram_line_rates_p->buffer(); - auto time_bin = (std::chrono::duration_cast>( - std::chrono::high_resolution_clock::now() - constants.histogram_time_epoch)) - .count() / - 10.f; // Fill postscaled counters and histograms for (auto j = 0u; j < first(arguments); ++j) { auto buf = m_rate_counters[j]->buffer(); - auto* histograms_rates_vs_time_p = reinterpret_cast*>(histograms_rates_vs_time[j]); - auto buf_time = histograms_rates_vs_time_p->buffer(); for (auto i = 0u; i < first(arguments); ++i) { if (postscaled_decisions[i * first(arguments) + j]) { ++buf; ++hist_buf[j]; - ++buf_time[time_bin]; } } } diff --git a/stream/sequence/include/Constants.cuh b/stream/sequence/include/Constants.cuh index 263f71c9ac4..e4e30e5fd9a 100644 --- a/stream/sequence/include/Constants.cuh +++ b/stream/sequence/include/Constants.cuh @@ -124,9 +124,6 @@ struct Constants { // Kalman filter ParKalmanFilter::KalmanParametrizations* dev_kalman_params = nullptr; - // Monitoring - std::chrono::high_resolution_clock::time_point histogram_time_epoch; - /** * @brief Reserves and initializes constants. */ @@ -172,6 +169,4 @@ struct Constants { const std::vector& monotone_constraints, float nominal_cut, float lambda); - - void initialize_histogram_time_epoch() { histogram_time_epoch = std::chrono::high_resolution_clock::now(); } }; diff --git a/stream/sequence/src/Constants.cpp b/stream/sequence/src/Constants.cpp index fcf37438547..7ab015cca9f 100644 --- a/stream/sequence/src/Constants.cpp +++ b/stream/sequence/src/Constants.cpp @@ -74,8 +74,6 @@ void Constants::initialize_constants( &host_muonmatch_search_windows, sizeof(MatchUpstreamMuon::SearchWindows), Allen::memcpyHostToDevice); - - initialize_histogram_time_epoch(); } void Constants::initialize_muon_catboost_model_constants( -- GitLab From bdd3f7280dcb44c386f326f89f38a08817b1671c Mon Sep 17 00:00:00 2001 From: Kate Richardson Date: Tue, 26 Jul 2022 19:05:17 +0200 Subject: [PATCH 2/3] get rid of unused parameter warning --- device/selections/Hlt1/include/GatherSelections.cuh | 2 +- device/selections/Hlt1/src/GatherSelections.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device/selections/Hlt1/include/GatherSelections.cuh b/device/selections/Hlt1/include/GatherSelections.cuh index 2bdfe8cda52..c274345764b 100644 --- a/device/selections/Hlt1/include/GatherSelections.cuh +++ b/device/selections/Hlt1/include/GatherSelections.cuh @@ -88,7 +88,7 @@ namespace gather_selections { void monitor_postscaled_operator( const ArgumentReferences& arguments, - const Constants& constants, + const Constants&, gsl::span) const; private: diff --git a/device/selections/Hlt1/src/GatherSelections.cpp b/device/selections/Hlt1/src/GatherSelections.cpp index e8dec2cb722..3fc41161905 100644 --- a/device/selections/Hlt1/src/GatherSelections.cpp +++ b/device/selections/Hlt1/src/GatherSelections.cpp @@ -62,7 +62,7 @@ void gather_selections::gather_selections_t::monitor_operator( void gather_selections::gather_selections_t::monitor_postscaled_operator( const ArgumentReferences& arguments, - const Constants& constants, + const Constants&, gsl::span postscaled_decisions) const { auto* histogram_line_rates_p = reinterpret_cast*>(histogram_line_rates); -- GitLab From 7ab8f65a667e5ffb0a295304bf3203ed50e3884c Mon Sep 17 00:00:00 2001 From: Gitlab CI Date: Tue, 26 Jul 2022 17:06:24 +0000 Subject: [PATCH 3/3] Fixed formatting patch generated by https://gitlab.cern.ch/lhcb/Allen/-/jobs/23557832 --- device/selections/Hlt1/include/GatherSelections.cuh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/device/selections/Hlt1/include/GatherSelections.cuh b/device/selections/Hlt1/include/GatherSelections.cuh index c274345764b..489fd64ee9e 100644 --- a/device/selections/Hlt1/include/GatherSelections.cuh +++ b/device/selections/Hlt1/include/GatherSelections.cuh @@ -86,10 +86,8 @@ namespace gather_selections { void monitor_operator(const ArgumentReferences& arguments, gsl::span) const; - void monitor_postscaled_operator( - const ArgumentReferences& arguments, - const Constants&, - gsl::span) const; + void monitor_postscaled_operator(const ArgumentReferences& arguments, const Constants&, gsl::span) + const; private: mutable std::vector>> m_pass_counters; -- GitLab