next up previous contents
Next: join_watchgroup Up: Reference Manual Previous: end_pause_watch



returns StopWatch options and system dependent values

subroutine inquiry_stopwatch (default_clock, io_unit_print, io_unit_error, print_errors, abort_errors, print_form, cpu_avail, user_avail, sys_avail, wall_avail, cpu_prec, wall_prec, version, err)

character(len=*), optional, intent(OUT) :: default_clock(4)

integer, optional, intent(OUT) :: io_unit_print, io_unit_error

logical, optional, intent(OUT) :: print_errors, abort_errors

character(len=*), optional, intent(OUT) :: print_form

logical, optional, intent(OUT) :: cpu_avail, user_avail, sys_avail, wall_avail

real, optional, intent(OUT) :: cpu_prec, wall_prec

character(len=16), optional, intent(OUT) :: version

integer, optional, intent(OUT) :: err

Returns the value of StopWatch options and other system and implementation dependent values. All arguments are optional and have intent OUT.

The following arguments can be set by option_stopwatch. See option_stopwatch(3) for further details on their meaning. default_clock is the set of clocks that are used when the clock argument is omitted in a call to a StopWatch routine. io_unit_print returns the unit for output from subroutine print_watch. io_unit_error returns the unit for any error messages printed by StopWatch . If print_errors is TRUE, then an error message will be printed to io_unit_error whenever an error condition occurs. If abort_errors is TRUE, then the program will terminate when an error condition occurs. print_form is the format used by print_watch(3) when the form argument is omitted.

The remaining arguments return system information that can not be changed.

Since an interface to the CPU clock is not part of the Fortran 90 standard, the availability of clocks and clock precisions are implementation dependent. Not all clocks are available in all implementations. The logical arguments cpu_avail, user_avail, sys_avail and wall_avail return TRUE if the respective clock is available in this implementation.

The precision (the shortest time interval that can be measured) of the clocks also varies between implementations. The real variables cpu_prec and wall_prec return the precision of the CPU and wall clocks, in seconds. It is assumed that the user and sys clocks have the same precision as the CPU clock. If the CPU clock is not available, then cpu_prec will return 0., and similar for the wall clock.

The character string version returns the version number of StopWatch .

If present, the optional intent OUT integer argument err returns a status code. The code is the sum of the values listed below.

An error message will be printed to a specified I/O unit (unit 6 by default) if print_errors is TRUE (default is TRUE). The error message contains more detail about the cause of the error than can be obtained from just the status code, so you should set print_errors to TRUE if you have trouble determining the cause of the error.

If abort_errors is TRUE (default is FALSE), the program will terminate on an error condition. Otherwise, the program will continue execution but the requested value(s) might not be returned.

See option_stopwatch(3) for further information on print_errors, abort_errors and I/O units.

The relevant status codes and messages are:

No errors; execution successful.

Failed to allocate required memory. This error occurs if the Fortran allocate statement returns a nonzero status indicating that memory could not be allocated. Avoid memory leaks by always destroying watches and groups before recreating them, and destroying local variable watches and groups before returning from a subroutine.

logical user_is_there
real cpu_prec

call inquiry_stopwatch(user_avail=user_is_there)
call inquiry_stopwatch(cpu_prec=cpu_prec)

The first call determines if the user clock is available in this implementation. The second call determines the shortest time that can be measured by the CPU clock.

None known.

next up previous contents
Next: join_watchgroup Up: Reference Manual Previous: end_pause_watch