---
name: "MPE_Seq_begin"
section: "4"
platform: "linux"
package: "mpi-doc"
version: "1.2.7-9.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/MPE_Seq_begin"
---

# MPE\_Seq\_begin(4)

Begins a sequential section of code.

## NAME

MPE\_Seq\_begin -  Begins a sequential section of code.

## SYNOPSIS

```
void MPE_Seq_begin( MPI_Comm comm, int ng )
```

## INPUT PARAMETERS

- **comm**

  \- Communicator to sequentialize.

- **ng**

  \- Number in group.  This many processes are allowed to execute at the same time.  Usually one.

## NOTES

*MPE\_Seq\_begin* and  *MPE\_Seq\_end* provide a way to force a section of code to be executed by the processes in rank order.  Typically, this is done with

```
MPE_Seq_begin( comm, 1 );
<code to be executed sequentially>
MPE_Seq_end( comm, 1 );
```

Often, the sequential code contains output statements (e.g.,  *printf* ) to be executed.  Note that you may need to flush the I/O buffers before calling  *MPE\_Seq\_end* ; also note that some systems do not 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 order that you want).

## LOCATION

mpe\_seq.c
