PetscSequentialPhaseBegin

Begins a sequential section of code.

Synopsis

int PetscSequentialPhaseBegin(MPI_Comm comm,int ng )
Collective on MPI_Comm

Input Parameters

comm - Communicator to sequentialize.
ng - Number in processor group. This many processes are allowed to execute at the same time (usually 1)

Notes

PetscSequentialPhaseBegin() and PetscSequentialPhaseEnd() provide away to force a section of code to be executed by the processes inrank order. Typically, this is done with
      PetscSequentialPhaseBegin( comm, 1 );
      <code to be executed sequentially>
      PetscSequentialPhaseEnd( comm, 1 );

Often, the sequential code contains output statements (e.g., printf) tobe executed. Note that you may need to flush the I/O buffers beforecalling PetscSequentialPhaseEnd(). Also, note that some systems donot propagate I/O in any order to the controling terminal (in other words, even if you flush the output, you may not get the data in the orderthat you want).

See Also

PetscSequentialPhaseEnd()

Keywords

sequential, phase, begin

Location: src/sys/src/utilsmpiu.c
System Index
Table of Contents