diff --git a/reframe/frontend/executors/policies.py b/reframe/frontend/executors/policies.py index c85fb0ee76..c601d3b2bc 100644 --- a/reframe/frontend/executors/policies.py +++ b/reframe/frontend/executors/policies.py @@ -78,8 +78,14 @@ def __init__(self, min_rate, decay_time): def _init_poll_fn(self, init_rate): self._init_rate = init_rate self._b = self._min_rate - self._a = init_rate - self._b - self._c = math.log(self._a / (self._thres*self._b)) / self._decay + log_arg = (init_rate - self._b) / (self._thres*self._b) + if log_arg < sys.float_info.min: + self._a = 0.0 + self._c = 0.0 + else: + self._a = init_rate - self._b + self._c = math.log(self._a / (self._thres*self._b)) / self._decay + getlogger().debug('rate equation: %.3f*exp(-%.3f*x)+%.3f' % (self._a, self._c, self._b))