---
name: "MPI_T_finalize.openmpi"
section: "3"
platform: "linux"
package: "openmpi-doc"
version: "5.0.7-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MPI_T_finalize.openmpi"
---

# MPI\_T\_finalize.openmpi(3)

*MPI\_T\_finalize* — Finalize the MPI tool information interface

## SYNTAX

### C Syntax

```
#include <mpi.h>
int MPI_T_finalize(void)
```

## DESCRIPTION

MPI\_T\_finalize() finalizes the MPI tool information interface and must be called the same number of times as MPI\_T\_init\_thread() by the end of execution. Calls to MPI tool functions are allowed at any point in execution as long as MPI\_T\_init\_thread() has been called at least once and the number of calls to MPI\_T\_init\_thread() is greater than the number of calls to MPI\_T\_finalize(). If at any point in execution the number of calls to MPI\_T\_finalize() equals the number of calls to MPI\_T\_init\_thread() the MPI tool interface will no longer be available until another call to MPI\_T\_init\_thread().

## NOTES

Before the end of execution the number of calls to MPI\_T\_init\_thread() and *MPI\_T\_finalize* must be the same.

## ERRORS

*MPI\_T\_finalize* will fail if:

- •

  **MPI\_T\_ERR\_NOT\_INITIALIZED**: The MPI Tools interface not initialized

**SEE ALSO:**

- •

  *MPI\_T\_init\_thread*

## COPYRIGHT

2003-2025, The Open MPI Community
