Automatic termination of parallel optimization runs of stochastic global optimization methods in consensus or stagnation cases