PetscViewerFlowControlStepMain — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscViewerFlowControlStepMain

Advance the flow-control window on the main MPI process during a viewer operation

## Synopsis

    #include "petscviewer.h"
    PetscErrorCode PetscViewerFlowControlStepMain(PetscViewer viewer, PetscInt i, PetscInt *mcnt, PetscInt cnt)

Collective

## Input Parameters

- viewer - the binary viewer

- i - the current MPI rank being served

- cnt - the flow-control window size returned by `PetscViewerFlowControlStart()`

## Input/Output Parameter

- mcnt - the running flow-control counter; incremented and broadcast when `i` reaches it

## Note

Called on the main MPI process (rank 0) once per worker rank in a loop; when the current rank has caught up to `mcnt` the window is advanced by `cnt` and broadcast so waiting workers can proceed.

## See Also

`PetscViewer`, `PetscViewerFlowControlStart()`, `PetscViewerFlowControlEndMain()`, `PetscViewerFlowControlStepWorker()`, `PetscViewerFlowControlEndWorker()`

## Level

developer

## Location

src/sys/classes/viewer/interface/viewreg.c

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