stateful sparseallreduce