.TH "dis_cpu_time" 7rheolef "Sat Mar 13 2021" "Version 7.1" "rheolef" \" -*- nroff -*- .ad l .nh .SH NAME dis_cpu_time \- cumulated cpu for distributed computations (rheolef-7\&.1) .SH "SYNOPSIS" .PP .PP .nf double dis_cpu_time(); double dis_wall_time(); double seq_cpu_time(); double seq_wall_time(); .fi .PP .SH "EXAMPLE" .PP .PP .nf 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 .fi .PP See also \fBdiststream(2)\fP for \fCderr\fP\&. .SH "DESCRIPTION" .PP \fCdis_cpu_time\fP .PP .RS 4 Returns the accumulated CPU for all processed linked together via the default communicator\&. .RE .PP \fCseq_cpu_time\fP .PP .RS 4 It is similar but returns the computing time per user for the current process only\&. .RE .PP \fCdis_wall_time\fP .PP .RS 4 Returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past\&. The \fItime in the past\fP 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 \fIticks\fP), it allows high resolution, and carries no unnecessary baggage\&. In a distributed environment, \fCdis_wall_time\fP clocks are synchronized: different nodes return the same time value at the same instant\&. .RE .PP \fCseq_wall_time\fP .PP .RS 4 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 \fCseq_wall_time\fP is reached\&. .RE .PP .SH "IMPLEMENTATION" .PP This documentation has been generated from file linalg/lib/dis_cpu_time\&.h .SH AUTHOR Pierre Saramito .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.