DistDir
Functions
Timer

Functions

int new_timer (const char *timer_name)
 Create a new timer. More...
 
void timer_start (int timer_id)
 Start timer based on ID. More...
 
void timer_stop (int timer_id)
 Stop timer based on ID. More...
 
void timers_report ()
 Create reports of all timers. More...
 
void timers_reset ()
 Reset all the timers. More...
 
void delete_timers ()
 Free timers memory. More...
 

Detailed Description

Functions used for internal profiling

Function Documentation

◆ delete_timers()

void delete_timers ( )

Free timers memory.

Free each timer memory and the memory related to the linked list.

◆ new_timer()

int new_timer ( const char *  timer_name)

Create a new timer.

A timer is created and added to the internal linked list, then the timer ID is returned. If the timer already exists, its ID is returned.

Parameters
[in]timer_nametimer name string
Returns
timer ID

◆ timer_start()

void timer_start ( int  timer_id)

Start timer based on ID.

The timer is started using internally MPI_Wtime()

Parameters
[in]timer_nametimer name string

◆ timer_stop()

void timer_stop ( int  timer_id)

Stop timer based on ID.

The timer is stopped using internally MPI_Wtime() and adding the time to the total timer time. If timer_start() was not called before, it fails.

Parameters
[in]timer_nametimer name string

◆ timers_report()

void timers_report ( )

Create reports of all timers.

The reports are stored in a specific directory and a report is created by each MPI rank. A summary report is also created with min, max and mean timers' times.

◆ timers_reset()

void timers_reset ( )

Reset all the timers.

The total time of all the timers is reset to zero.