From 5d45d8926947cbc3a1a48e9444b3096af0eae061 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Fri, 11 Mar 2022 15:39:24 +0100 Subject: [PATCH] feat: Remove --max-run-time option BREAKING CHANGE: was introduced in 1.4.0 release but appears unused --- docs/Configuration.md | 1 - fairmq/Device.cxx | 9 +-------- fairmq/Device.h | 3 +-- fairmq/plugins/config/Config.cxx | 3 +-- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index e2e0bf2f..3346ef3d 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -26,7 +26,6 @@ Here is an overview of the device/channel options and when they are applied: | `transport` | at the end of `fair::mq::State::InitializingDevice` | | `network-interface` | at the end of `fair::mq::State::InitializingDevice` | | `init-timeout` | at the end of `fair::mq::State::InitializingDevice` | -| `max-run-time` | at the end of `fair::mq::State::InitializingDevice` | | `shm-segment-size` | at the end of `fair::mq::State::InitializingDevice` | | `shm-monitor` | at the end of `fair::mq::State::InitializingDevice` | | `ofi-size-hint` | at the end of `fair::mq::State::InitializingDevice` | diff --git a/fairmq/Device.cxx b/fairmq/Device.cxx index d9961ed9..1ce5ed1c 100644 --- a/fairmq/Device.cxx +++ b/fairmq/Device.cxx @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (C) 2012-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * + * Copyright (C) 2012-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * * * This software is distributed under the terms of the * * GNU Lesser General Public Licence (LGPL) version 3, * @@ -27,7 +27,6 @@ constexpr const char* Device::DefaultTransportName; constexpr mq::Transport Device::DefaultTransportType; constexpr const char* Device::DefaultNetworkInterface; constexpr int Device::DefaultInitTimeout; -constexpr uint64_t Device::DefaultMaxRunTime; constexpr float Device::DefaultRate; constexpr const char* Device::DefaultSession; @@ -83,7 +82,6 @@ Device::Device(ProgOptions* config, tools::Version version) , fMultitransportProceed(false) , fVersion(version) , fRate(DefaultRate) - , fMaxRunRuntimeInS(DefaultMaxRunTime) , fInitializationTimeoutInS(DefaultInitTimeout) , fTransitioning(false) { @@ -215,7 +213,6 @@ void Device::InitWrapper() Init(); fRate = fConfig->GetProperty("rate", DefaultRate); - fMaxRunRuntimeInS = fConfig->GetProperty("max-run-time", DefaultMaxRunTime); fInitializationTimeoutInS = fConfig->GetProperty("init-timeout", DefaultInitTimeout); try { @@ -710,7 +707,6 @@ void Device::LogSocketRates() chrono::time_point t0(chrono::high_resolution_clock::now()); chrono::time_point t1; - uint64_t secondsElapsed = 0; while (!NewStatePending()) { WaitFor(chrono::seconds(1)); @@ -753,9 +749,6 @@ void Device::LogSocketRates() } t0 = t1; - if (fMaxRunRuntimeInS > 0 && ++secondsElapsed >= fMaxRunRuntimeInS) { - ChangeState(Transition::Stop); - } } } diff --git a/fairmq/Device.h b/fairmq/Device.h index 933fc0c2..da4342c1 100644 --- a/fairmq/Device.h +++ b/fairmq/Device.h @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * + * Copyright (C) 2021-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * * * This software is distributed under the terms of the * * GNU Lesser General Public Licence (LGPL) version 3, * @@ -565,7 +565,6 @@ class Device static constexpr mq::Transport DefaultTransportType = mq::Transport::ZMQ; static constexpr const char* DefaultNetworkInterface = "default"; static constexpr int DefaultInitTimeout = 120; - static constexpr uint64_t DefaultMaxRunTime = 0; static constexpr float DefaultRate = 0.; static constexpr const char* DefaultSession = "default"; diff --git a/fairmq/plugins/config/Config.cxx b/fairmq/plugins/config/Config.cxx index c68c09cb..0be70730 100644 --- a/fairmq/plugins/config/Config.cxx +++ b/fairmq/plugins/config/Config.cxx @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (C) 2017-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * + * Copyright (C) 2017-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * * * This software is distributed under the terms of the * * GNU Lesser General Public Licence (LGPL) version 3, * @@ -62,7 +62,6 @@ Plugin::ProgOptions ConfigPluginProgramOptions() ("transport", po::value()->default_value("zeromq"), "Transport ('zeromq'/'shmem').") ("network-interface", po::value()->default_value("default"), "Network interface to bind on (e.g. eth0, ib0..., default will try to detect the interface of the default route).") ("init-timeout", po::value()->default_value(120), "Timeout for the initialization in seconds (when expecting dynamic initialization).") - ("max-run-time", po::value()->default_value(0), "Maximum runtime for the Running state handler, after which state will change to Ready (in seconds, 0 for no limit).") ("print-channels", po::value()->implicit_value(true), "Print registered channel endpoints in a machine-readable format (::)") ("shm-segment-size", po::value()->default_value(2ULL << 30), "Shared memory: size of the shared memory segment (in bytes).") ("shm-allocation", po::value()->default_value("rbtree_best_fit"), "Shared memory allocation algorithm: rbtree_best_fit/simple_seq_fit.")