gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_clock::stop Interface Reference

Public Member Functions

subroutine dcclockstop0 (clk, err)
 

Detailed Description

Definition at line 179 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockstop0()

subroutine dc_clock::stop::dcclockstop0 ( type(clock), intent(inout)  clk,
logical, intent(out), optional  err 
)

Pause measurement

Pauses measurement at the point this subroutine is called.

If clk has not been initialized by DCClockCreate, an error is raised. If err is provided, .true. is returned in err and the program continues.

Parameters
[in,out]clkCLOCK type variable
[out]errError flag (optional). .true. if error occurred.

Definition at line 355 of file dc_clock.f90.

356 use dc_message, only: messagenotify
357 use dc_string, only: tochar
359 use dc_date, only: evalsec, operator(+), operator(-)
360 use dc_date_types, only: dc_difftime
361 use dc_types, only: dp
362 !$ use omp_lib
363 implicit none
364 type(CLOCK), intent(inout):: clk
365 logical, intent(out), optional:: err
366 character(STRING):: cause_c
367 real(DP):: stop_time
368 integer:: stat
369 character(*), parameter:: subname = 'DCClockStop'
370 continue
371 call beginsub(subname)
372 stat = dc_noerr
373 cause_c = 'CLOCK'
374 if (.not. clk % initialized) then
375 call messagenotify('W', subname, 'Call Create before Stop in dc_clock.')
376 call dbgmessage('Ignored because input argument was not initialized.')
377 stat = dc_enotinit
378 goto 999
379 elseif (clk % start_time < 0.0_dp) then
380 call messagenotify('W', subname, 'Call Start before Stop in dc_clock.')
381 call dbgmessage('Ignored because input argument was not started.')
382 goto 999
383 end if
384 call cpu_time(stop_time)
385 !$ stop_time = omp_get_wtime()
386 clk % elapsed_time = clk % elapsed_time + stop_time - clk % start_time
387 clk % start_time = - 1.0
388 call dbgmessage('name=%c, cpu_time=%f, elapsed_time=%f', &
389 & c1=trim(clk % name), d=(/stop_time, clk % elapsed_time/))
390999 continue
391 call storeerror(stat, subname, err, cause_c)
392 call endsub(subname)
Derived types and parameters for date and time.
Date and time manipulation module.
Definition dc_date.f90:57
Error handling module.
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
Error storage variables
Definition dc_error.f90:468
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
Definition dc_error.f90:534
Message output module.
Handling character types.
Definition dc_string.f90:83
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public dp
Double Precision Real number
Definition dc_types.f90:92

The documentation for this interface was generated from the following file: