Returns an elapsed time on the calling processor


#include "mpi.h"
double MPI_Wtime()

Return value

Time in seconds since an arbitrary time in the past.


This is intended to be a high-resolution, elapsed (or wall) clock. See MPI_WTICK to determine the resolution of MPI_WTIME. If the attribute MPI_WTIME_IS_GLOBAL is defined and true, then the value is synchronized across all processes in MPI_COMM_WORLD.

Notes for Fortran

This is a function, declared as DOUBLE PRECISION MPI_WTIME() in Fortran.

See Also

also: MPI_Wtick, MPI_Attr_get