Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
<tt>dis_cpu_time</tt>

cumulated cpu for distributed computations

Synopsis

double dis_cpu_time();
double dis_wall_time();
double seq_cpu_time();
double seq_wall_time();
double dis_wall_time()
double seq_wall_time()
double seq_cpu_time()
double dis_cpu_time()

Example

    double t_start = dis_wall_time();
    ...stuff to be timed...
    double t_end   = dis_wall_time();
    derr << "That took " << t_end - t_start << " seconds" << endl

    double cpu_start = dis_cpu_time();
    ...stuff to be timed...
    double cpu_end   = dis_cpu_time();
    derr << "That needs " << cpu_end - cpu_start << " CPU seconds" << endl

See also diststream for derr.

Description

dis_cpu_time

‍ Returns the accumulated CPU for all processed linked together via the default communicator.

seq_cpu_time

‍ It is similar but returns the computing time per user for the current process only.

dis_wall_time

‍ Returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past. The 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. This function is portable (it returns seconds, not ticks), it allows high resolution, and carries no unnecessary baggage. In a distributed environment, dis_wall_time clocks are synchronized: different nodes return the same time value at the same instant.

seq_wall_time

‍ It is similar but the time returned is local to the node that called them and clocks are not synchronized: in a distributed environment, different nodes can return different local times, at different instant when the call to seq_wall_time is reached.

Implementation

This documentation has been generated from file linalg/lib/dis_cpu_time.h