source: proiecte/hpl/openmpi_compiled/share/man/man3/MPI_Wtime.3 @ 97

Last change on this file since 97 was 97, checked in by (none), 14 years ago

Adding compiled files

File size: 2.4 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Wtime 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Wtime\fP \- Returns an elapsed time on the calling processor.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12double MPI_Wtime()
13
14.SH Fortran Syntax
15.nf
16INCLUDE 'mpif.h'
17DOUBLE PRECISION MPI_WTIME()
18
19.SH C++ Syntax
20.nf
21#include <mpi.h>
22double MPI::Wtime()
23
24.SH RETURN VALUE
25.ft R
26Time in seconds since an arbitrary time in the past.
27
28.SH DESCRIPTION
29.ft R
30MPI_Wtime returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past.
31.PP
32The "time in the past" is guaranteed not to change during the life of the process. The user is responsible for converting large numbers of seconds to other units if they are preferred.
33.PP
34This function is portable (it returns seconds, not "ticks"), it allows high resolution, and carries no unnecessary baggage. One would use it like this:
35.sp
36.nf
37    {
38       double starttime, endtime;
39       starttime = MPI_Wtime();
40        \&....  stuff to be timed  \&...
41       endtime   = MPI_Wtime();
42       printf("That took %f seconds\\n",endtime-starttime);
43    }
44.fi
45.PP
46The times returned are local to the node that called them. There is no requirement that different nodes return the "same" time.
47.SH NOTES
48The boolean variable MPI_WTIME_IS_GLOBAL, a predefined attribute key that indicates whether clocks are synchronized, does not have a valid value in Open MPI, as the clocks are not guaranteed to be synchronized.
49
50.PP
51This function is intended to be a high-resolution, elapsed (or wall) clock. See MPI_Wtick to determine the resolution of MPI_Wtime.
52.PP
53On POSIX platforms, this function may utilize a timer that is cheaper
54to invoke than the gettimeofday() system call, but will fall back to
55gettimeofday() if a cheap high-resolution timer is not available.  The
56ompi_info command can be consulted to see if Open MPI supports a
57native high-resolution timer on your platform; see the value for "MPI_WTIME
58support" (or "options:mpi-wtime" when viewing the parsable
59output).  If this value is "native", a method that is likely to be
60cheaper than gettimeofday() will be used to obtain the time when
61MPI_Wtime is invoked.
62.PP
63This function does not return an error value. Consequently, the result of calling it before MPI_Init or after MPI_Finalize is undefined.
64
65.SH SEE ALSO
66MPI_Wtick
67.br
68
Note: See TracBrowser for help on using the repository browser.