fix logchain_allreduce bug in non power-of-two