Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ etime(3F) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

times(2)

f77(1)

ETIME(3F)  —  FORTRAN LIBRARY ROUTINES

NAME

etime, dtime − return elapsed time

SYNOPSIS

real function etime (time)
real time(2) real function dtime (time)
real time(2)

DESCRIPTION

These functions return elapsed time. 
Time is in number of seconds. The resolution is to a nanosecond in Solaris 2.x.
If there is an error,
o   Argument elements time(1) and time(2) are undefined.
o   Function return value = -1.0
If no error,
o   Argument: User time in time(1) and system time in time(2)
o   Function return value: Sum of time(1) and time(2) dtime returns the elapsed time since the last call to dtime. 
For dtime, elapsed time is:
o   On the first call, elapsed time since the start of execution
o   On second and subsequent calls, elapsed time since last call to dtime
o   For single processor: Time used by the CPU
o   For multiple processors: Sum of times for all the CPUs (not useful, use etime)

 Note: Note: Do not call dtime from within a parallelized loop. 

etime returns the elapsed time since the start of execution. 
For etime, elapsed time is:
o   For single processor: CPU time for the calling process
o   For multiple processors: Wall-clock time while running your program

 Note: time(1) contains the wall clock time and time(2) is 0.0

How f77 Decides Single/Multiple User

For a FORTRAN MP program (uses an MP option: ultimately, linked with libF77_mt), if the environment variable PARALLEL is:

Undefined, then the current run is Single Processor.
Defined, and in the range 1, 2, 3, ..., then the current run is Multiple Processor.
Defined, but some value other than 1, 2, 3, ..., then the results are unpredictable.

FILES

libF77.a, libF77_mt.a, libF77.so, libF77_mt.so

SEE ALSO

times(2), f77(1), FORTRAN User’s Guide

Sun Release 4.1  —  Last change: 12 November 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026