Skip to main content
`Ctrl`+`K`

# petsc4py.init

petsc4py.init(args=None, arch=None, comm=None)

  Initialize PETSc.

  Parameters:

    - args (str | list[str] | None) – Command-line arguments, usually the `sys.argv` list

    - arch (str | None) – Specific configuration to use

    - comm (Intracomm | None) – MPI commmunicator

  Return type:

    None

  Notes

  This function should be called only once, typically at the very beginning of the bootstrap script of an application.