# PETSC_COMM_WORLD

a duplicate of the MPI_COMM_WORLD communicator which represents all the processs

Notes: PETSC_COMM_WORLD and MPI_COMM_WORLD are equivalent except that passing MPI_COMM_WORLD into PETSc object constructors will result in using more MPI resources since an MPI_Comm_dup() will be done on it internally. We recommend always using PETSC_COMM_WORLD

### See Also

PETSC_COMM_SELF

Level:beginner
Location:include/petsc.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/sys/examples/tutorials/ex1.c.html
src/sys/examples/tutorials/ex2.c.html
src/sys/examples/tutorials/ex4.c.html
src/vec/is/examples/tutorials/ex1.c.html
src/vec/is/examples/tutorials/ex2.c.html
src/vec/is/examples/tutorials/ex4.c.html
src/vec/is/examples/tutorials/ex1f.F.html
src/vec/is/examples/tutorials/ex1f90.F.html
src/vec/examples/tutorials/ex1.c.html
src/vec/examples/tutorials/ex1e.c.html
src/vec/examples/tutorials/ex2.c.html