Fix csr representation for mpi/cuda