File: timers.c

package info (click to toggle)
mpich 1.1.0-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 22,116 kB
  • ctags: 27,349
  • sloc: ansic: 193,435; sh: 11,172; fortran: 6,545; makefile: 5,801; cpp: 5,020; tcl: 3,548; asm: 3,536; csh: 1,079; java: 614; perl: 183; awk: 168; sed: 70; f90: 62
file content (30 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "mpi.h"
#ifdef PETSC_AVAILABLE
#include "system/system.h"
#endif
#include "mpe.h"

/*@
    MPE_Ptime - Returns process time stamp

    Notes:
    This routine returns the CPU time charged to the process only if the
    PETSC package is available (it uses the PETSc routine 'SYGetCPUTime').
    Otherwise, it returns 'MPI_Wtime' (wall-clock time).
@*/
double MPE_Ptime()
{
#ifdef PETSC_AVAILABLE
    return SYGetCPUTime();
#else
    return MPI_Wtime();
#endif
}

/*@
    MPE_Wtime - Returns wall clock time stamp
@*/
double MPE_Wtime()
{
    return MPI_Wtime();
}