563 type(clock),
intent(in):: clks(:)
564 integer,
intent(in),
optional:: unit
565 logical,
intent(in),
optional:: total_auto
566 type(clock),
intent(in),
optional:: clk_total
567 logical,
intent(out),
optional:: err
568 character(*),
intent(in),
optional:: total_name
569 integer:: out_unit, i, clks_size, ra
570 character(20):: clk_name
571 character(STRING):: cause_c
572 character(STRING):: total_name_work
573 type(clock):: clk_auto_total
574 logical:: total_print_complete
575 real(DP):: elapsed_time_val_cor
577 character(*),
parameter:: total_time_mes =
' TOTAL TIME = ' 578 integer:: myrank_mpi, nprocs_mpi
579 character(*),
parameter:: subname =
'DCClockResult' 581 call beginsub(subname)
584 clks_size =
size(clks)
586 if (.not. clks(i) % initialized)
then 587 call messagenotify(
'W', subname,
'Call Create before Result in dc_clock.')
588 call dbgmessage(
'Ignored because input argument was not initialized.')
593 if (
present(unit))
then 598 if (
present(total_name))
then 599 total_name_work =
' (' // trim(total_name) //
')' 605 do ra = 0, nprocs_mpi - 1
607 if ( myrank_mpi < 0 )
then 609 &
' ############## CPU TIME SUMMARY%c################', &
610 & c1=trim(total_name_work) //
' ')
613 &
' ####### CPU TIME SUMMARY%c#### [rank=%06d] ####', &
614 & c1=trim(total_name_work) //
' ', &
615 & i = (/myrank_mpi/) )
618 clk_name = clks(i) % name
619 elapsed_time_val_cor = clks(i) % elapsed_time
620 if (elapsed_time_val_cor < 0.0_dp) elapsed_time_val_cor = 0.0_dp
622 &
' %c%c %c', c1=clk_name, &
623 & c2=trim(result_value_form(elapsed_time_val_cor)), &
624 & c3=trim(fit_unit_value(clks(i) % elapsed_time)))
626 total_print_complete = .false.
627 if (
present(clk_total))
then 628 if (clk_total % initialized)
then 630 &
' ------------------------------------------------')
631 elapsed_time_val_cor = clk_total % elapsed_time
632 if (elapsed_time_val_cor < 0.0_dp) elapsed_time_val_cor = 0.0_dp
634 &
' %c%c %c', c1=total_time_mes, &
635 & c2=trim(result_value_form(elapsed_time_val_cor)), &
636 & c3=trim(fit_unit_value(clk_total % elapsed_time)))
637 total_print_complete = .true.
640 if (
present(total_auto) .and. .not. total_print_complete)
then 642 clk_auto_total = clks(1)
643 if (clks_size > 1)
then 645 clk_auto_total = clk_auto_total + clks(i)
649 &
' ------------------------------------------------')
650 elapsed_time_val_cor = clk_auto_total % elapsed_time
651 if (elapsed_time_val_cor < 0.0_dp) elapsed_time_val_cor = 0.0_dp
653 &
' %c%c %c', c1=total_time_mes, &
654 & c2=trim(result_value_form(elapsed_time_val_cor)), &
655 & c3=trim(fit_unit_value(clk_auto_total % elapsed_time)))
658 call dbgmessage(
'total results, output to device number %d', &
integer, parameter, public dc_enotinit
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
integer, parameter, public dp
Double Precision Real number.
integer, parameter, public stdout
Unit number for Standard OUTPUT.
Handling character types.
Provides kind type parameter values.
integer, parameter, public string
Character length for string.