:orphan: # PetscInt PETSc type that represents an integer, used primarily to represent size of arrays and indexing into arrays. Its size can be configured with the option `--with-64-bit-indices` to be either 32-bit (default) or 64-bit. ## Notes For MPI calls that require datatypes, use `MPIU_INT` as the datatype for `PetscInt`. It will automatically work correctly regardless of the size of `PetscInt`. ## See Also `PetscBLASInt`, `PetscMPIInt`, `PetscReal`, `PetscScalar`, `PetscComplex`, `PetscInt`, `MPIU_REAL`, `MPIU_SCALAR`, `MPIU_COMPLEX`, `MPIU_INT`, `PetscIntCast()` ## Level beginner ## Location include/petscsystypes.h ## Examples src/dm/dt/dualspace/impls/lagrange/tutorials/ex2.c
src/dm/field/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex1f90.F90
src/dm/impls/plex/tutorials/ex3f90.F90
src/dm/impls/stag/tutorials/ex4.c
src/dm/impls/stag/tutorials/ex6.c
src/dm/tutorials/ex13f90aux.F90
src/dm/tutorials/swarm_ex3.c
src/ksp/ksp/tutorials/ex13.c
src/ksp/ksp/tutorials/ex14f.F90
src/ksp/ksp/tutorials/ex29.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsystypes.h) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)