# PetscGlobalMax

Computes the maximum value over several processors

### Synopsis

    #include "petsc.h"
    PetscErrorCode PETSC_DLLEXPORT PetscGlobalMax(PetscReal* local,PetscReal* result,MPI_Comm comm)

Collective on MPI_Comm

### Input Parameters

| local | - the local value
| comm | - the processors that find the maximum

### Output Parameter

result -the maximum value

### Notes

These functions are to be used inside user functions that are to be processed with ADIC. PETSc will automatically provide differentiated versions of these functions

### See Also

PetscGlobalMin(), PetscGlobalSum()

Level:intermediate
Location: src/sys/objects/pinit.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex26.c.html