Sophisticated timing functions are available in most languages on the CM-5 in order to help determine how much time a program or a portion of a program takes to execute. Since the CM-5 is a timesharing system, two different times can be measured for each program. One is the time elapsed between the start and completion of the program. The elapsed time is the total time consumed by the process both on the control processor and on the processing nodes. Note that the elapsed time does not correspond to the wall-clock time. The busy time is the time that the CM-5 processing nodes spent executing the program and it will not exceed the elapsed time.
The timing facility measures time up to 43 hours with microsecond precision. It is possible to use up to 64 different timers within a program and measure consecutive or cumulative times.
The following program segment in CM Fortran shows one calling sequence to obtain timing information using timer number 13.
c = matmul(a, b)
When the above program is executed, the following message appears:
CM Elapsed time: 0.686 seconds.
CM busy Time: 0.551 seconds.
Node level timing information can be obtained through CMMD functions.