PetscLogEventSetCollective — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscLogEventSetCollective

Indicates that a particular event is collective.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscLogEventSetCollective(PetscLogEvent event, PetscBool collective)

Logically Collective

## Input Parameters

- event - The event id

- collective - Boolean flag indicating whether a particular event is collective

## Notes

New events returned from `PetscLogEventRegister()` are collective by default.

Collective events are handled specially if the command line option -log_sync is used. In that case the logging saves information about two parts of the event; the time for all the MPI ranks to synchronize and then the time for the actual computation/communication to be performed. This option is useful to debug imbalance within the computations or communications.

## See Also

Profiling, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogEventRegister()`

## Level

developer

## Location

src/sys/logging/plog.c

Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages