From 876226d6baac6401597cd2ee13fdb8638489b929 Mon Sep 17 00:00:00 2001 From: Norbert Podhorszki Date: Wed, 29 Jul 2020 09:29:46 -0400 Subject: [PATCH] Use BeginStepPollingFrequencySecs in Open for polling time instead of calculating from OpenTimeoutSecs --- source/adios2/engine/bp4/BP4Reader.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/source/adios2/engine/bp4/BP4Reader.cpp b/source/adios2/engine/bp4/BP4Reader.cpp index e7ecfdf803..0a8cf74fdf 100644 --- a/source/adios2/engine/bp4/BP4Reader.cpp +++ b/source/adios2/engine/bp4/BP4Reader.cpp @@ -157,17 +157,11 @@ void BP4Reader::Init() const Seconds timeoutSeconds = Seconds(m_BP4Deserializer.m_Parameters.OpenTimeoutSecs); - // set poll to 1/100 of timeout - Seconds pollSeconds = timeoutSeconds / 100.0; - static const auto pollSecondsMin = Seconds(1.0); - if (pollSeconds < pollSecondsMin) - { - pollSeconds = pollSecondsMin; - } - static const auto pollSecondsMax = Seconds(10.0); - if (pollSeconds > pollSecondsMax) + Seconds pollSeconds = + Seconds(m_BP4Deserializer.m_Parameters.BeginStepPollingFrequencySecs); + if (pollSeconds > timeoutSeconds) { - pollSeconds = pollSecondsMax; + pollSeconds = timeoutSeconds; } TimePoint timeoutInstant =