#include "petscmat.h" PetscErrorCode MatDiagonalScaleLocal(Mat mat,Vec diag)
Notes: Works only for MPIAIJ and MPIBAIJ matrices