outputing total sum in scan_partials kernel.