---
name: "TAU_PROFILE_STOP"
section: "3"
platform: "linux"
package: "tau"
version: "2.17.3.1.dfsg-4.2"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/TAU_PROFILE_STOP"
---

# TAU\_PROFILE\_STOP(3)

Stops a timer.

## NAME

TAU\_PROFILE\_STOP - Stops a timer.

## SYNOPSIS

**C/C++:**

**TAU\_PROFILE\_STOP(Profiler** *timer***);**

**Fortran:**

**TAU\_PROFILE\_STOP(integer** *profiler***(2));**

## DESCRIPTION

Stops the timer given by *timer*. It is important to note that timers can be nested, but not overlapping. TAU detects programming errors that lead to such overlaps at runtime, and prints a warning message.

## EXAMPLE

**C/C++ :**

```
int foo(int a) {
  TAU_PROFILE_TIMER(timer, "foo", "int (int)", TAU_USER);
  TAU_PROFILE_START(timer);
  ...
  TAU_PROFILE_STOP(timer);
  return a;
}
```

**Fortran :**

```
subroutine F1()
  integer profiler(2) / 0, 0 /
  save    profiler
  call TAU_PROFILE_TIMER(profiler,'f1()')
  call TAU_PROFILE_START(profiler)
  ...
  call TAU_PROFILE_STOP(profiler)
end
```

## SEE ALSO

[TAU\_PROFILE\_TIMER(3)](/TAU_PROFILE_TIMER/3.md), [TAU\_PROFILE\_START(3)](/TAU_PROFILE_START/3.md)
