Use PetscInt to shut up compiler when using 64-bit indices.
Don't try to store max(unsigned long long) into an unsigned when all
you want is an unsigned.