diff --git a/index.html b/index.html index 568c99d..cf1d39e 100644 --- a/index.html +++ b/index.html @@ -102,7 +102,7 @@

Measuring elapsed time (system_clock)

call t%timer_start() ! Your code or section to be timed -call t%timer_stop(nloops, message, print) ! nloops, message and print are optional +call t%timer_stop(nloops, message, print, color) ! nloops, message, print and color are optional call t%timer_write(file_name) ! Optionally, write the result to a file @@ -113,7 +113,7 @@

Measuring elapsed time (date_and_time)

call t%dtimer_start() ! Your code or section to be timed -call t%dtimer_stop(nloops, message, print) ! nloops, message and print are optional +call t%dtimer_stop(nloops, message, print, color) ! nloops, message, print and color are optional call t%dtimer_write(file_name) ! Optionally, write the result to a file @@ -124,7 +124,7 @@

Measuring CPU time (cpu_time)

call t%ctimer_start() ! Your code or section to be timed -call t%ctimer_stop(nloops, message, print) ! nloops, message and print are optional +call t%ctimer_stop(nloops, message, print, color) ! nloops, message, print and color are optional call t%ctimer_write(file_name) ! Optionally, write the result to a file @@ -135,7 +135,7 @@

Measuring OpenMP time (omp_get_wtime)

call t%otimer_start() ! Your code or section to be timed -call t%otimer_stop(nloops, message, print) ! nloops, message and print are optional +call t%otimer_stop(nloops, message, print, color) ! nloops, message, print and color are optional call t%otimer_write(file_name) ! Optionally, write the result to a file @@ -147,7 +147,7 @@

Measuring MPI time (mpi_wtime)

call t%mtimer_start() ! Your code or section to be timed -call t%mtimer_stop(nloops, message, print) ! nloops, message and print are optional +call t%mtimer_stop(nloops, message, print, color) ! nloops, message, print and color are optional call t%mtimer_write(file_name) ! Optionally, write the result to a file @@ -265,7 +265,7 @@

Derived Types

Documentation generated by FORD - on 2024-04-22T08:06:45.443687

+ on 2024-04-22T09:42:49.196740


diff --git a/lists/files.html b/lists/files.html index 1f3e6ab..7d94e79 100644 --- a/lists/files.html +++ b/lists/files.html @@ -847,7 +847,7 @@

Documentation generated by FORD - on 2024-04-22T08:06:45.443687

+ on 2024-04-22T09:42:49.196740


diff --git a/lists/modules.html b/lists/modules.html index b450c08..e633462 100644 --- a/lists/modules.html +++ b/lists/modules.html @@ -85,11 +85,11 @@

Modules

- - + + module~~graph~~ModuleGraph - + module~fortime @@ -100,7 +100,7 @@

Modules

- + kinds kinds @@ -121,9 +121,9 @@

Modules

- + omp_lib - + omp_lib @@ -132,8 +132,8 @@

Modules

proc~otimer_start->omp_lib - - + + @@ -147,8 +147,8 @@

Modules

proc~otimer_stop->omp_lib - - + + @@ -162,854 +162,875 @@

Modules

proc~otimer_write->omp_lib - - + + - + +proc~print_time + + +print_time + + + + + +face + +face + + + +proc~print_time->face + + + + + program~example1 - + example1 - + program~example1->module~fortime - - + + - + program~example2 - + example2 - + program~example2->module~fortime - - + + - + program~example3 - + example3 - + program~example3->module~fortime - - + + - + program~example4 - + example4 - + program~example4->module~fortime - - + + - + program~example5 - + example5 - + program~example5->module~fortime - - + + - + program~example6 - + example6 - + program~example6->module~fortime - - + + - + program~test1 - + test1 - + program~test1->module~fortime - - + + - + forunittest forunittest - + program~test1->forunittest - - + + - + program~test1->kinds - + - + program~test10 - + test10 - + program~test10->module~fortime - - + + - + program~test10->forunittest - - + + - + program~test10->kinds - + - + program~test11 - + test11 - + program~test11->module~fortime - - + + - + program~test11->forunittest - - + + - + program~test11->kinds - + - + program~test12 - + test12 - + program~test12->module~fortime - - + + - + program~test12->forunittest - - + + - + program~test12->kinds - + - + program~test13 - + test13 - + program~test13->module~fortime - - + + - + program~test13->forunittest - - + + - + program~test13->kinds - + - + program~test14 - + test14 - + program~test14->module~fortime - - + + - + program~test14->forunittest - - + + - + program~test14->kinds - + - + program~test15 - + test15 - + program~test15->module~fortime - - + + - + program~test15->forunittest - - + + - + program~test15->kinds - + - + program~test16 - + test16 - + program~test16->module~fortime - - + + - + program~test16->kinds - + - + program~test17 - + test17 - + program~test17->module~fortime - - + + - + program~test17->kinds - + - + program~test18 - + test18 - + program~test18->module~fortime - - + + - + program~test18->kinds - + - + program~test19 - + test19 - + program~test19->module~fortime - - + + - + program~test19->forunittest - - + + - + program~test19->kinds - + - + program~test2 - + test2 - + program~test2->module~fortime - - + + - + program~test2->forunittest - - + + - + program~test2->kinds - + - + program~test20 - + test20 - + program~test20->module~fortime - - + + - + program~test20->forunittest - - + + - + program~test20->kinds - + - + program~test21 - + test21 - + program~test21->module~fortime - - + + - + program~test21->forunittest - - + + - + program~test21->kinds - + - + program~test22 - + test22 - + program~test22->module~fortime - - + + - + program~test22->forunittest - - + + - + program~test22->kinds - - - + + + - + program~test23 - + test23 - + program~test23->module~fortime - - + + - + program~test23->forunittest - - + + - + program~test23->kinds - + - + program~test24 - + test24 - + program~test24->module~fortime - - + + - + program~test24->forunittest - - + + - + program~test24->kinds - + - + program~test25 - + test25 - + program~test25->module~fortime - - + + - + program~test25->forunittest - - + + - + program~test25->kinds - + - + program~test26 - + test26 - + program~test26->module~fortime - - + + - + program~test26->forunittest - - + + - + program~test26->kinds - + - + program~test27 - + test27 - + program~test27->module~fortime - - + + - + program~test27->forunittest - - + + - + program~test27->kinds - - - + + + - + program~test28 - + test28 - + program~test28->module~fortime - - + + - + program~test28->forunittest - - + + - + program~test28->kinds - + - + program~test29 - + test29 - + program~test29->module~fortime - - + + - + program~test29->forunittest - - + + - + program~test29->kinds - + - + program~test3 - + test3 - + program~test3->module~fortime - - + + - + program~test3->forunittest - - + + - + program~test3->kinds - + - + program~test30 - + test30 - + program~test30->module~fortime - - + + - + program~test30->forunittest - - + + - + program~test30->kinds - + - + program~test4 - + test4 - + program~test4->module~fortime - - + + - + program~test4->kinds - + - + program~test5 - + test5 - + program~test5->module~fortime - - + + - + program~test5->kinds - - - + + + - + program~test6 - + test6 - + program~test6->module~fortime - - + + - + program~test6->kinds - + - + program~test7 - + test7 - + program~test7->module~fortime - - + + - + program~test7->forunittest - - + + - + program~test7->kinds - + - + program~test8 - + test8 - + program~test8->module~fortime - - + + - + program~test8->forunittest - - + + - + program~test8->kinds - + - + program~test9 - + test9 - + program~test9->module~fortime - - + + - + program~test9->forunittest - - + + - + program~test9->kinds - + @@ -1102,7 +1123,7 @@

Documentation generated by FORD - on 2024-04-22T08:06:45.443687

+ on 2024-04-22T09:42:49.196740


diff --git a/lists/procedures.html b/lists/procedures.html index 0ecdb8b..bf2e2b1 100644 --- a/lists/procedures.html +++ b/lists/procedures.html @@ -190,11 +190,11 @@

Procedures

- + call~~graph~~CallGraph - + proc~ctimer_start @@ -328,7 +328,7 @@

Procedures

- + omp_get_wtime omp_get_wtime @@ -369,6 +369,18 @@

Procedures

+ + +colorize + +colorize + + + +proc~print_time->colorize + + + proc~timer_start @@ -388,7 +400,7 @@

Procedures

- + proc~timer_stop->proc~print_time @@ -412,13 +424,13 @@

Procedures

- + program~example1->proc~timer_start - + program~example1->proc~timer_stop @@ -433,19 +445,19 @@

Procedures

- + program~example2->proc~timer_start - + program~example2->proc~timer_stop - + program~example2->proc~timer_write @@ -460,13 +472,13 @@

Procedures

- + program~example3->proc~ctimer_start - + program~example3->proc~ctimer_stop @@ -481,19 +493,19 @@

Procedures

- + program~example4->proc~ctimer_start - + program~example4->proc~ctimer_stop - + program~example4->proc~ctimer_write @@ -508,13 +520,13 @@

Procedures

- + program~example5->proc~dtimer_start - + program~example5->proc~dtimer_stop @@ -529,19 +541,19 @@

Procedures

- + program~example6->proc~dtimer_start - + program~example6->proc~dtimer_stop - + program~example6->proc~dtimer_write @@ -556,13 +568,13 @@

Procedures

- + program~test1->proc~timer_start - + program~test1->proc~timer_stop @@ -574,7 +586,7 @@

Procedures

check
- + program~test1->check @@ -589,43 +601,43 @@

Procedures

- + program~test10->proc~mtimer_start - + program~test10->proc~mtimer_stop - + program~test10->check - + mpi_finalize mpi_finalize - + program~test10->mpi_finalize - + mpi_init mpi_init - + program~test10->mpi_init @@ -640,37 +652,37 @@

Procedures

- + program~test11->proc~mtimer_start - + program~test11->proc~mtimer_stop - + program~test11->proc~mtimer_write - + program~test11->check - + program~test11->mpi_finalize - + program~test11->mpi_init @@ -685,37 +697,37 @@

Procedures

- + program~test12->proc~mtimer_start - + program~test12->proc~mtimer_stop - + program~test12->proc~mtimer_write - + program~test12->check - + program~test12->mpi_finalize - + program~test12->mpi_init @@ -730,19 +742,19 @@

Procedures

- + program~test13->proc~timer_start - + program~test13->proc~timer_stop - + program~test13->check @@ -757,25 +769,25 @@

Procedures

- + program~test14->proc~timer_start - + program~test14->proc~timer_stop - + program~test14->proc~timer_write - + program~test14->check @@ -790,25 +802,25 @@

Procedures

- + program~test15->proc~timer_start - + program~test15->proc~timer_stop - + program~test15->proc~timer_write - + program~test15->check @@ -823,13 +835,13 @@

Procedures

- + program~test16->proc~ctimer_start - + program~test16->proc~ctimer_stop @@ -844,19 +856,19 @@

Procedures

- + program~test17->proc~ctimer_start - + program~test17->proc~ctimer_stop - + program~test17->proc~ctimer_write @@ -871,19 +883,19 @@

Procedures

- + program~test18->proc~ctimer_start - + program~test18->proc~ctimer_stop - + program~test18->proc~ctimer_write @@ -898,19 +910,19 @@

Procedures

- + program~test19->proc~otimer_start - + program~test19->proc~otimer_stop - + program~test19->check @@ -925,25 +937,25 @@

Procedures

- + program~test2->proc~timer_start - + program~test2->proc~timer_stop - + program~test2->proc~timer_write - + program~test2->check @@ -958,25 +970,25 @@

Procedures

- + program~test20->proc~otimer_start - + program~test20->proc~otimer_stop - + program~test20->proc~otimer_write - + program~test20->check @@ -991,25 +1003,25 @@

Procedures

- + program~test21->proc~otimer_start - + program~test21->proc~otimer_stop - + program~test21->proc~otimer_write - + program~test21->check @@ -1024,31 +1036,31 @@

Procedures

- + program~test22->proc~mtimer_start - + program~test22->proc~mtimer_stop - + program~test22->check - + program~test22->mpi_finalize - + program~test22->mpi_init @@ -1063,37 +1075,37 @@

Procedures

- + program~test23->proc~mtimer_start - + program~test23->proc~mtimer_stop - + program~test23->proc~mtimer_write - + program~test23->check - + program~test23->mpi_finalize - + program~test23->mpi_init @@ -1108,37 +1120,37 @@

Procedures

- + program~test24->proc~mtimer_start - + program~test24->proc~mtimer_stop - + program~test24->proc~mtimer_write - + program~test24->check - + program~test24->mpi_finalize - + program~test24->mpi_init @@ -1153,19 +1165,19 @@

Procedures

- + program~test25->proc~dtimer_start - + program~test25->proc~dtimer_stop - + program~test25->check @@ -1180,25 +1192,25 @@

Procedures

- + program~test26->proc~dtimer_start - + program~test26->proc~dtimer_stop - + program~test26->proc~dtimer_write - + program~test26->check @@ -1213,25 +1225,25 @@

Procedures

- + program~test27->proc~dtimer_start - + program~test27->proc~dtimer_stop - + program~test27->proc~dtimer_write - + program~test27->check @@ -1246,19 +1258,19 @@

Procedures

- + program~test28->proc~dtimer_start - + program~test28->proc~dtimer_stop - + program~test28->check @@ -1273,25 +1285,25 @@

Procedures

- + program~test29->proc~dtimer_start - + program~test29->proc~dtimer_stop - + program~test29->proc~dtimer_write - + program~test29->check @@ -1306,25 +1318,25 @@

Procedures

- + program~test3->proc~timer_start - + program~test3->proc~timer_stop - + program~test3->proc~timer_write - + program~test3->check @@ -1339,25 +1351,25 @@

Procedures

- + program~test30->proc~dtimer_start - + program~test30->proc~dtimer_stop - + program~test30->proc~dtimer_write - + program~test30->check @@ -1372,13 +1384,13 @@

Procedures

- + program~test4->proc~ctimer_start - + program~test4->proc~ctimer_stop @@ -1393,19 +1405,19 @@

Procedures

- + program~test5->proc~ctimer_start - + program~test5->proc~ctimer_stop - + program~test5->proc~ctimer_write @@ -1420,19 +1432,19 @@

Procedures

- + program~test6->proc~ctimer_start - + program~test6->proc~ctimer_stop - + program~test6->proc~ctimer_write @@ -1447,19 +1459,19 @@

Procedures

- + program~test7->proc~otimer_start - + program~test7->proc~otimer_stop - + program~test7->check @@ -1474,25 +1486,25 @@

Procedures

- + program~test8->proc~otimer_start - + program~test8->proc~otimer_stop - + program~test8->proc~otimer_write - + program~test8->check @@ -1507,25 +1519,25 @@

Procedures

- + program~test9->proc~otimer_start - + program~test9->proc~otimer_stop - + program~test9->proc~otimer_write - + program~test9->check @@ -1628,7 +1640,7 @@

Documentation generated by FORD - on 2024-04-22T08:06:45.443687

+ on 2024-04-22T09:42:49.196740


diff --git a/lists/programs.html b/lists/programs.html index 7b7a1a9..d8b6588 100644 --- a/lists/programs.html +++ b/lists/programs.html @@ -269,7 +269,7 @@

Programs

Documentation generated by FORD - on 2024-04-22T08:06:45.443687

+ on 2024-04-22T09:42:49.196740


diff --git a/lists/types.html b/lists/types.html index 4bb50aa..c6b7350 100644 --- a/lists/types.html +++ b/lists/types.html @@ -97,7 +97,7 @@

Derived Types

Documentation generated by FORD - on 2024-04-22T08:06:45.443687

+ on 2024-04-22T09:42:49.196740


diff --git a/module/fortime.html b/module/fortime.html index e6390ed..9d6574f 100644 --- a/module/fortime.html +++ b/module/fortime.html @@ -76,7 +76,7 @@

fortime
  • 273 statements + title="100.0% of total for modules and submodules.">284 statements
  • @@ -1525,7 +1525,7 @@

    Arguments

    -

    private impure subroutine timer_stop(this, nloops, message, print) +

    private impure subroutine timer_stop(this, nloops, message, print, color)

    @@ -1563,7 +1563,7 @@

    Arguments

    - + integer, intent(in), @@ -1604,6 +1604,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -1716,7 +1731,7 @@

    Arguments

    -

    private impure subroutine ctimer_stop(this, nloops, message, print) +

    private impure subroutine ctimer_stop(this, nloops, message, print, color)

    @@ -1754,7 +1769,7 @@

    Arguments

    - + integer, intent(in), @@ -1795,6 +1810,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -1907,7 +1937,7 @@

    Arguments

    -

    private impure subroutine otimer_stop(this, nloops, message, print) +

    private impure subroutine otimer_stop(this, nloops, message, print, color)

    @@ -1945,7 +1975,7 @@

    Arguments

    - + integer, intent(in), @@ -1986,6 +2016,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -2098,7 +2143,7 @@

    Arguments

    -

    private impure subroutine mtimer_stop(this, nloops, message, print) +

    private impure subroutine mtimer_stop(this, nloops, message, print, color)

    @@ -2136,7 +2181,7 @@

    Arguments

    - + integer, intent(in), @@ -2177,6 +2222,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -2289,7 +2349,7 @@

    Arguments

    -

    private impure subroutine dtimer_stop(this, nloops, message, print) +

    private impure subroutine dtimer_stop(this, nloops, message, print, color)

    @@ -2327,7 +2387,7 @@

    Arguments

    - + integer, intent(in), @@ -2368,6 +2428,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -2436,7 +2511,7 @@

    Arguments

    -

    private impure subroutine print_time(time, message) +

    private impure subroutine print_time(time, message, color)

    @@ -2484,6 +2559,21 @@

    Arguments

    message + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -2516,7 +2606,7 @@

    Arguments

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/ctimer_start.html b/proc/ctimer_start.html index eb83f6f..4938681 100644 --- a/proc/ctimer_start.html +++ b/proc/ctimer_start.html @@ -77,7 +77,7 @@

    ctimer_start
  • 4 statements + title=" 1.7% of total for procedures.">4 statements
  • @@ -451,7 +451,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/ctimer_stop.html b/proc/ctimer_stop.html index b1020c4..200fe9d 100644 --- a/proc/ctimer_stop.html +++ b/proc/ctimer_stop.html @@ -77,7 +77,7 @@

    ctimer_stop
  • 22 statements + title=" 9.7% of total for procedures.">23 statements
  • @@ -142,7 +142,7 @@

    Contents

  • -

    private impure subroutine ctimer_stop(this, nloops, message, print) +

    private impure subroutine ctimer_stop(this, nloops, message, print, color)

    @@ -180,7 +180,7 @@

    Arguments

    - + integer, intent(in), @@ -221,6 +221,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -238,11 +253,11 @@

    Calls

    - + proc~~ctimer_stop~~CallsGraph - + proc~ctimer_stop @@ -264,6 +279,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -586,12 +613,13 @@

    Source Code

    -
       impure subroutine ctimer_stop(this, nloops, message, print)
    +    
       impure subroutine ctimer_stop(this, nloops, message, print, color)
           class(timer), intent(inout)        :: this
           integer,      intent(in), optional :: nloops
           character(*), intent(in), optional :: message
           character(:), allocatable          :: msg
           logical,      intent(in), optional :: print
    +      character(*), intent(in), optional :: color
     
           ! Stop the timer
           call cpu_time(this%cpu_end)
    @@ -611,9 +639,9 @@ 

    Source Code

    end if if (present(print)) then - if (print) call print_time(this%cpu_time, msg) + if (print) call print_time(this%cpu_time, msg, color) else - call print_time(this%cpu_time, msg) + call print_time(this%cpu_time, msg, color) end if ! Deallocate the message @@ -643,7 +671,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/ctimer_write.html b/proc/ctimer_write.html index 5188098..61d94ec 100644 --- a/proc/ctimer_write.html +++ b/proc/ctimer_write.html @@ -77,7 +77,7 @@

    ctimer_write
  • 14 statements + title=" 5.9% of total for procedures.">14 statements
  • @@ -436,7 +436,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/dtimer_start.html b/proc/dtimer_start.html index 70f641f..eae6f20 100644 --- a/proc/dtimer_start.html +++ b/proc/dtimer_start.html @@ -77,7 +77,7 @@

    dtimer_start
  • 4 statements + title=" 1.7% of total for procedures.">4 statements
  • @@ -451,7 +451,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/dtimer_stop.html b/proc/dtimer_stop.html index d62142d..c47484d 100644 --- a/proc/dtimer_stop.html +++ b/proc/dtimer_stop.html @@ -77,7 +77,7 @@

    dtimer_stop
  • 23 statements + title="10.1% of total for procedures.">24 statements
  • @@ -142,7 +142,7 @@

    Contents

  • -

    private impure subroutine dtimer_stop(this, nloops, message, print) +

    private impure subroutine dtimer_stop(this, nloops, message, print, color)

    @@ -180,7 +180,7 @@

    Arguments

    - + integer, intent(in), @@ -221,6 +221,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -238,11 +253,11 @@

    Calls

    - + proc~~dtimer_stop~~CallsGraph - + proc~dtimer_stop @@ -279,6 +294,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -601,13 +628,14 @@

    Source Code

    -
       impure subroutine dtimer_stop(this, nloops, message, print)
    +    
       impure subroutine dtimer_stop(this, nloops, message, print, color)
           class(timer), intent(inout)        :: this
           integer,      intent(in), optional :: nloops
           character(*), intent(in), optional :: message
           character(:), allocatable          :: msg
           logical,      intent(in), optional :: print
           real(rk)                           :: values_elapsed_sec
    +      character(*), intent(in), optional :: color
     
           ! Stop the timer
           call date_and_time(values=this%values_end)
    @@ -629,9 +657,9 @@ 

    Source Code

    end if if (present(print)) then - if (print) call print_time(this%elapsed_dtime, msg) + if (print) call print_time(this%elapsed_dtime, msg, color) else - call print_time(this%elapsed_dtime, msg) + call print_time(this%elapsed_dtime, msg, color) end if ! Deallocate the message @@ -661,7 +689,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/dtimer_write.html b/proc/dtimer_write.html index 45d5fe7..ab04831 100644 --- a/proc/dtimer_write.html +++ b/proc/dtimer_write.html @@ -77,7 +77,7 @@

    dtimer_write
  • 14 statements + title=" 5.9% of total for procedures.">14 statements
  • @@ -436,7 +436,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/mtimer_start.html b/proc/mtimer_start.html index 6ddc330..407cd35 100644 --- a/proc/mtimer_start.html +++ b/proc/mtimer_start.html @@ -77,7 +77,7 @@

    mtimer_start
  • 10 statements + title=" 4.2% of total for procedures.">10 statements
  • @@ -429,7 +429,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/mtimer_stop.html b/proc/mtimer_stop.html index 54ad96b..35e7781 100644 --- a/proc/mtimer_stop.html +++ b/proc/mtimer_stop.html @@ -77,7 +77,7 @@

    mtimer_stop
  • 28 statements + title="12.2% of total for procedures.">29 statements
  • @@ -142,7 +142,7 @@

    Contents

  • -

    private impure subroutine mtimer_stop(this, nloops, message, print) +

    private impure subroutine mtimer_stop(this, nloops, message, print, color)

    @@ -180,7 +180,7 @@

    Arguments

    - + integer, intent(in), @@ -221,6 +221,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -238,11 +253,11 @@

    Calls

    - + proc~~mtimer_stop~~CallsGraph - + proc~mtimer_stop @@ -264,6 +279,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -556,15 +583,16 @@

    Source Code

    -
       impure subroutine mtimer_stop(this, nloops, message, print)
    +    
       impure subroutine mtimer_stop(this, nloops, message, print, color)
           ! include 'mpif.h'
           class(timer), intent(inout)        :: this
           integer,      intent(in), optional :: nloops
           character(*), intent(in), optional :: message
           character(:), allocatable          :: msg
           logical,      intent(in), optional :: print
    +      character(*), intent(in), optional :: color
     
    -      interface
    +      interface
              function mpi_wtime()
                 import rk
                 real(rk) :: mpi_wtime
    @@ -589,9 +617,9 @@ 

    Source Code

    end if if (present(print)) then - if (print) call print_time(this%mpi_time, msg) + if (print) call print_time(this%mpi_time, msg, color) else - call print_time(this%mpi_time, msg) + call print_time(this%mpi_time, msg, color) end if ! Deallocate the message @@ -621,7 +649,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/mtimer_write.html b/proc/mtimer_write.html index ff1828a..44c557f 100644 --- a/proc/mtimer_write.html +++ b/proc/mtimer_write.html @@ -77,7 +77,7 @@

    mtimer_write
  • 14 statements + title=" 5.9% of total for procedures.">14 statements
  • @@ -421,7 +421,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/otimer_start.html b/proc/otimer_start.html index 898b464..6f6f0b6 100644 --- a/proc/otimer_start.html +++ b/proc/otimer_start.html @@ -77,7 +77,7 @@

    otimer_start
  • 5 statements + title=" 2.1% of total for procedures.">5 statements
  • @@ -659,7 +659,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/otimer_stop.html b/proc/otimer_stop.html index 05b6008..2e0cb05 100644 --- a/proc/otimer_stop.html +++ b/proc/otimer_stop.html @@ -77,7 +77,7 @@

    otimer_stop
  • 23 statements + title="10.1% of total for procedures.">24 statements
  • @@ -142,7 +142,7 @@

    Contents

    -

    private impure subroutine otimer_stop(this, nloops, message, print) +

    private impure subroutine otimer_stop(this, nloops, message, print, color)

    Uses

    @@ -300,7 +300,7 @@

    Arguments

    - + integer, intent(in), @@ -341,6 +341,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -358,11 +373,11 @@

    Calls

    - + proc~~otimer_stop~~CallsGraph - + proc~otimer_stop @@ -396,6 +411,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -688,13 +715,14 @@

    Source Code

    -
       impure subroutine otimer_stop(this, nloops, message, print)
    +    
       impure subroutine otimer_stop(this, nloops, message, print, color)
           use omp_lib
           class(timer), intent(inout)        :: this
           integer,      intent(in), optional :: nloops
           character(*), intent(in), optional :: message
           character(:), allocatable          :: msg
           logical,      intent(in), optional :: print
    +      character(*), intent(in), optional :: color
     
           ! Stop the timer
           this%omp_end = omp_get_wtime()
    @@ -714,9 +742,9 @@ 

    Source Code

    end if if (present(print)) then - if (print) call print_time(this%omp_time, msg) + if (print) call print_time(this%omp_time, msg, color) else - call print_time(this%omp_time, msg) + call print_time(this%omp_time, msg, color) end if ! Deallocate the message @@ -746,7 +774,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/otimer_write.html b/proc/otimer_write.html index b0e3432..818c4dd 100644 --- a/proc/otimer_write.html +++ b/proc/otimer_write.html @@ -77,7 +77,7 @@

    otimer_write
  • 15 statements + title=" 6.3% of total for procedures.">15 statements
  • @@ -542,7 +542,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/print_time.html b/proc/print_time.html index 7b973b7..81c20e7 100644 --- a/proc/print_time.html +++ b/proc/print_time.html @@ -77,7 +77,7 @@

    print_time
  • 5 statements + title=" 4.6% of total for procedures.">11 statements
  • @@ -142,9 +142,126 @@

    Contents

    -

    private impure subroutine print_time(time, message) +

    private impure subroutine print_time(time, message, color)

    - +
    +

    Uses

    +
    +
      +
    • +
        +
      • face
      • +
      +
    • +
    • +
      + + + + + +proc~~print_time~~UsesGraph + + + +proc~print_time + +print_time + + + +face + +face + + + +proc~print_time->face + + + + + +
      + Help +
      + +
    • +
    +
    +
    + @@ -187,6 +304,21 @@

    Arguments

    message + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -195,6 +327,123 @@

    Arguments


    +

    Calls

    +
    +
    +
    + + + + + +proc~~print_time~~CallsGraph + + + +proc~print_time + +print_time + + + +colorize + +colorize + + + +proc~print_time->colorize + + + + + +
    + Help +
    + +
    +
    +
    +

    Called by

    @@ -927,12 +1176,18 @@

    Source Code

    -
       impure subroutine print_time(time, message)
    +    
       impure subroutine print_time(time, message, color)
    +      use face
           real(rk),     intent(in) :: time
           character(*), intent(in) :: message
    +      character(*), intent(in), optional :: color
     
    -      print '(A, F16.9, " [s]")', trim(message), time
    -   end subroutine print_time
    +      if (present(color)) then
    +         print '(A, F16.9, A)', colorize(trim(message), color_fg=trim(color)), time, colorize(" [s]", color_fg=trim(color))
    +      else
    +         print '(A, F16.9, A)', colorize(trim(message), color_fg='blue'), time, colorize(" [s]", color_fg='blue')
    +      end if
    +   end subroutine print_time
     
    @@ -956,7 +1211,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/timer_start.html b/proc/timer_start.html index c00730c..d2602b2 100644 --- a/proc/timer_start.html +++ b/proc/timer_start.html @@ -77,7 +77,7 @@

    timer_start
  • 5 statements + title=" 2.1% of total for procedures.">5 statements
  • @@ -454,7 +454,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/timer_stop.html b/proc/timer_stop.html index a0243a9..44e876a 100644 --- a/proc/timer_stop.html +++ b/proc/timer_stop.html @@ -77,7 +77,7 @@

    timer_stop
  • 22 statements + title=" 9.7% of total for procedures.">23 statements
  • @@ -142,7 +142,7 @@

    Contents

    -

    private impure subroutine timer_stop(this, nloops, message, print) +

    private impure subroutine timer_stop(this, nloops, message, print, color)

    @@ -180,7 +180,7 @@

    Arguments

    - + integer, intent(in), @@ -221,6 +221,21 @@

    Arguments

    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -238,11 +253,11 @@

    Calls

    - + proc~~timer_stop~~CallsGraph - + proc~timer_stop @@ -264,6 +279,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -586,12 +613,13 @@

    Source Code

    -
       impure subroutine timer_stop(this, nloops, message, print)
    +    
       impure subroutine timer_stop(this, nloops, message, print, color)
           class(timer), intent(inout)        :: this
           integer,      intent(in), optional :: nloops
           character(*), intent(in), optional :: message
           character(:), allocatable          :: msg
           logical,      intent(in), optional :: print
    +      character(*), intent(in), optional :: color
     
           ! Stop the timer
           call system_clock(count=this%clock_end)
    @@ -613,9 +641,9 @@ 

    Source Code

    end if if (present(print)) then - if (print) call print_time(this%elapsed_time, msg) + if (print) call print_time(this%elapsed_time, msg, color) else - call print_time(this%elapsed_time, msg) + call print_time(this%elapsed_time, msg, color) end if ! Deallocate the message @@ -645,7 +673,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/proc/timer_write.html b/proc/timer_write.html index 0ce72bc..298d570 100644 --- a/proc/timer_write.html +++ b/proc/timer_write.html @@ -77,7 +77,7 @@

    timer_write
  • 14 statements + title=" 5.9% of total for procedures.">14 statements
  • @@ -436,7 +436,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


  • diff --git a/proc/to_seconds.html b/proc/to_seconds.html index 53bd4af..b36b487 100644 --- a/proc/to_seconds.html +++ b/proc/to_seconds.html @@ -77,7 +77,7 @@

    to_seconds
  • 5 statements + title=" 2.1% of total for procedures.">5 statements
  • @@ -473,7 +473,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/program/example1.html b/program/example1.html index 0b29bb9..052e5c1 100644 --- a/program/example1.html +++ b/program/example1.html @@ -114,7 +114,7 @@

    Variables

    - t + t
    @@ -296,11 +296,11 @@

    Calls

    - + program~~example1~~CallsGraph - + program~example1 @@ -352,6 +352,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -451,7 +463,7 @@

    Variables

    - + type(timer) @@ -516,7 +528,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/program/example2.html b/program/example2.html index 210e017..90ec96c 100644 --- a/program/example2.html +++ b/program/example2.html @@ -114,9 +114,9 @@

    Variables

    - t - nl - nloops + t + nl + nloops
    @@ -298,11 +298,11 @@

    Calls

    - + program~~example2~~CallsGraph - + program~example2 @@ -369,6 +369,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -468,7 +480,7 @@

    Variables

    - + type(timer) @@ -484,7 +496,7 @@

    Variables

    - + integer @@ -500,7 +512,7 @@

    Variables

    - + integer @@ -543,7 +555,7 @@

    Source Code

    do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%timer_stop(nloops = nloops, message = 'Elapsed time:', print = .true.) ! nloops, message and print are optional. + call t%timer_stop(nloops = nloops, message = 'Elapsed time:', print = .true., color='green') ! nloops, message, print and color are optional. call t%timer_write('example/example2_etimes') ! Optionally, write the elapsed time to a file end program example2 @@ -569,7 +581,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/program/example3.html b/program/example3.html index 80029ee..1cdecb8 100644 --- a/program/example3.html +++ b/program/example3.html @@ -114,7 +114,7 @@

    Variables

    - t + t
    @@ -296,11 +296,11 @@

    Calls

    - + program~~example3~~CallsGraph - + program~example3 @@ -352,6 +352,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -451,7 +463,7 @@

    Variables

    - + type(timer) @@ -516,7 +528,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/program/example4.html b/program/example4.html index 3d5afe9..95d3d02 100644 --- a/program/example4.html +++ b/program/example4.html @@ -114,9 +114,9 @@

    Variables

    - t - nl - nloops + t + nl + nloops
    @@ -298,11 +298,11 @@

    Calls

    - + program~~example4~~CallsGraph - + program~example4 @@ -369,6 +369,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -468,7 +480,7 @@

    Variables

    - + type(timer) @@ -484,7 +496,7 @@

    Variables

    - + integer @@ -500,7 +512,7 @@

    Variables

    - + integer @@ -543,7 +555,7 @@

    Source Code

    do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%ctimer_stop(nloops = nloops, message = 'CPU time:', print = .true.) ! nloops, message and print are optional + call t%ctimer_stop(nloops = nloops, message = 'CPU time:', print = .true., color='yellow') ! nloops, message, print and color are optional. call t%ctimer_write('example/example4_ctimes') ! Optionally, write the elapsed time to a file end program example4 @@ -569,7 +581,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/program/example5.html b/program/example5.html index 05d057c..ceb5050 100644 --- a/program/example5.html +++ b/program/example5.html @@ -114,7 +114,7 @@

    Variables

    - t + t
    @@ -296,11 +296,11 @@

    Calls

    - + program~~example5~~CallsGraph - + program~example5 @@ -367,6 +367,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -466,7 +478,7 @@

    Variables

    - + type(timer) @@ -531,7 +543,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/program/example6.html b/program/example6.html index 6fc5d2b..6528a03 100644 --- a/program/example6.html +++ b/program/example6.html @@ -114,9 +114,9 @@

    Variables

    - t - nl - nloops + t + nl + nloops
    @@ -298,11 +298,11 @@

    Calls

    - + program~~example6~~CallsGraph - + program~example6 @@ -384,6 +384,18 @@

    Calls

    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
    @@ -483,7 +495,7 @@

    Variables

    - + type(timer) @@ -499,7 +511,7 @@

    Variables

    - + integer @@ -515,7 +527,7 @@

    Variables

    - + integer @@ -558,7 +570,7 @@

    Source Code

    do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%dtimer_stop(nloops = nloops, message = 'Elapsed time:', print = .true.) ! nloops, message and print are optional. + call t%dtimer_stop(nloops = nloops, message = 'Elapsed time:', print = .true., color='red') ! nloops, message, print and color are optional. call t%dtimer_write('example/example6_etimes') ! Optionally, write the elapsed time to a file end program example6 @@ -584,7 +596,7 @@

    Source Code

    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

    + on 2024-04-22T09:42:49.196740


    diff --git a/program/test1.html b/program/test1.html index a727126..4b650b7 100644 --- a/program/test1.html +++ b/program/test1.html @@ -114,8 +114,8 @@

    Variables

    - t - ut + t + ut
    @@ -157,9 +157,9 @@

    Uses

      • -
      • forunittest
      • -
      • kinds
      • fortime
      • +
      • kinds
      • +
      • forunittest
    • @@ -317,11 +317,11 @@

      Calls

      - + program~~test1~~CallsGraph - + program~test1 @@ -385,6 +385,18 @@

      Calls

      + + +colorize + +colorize + + + +proc~print_time->colorize + + +
      @@ -484,7 +496,7 @@

      Variables

      - + type(timer) @@ -500,7 +512,7 @@

      Variables

      - + type(unit_test) @@ -572,7 +584,7 @@

      Source Code

      Documentation generated by FORD - on 2024-04-22T08:06:45.443687

      + on 2024-04-22T09:42:49.196740


      diff --git a/program/test10.html b/program/test10.html index c4ad051..272f470 100644 --- a/program/test10.html +++ b/program/test10.html @@ -114,9 +114,9 @@

      Variables

      - t - ut - ierr + t + ut + ierr
      @@ -158,9 +158,9 @@

      Uses

        • -
        • forunittest
        • -
        • kinds
        • fortime
        • +
        • kinds
        • +
        • forunittest
      • @@ -318,11 +318,11 @@

        Calls

        - + program~~test10~~CallsGraph - + program~test10 @@ -410,6 +410,18 @@

        Calls

        + + +colorize + +colorize + + + +proc~print_time->colorize + + +
        @@ -509,7 +521,7 @@

        Variables

        - + type(timer) @@ -525,7 +537,7 @@

        Variables

        - + type(unit_test) @@ -541,7 +553,7 @@

        Variables

        - + integer @@ -619,7 +631,7 @@

        Source Code

        Documentation generated by FORD - on 2024-04-22T08:06:45.443687

        + on 2024-04-22T09:42:49.196740


        diff --git a/program/test11.html b/program/test11.html index beb8e41..842f896 100644 --- a/program/test11.html +++ b/program/test11.html @@ -114,11 +114,11 @@

        Variables

        - t + t ut - nl - nloops - ierr + nl + nloops + ierr
        @@ -160,9 +160,9 @@

        Uses

          • -
          • forunittest
          • -
          • kinds
          • fortime
          • +
          • kinds
          • +
          • forunittest
        • @@ -320,11 +320,11 @@

          Calls

          - + program~~test11~~CallsGraph - + program~test11 @@ -427,6 +427,18 @@

          Calls

          + + +colorize + +colorize + + + +proc~print_time->colorize + + +
          @@ -526,7 +538,7 @@

          Variables

          - + type(timer) @@ -558,7 +570,7 @@

          Variables

          - + integer @@ -574,7 +586,7 @@

          Variables

          - + integer @@ -590,7 +602,7 @@

          Variables

          - + integer @@ -672,7 +684,7 @@

          Source Code

          Documentation generated by FORD - on 2024-04-22T08:06:45.443687

          + on 2024-04-22T09:42:49.196740


          diff --git a/program/test12.html b/program/test12.html index 3ccd3c9..8feae07 100644 --- a/program/test12.html +++ b/program/test12.html @@ -114,11 +114,11 @@

          Variables

          - t - ut - nl - nloops - ierr + t + ut + nl + nloops + ierr
          @@ -160,9 +160,9 @@

          Uses

            • -
            • forunittest
            • -
            • kinds
            • fortime
            • +
            • kinds
            • +
            • forunittest
          • @@ -320,11 +320,11 @@

            Calls

            - + program~~test12~~CallsGraph - + program~test12 @@ -427,6 +427,18 @@

            Calls

            + + +colorize + +colorize + + + +proc~print_time->colorize + + +
            @@ -526,7 +538,7 @@

            Variables

            - + type(timer) @@ -542,7 +554,7 @@

            Variables

            - + type(unit_test) @@ -558,7 +570,7 @@

            Variables

            - + integer @@ -574,7 +586,7 @@

            Variables

            - + integer @@ -590,7 +602,7 @@

            Variables

            - + integer @@ -672,7 +684,7 @@

            Source Code

            Documentation generated by FORD - on 2024-04-22T08:06:45.443687

            + on 2024-04-22T09:42:49.196740


            diff --git a/program/test13.html b/program/test13.html index 553ffb8..ff07267 100644 --- a/program/test13.html +++ b/program/test13.html @@ -114,8 +114,8 @@

            Variables

            - t - ut + t + ut
            @@ -157,9 +157,9 @@

            Uses

              • -
              • forunittest
              • -
              • kinds
              • fortime
              • +
              • kinds
              • +
              • forunittest
            • @@ -317,11 +317,11 @@

              Calls

              - + program~~test13~~CallsGraph - + program~test13 @@ -385,6 +385,18 @@

              Calls

              + + +colorize + +colorize + + + +proc~print_time->colorize + + +
              @@ -484,7 +496,7 @@

              Variables

              - + type(timer) @@ -500,7 +512,7 @@

              Variables

              - + type(unit_test) @@ -572,7 +584,7 @@

              Source Code

              Documentation generated by FORD - on 2024-04-22T08:06:45.443687

              + on 2024-04-22T09:42:49.196740


              diff --git a/program/test14.html b/program/test14.html index b2a40af..a9af5a2 100644 --- a/program/test14.html +++ b/program/test14.html @@ -114,10 +114,10 @@

              Variables

              - t - ut - nl - nloops + t + ut + nl + nloops
              @@ -159,9 +159,9 @@

              Uses

                • -
                • forunittest
                • -
                • kinds
                • fortime
                • +
                • kinds
                • +
                • forunittest
              • @@ -319,11 +319,11 @@

                Calls

                - + program~~test14~~CallsGraph - + program~test14 @@ -402,6 +402,18 @@

                Calls

                + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                @@ -501,7 +513,7 @@

                Variables

                - + type(timer) @@ -517,7 +529,7 @@

                Variables

                - + type(unit_test) @@ -533,7 +545,7 @@

                Variables

                - + integer @@ -549,7 +561,7 @@

                Variables

                - + integer @@ -625,7 +637,7 @@

                Source Code

                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                + on 2024-04-22T09:42:49.196740


                diff --git a/program/test15.html b/program/test15.html index 097c661..9c9c1cf 100644 --- a/program/test15.html +++ b/program/test15.html @@ -114,10 +114,10 @@

                Variables

                - t - ut - nl - nloops + t + ut + nl + nloops
                @@ -159,9 +159,9 @@

                Uses

                  • -
                  • forunittest
                  • -
                  • kinds
                  • fortime
                  • +
                  • kinds
                  • +
                  • forunittest
                • @@ -319,11 +319,11 @@

                  Calls

                  - + program~~test15~~CallsGraph - + program~test15 @@ -402,6 +402,18 @@

                  Calls

                  + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                  @@ -501,7 +513,7 @@

                  Variables

                  - + type(timer) @@ -517,7 +529,7 @@

                  Variables

                  - + type(unit_test) @@ -533,7 +545,7 @@

                  Variables

                  - + integer @@ -549,7 +561,7 @@

                  Variables

                  - + integer @@ -625,7 +637,7 @@

                  Source Code

                  Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                  + on 2024-04-22T09:42:49.196740


                  diff --git a/program/test16.html b/program/test16.html index 4ba9ecf..08e9555 100644 --- a/program/test16.html +++ b/program/test16.html @@ -114,7 +114,7 @@

                  Variables

                  - t + t
                  @@ -156,8 +156,8 @@

                  Uses

                  • @@ -303,11 +303,11 @@

                    Calls

                    - + program~~test16~~CallsGraph - + program~test16 @@ -359,6 +359,18 @@

                    Calls

                    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                    @@ -458,7 +470,7 @@

                    Variables

                    - + type(timer) @@ -526,7 +538,7 @@

                    Source Code

                    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                    + on 2024-04-22T09:42:49.196740


                    diff --git a/program/test17.html b/program/test17.html index 2bc9627..3e3b341 100644 --- a/program/test17.html +++ b/program/test17.html @@ -114,9 +114,9 @@

                    Variables

                    - t - nl - nloops + t + nl + nloops
                    @@ -158,8 +158,8 @@

                    Uses

                    • @@ -305,11 +305,11 @@

                      Calls

                      - + program~~test17~~CallsGraph - + program~test17 @@ -376,6 +376,18 @@

                      Calls

                      + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                      @@ -475,7 +487,7 @@

                      Variables

                      - + type(timer) @@ -491,7 +503,7 @@

                      Variables

                      - + integer @@ -507,7 +519,7 @@

                      Variables

                      - + integer @@ -579,7 +591,7 @@

                      Source Code

                      Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                      + on 2024-04-22T09:42:49.196740


                      diff --git a/program/test18.html b/program/test18.html index 6ffe786..366ab86 100644 --- a/program/test18.html +++ b/program/test18.html @@ -114,9 +114,9 @@

                      Variables

                      - t - nl - nloops + t + nl + nloops
                      @@ -158,8 +158,8 @@

                      Uses

                      • @@ -305,11 +305,11 @@

                        Calls

                        - + program~~test18~~CallsGraph - + program~test18 @@ -376,6 +376,18 @@

                        Calls

                        + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                        @@ -475,7 +487,7 @@

                        Variables

                        - + type(timer) @@ -491,7 +503,7 @@

                        Variables

                        - + integer @@ -507,7 +519,7 @@

                        Variables

                        - + integer @@ -579,7 +591,7 @@

                        Source Code

                        Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                        + on 2024-04-22T09:42:49.196740


                        diff --git a/program/test19.html b/program/test19.html index 404f971..af10429 100644 --- a/program/test19.html +++ b/program/test19.html @@ -114,8 +114,8 @@

                        Variables

                        - t - ut + t + ut
                        @@ -157,9 +157,9 @@

                        Uses

                          • -
                          • forunittest
                          • -
                          • kinds
                          • fortime
                          • +
                          • kinds
                          • +
                          • forunittest
                        • @@ -317,11 +317,11 @@

                          Calls

                          - + program~~test19~~CallsGraph - + program~test19 @@ -403,6 +403,18 @@

                          Calls

                          + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                          @@ -502,7 +514,7 @@

                          Variables

                          - + type(timer) @@ -518,7 +530,7 @@

                          Variables

                          - + type(unit_test) @@ -592,7 +604,7 @@

                          Source Code

                          Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                          + on 2024-04-22T09:42:49.196740


                          diff --git a/program/test2.html b/program/test2.html index d52d9d4..de1204d 100644 --- a/program/test2.html +++ b/program/test2.html @@ -114,10 +114,10 @@

                          Variables

                          - t - ut - nl - nloops + t + ut + nl + nloops
                          @@ -159,9 +159,9 @@

                          Uses

                            • -
                            • forunittest
                            • -
                            • kinds
                            • fortime
                            • +
                            • kinds
                            • +
                            • forunittest
                          • @@ -319,11 +319,11 @@

                            Calls

                            - + program~~test2~~CallsGraph - + program~test2 @@ -402,6 +402,18 @@

                            Calls

                            + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                            @@ -501,7 +513,7 @@

                            Variables

                            - + type(timer) @@ -517,7 +529,7 @@

                            Variables

                            - + type(unit_test) @@ -533,7 +545,7 @@

                            Variables

                            - + integer @@ -549,7 +561,7 @@

                            Variables

                            - + integer @@ -625,7 +637,7 @@

                            Source Code

                            Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                            + on 2024-04-22T09:42:49.196740


                            diff --git a/program/test20.html b/program/test20.html index 05fc437..1c96d45 100644 --- a/program/test20.html +++ b/program/test20.html @@ -114,10 +114,10 @@

                            Variables

                            - t - ut - nl - nloops + t + ut + nl + nloops
                            @@ -159,9 +159,9 @@

                            Uses

                              • -
                              • forunittest
                              • -
                              • kinds
                              • fortime
                              • +
                              • kinds
                              • +
                              • forunittest
                            • @@ -319,11 +319,11 @@

                              Calls

                              - + program~~test20~~CallsGraph - + program~test20 @@ -420,6 +420,18 @@

                              Calls

                              + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                              @@ -519,7 +531,7 @@

                              Variables

                              - + type(timer) @@ -535,7 +547,7 @@

                              Variables

                              - + type(unit_test) @@ -551,7 +563,7 @@

                              Variables

                              - + integer @@ -567,7 +579,7 @@

                              Variables

                              - + integer @@ -646,7 +658,7 @@

                              Source Code

                              Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                              + on 2024-04-22T09:42:49.196740


                              diff --git a/program/test21.html b/program/test21.html index 0f2c484..6fa2080 100644 --- a/program/test21.html +++ b/program/test21.html @@ -159,9 +159,9 @@

                              Uses

                                • -
                                • forunittest
                                • -
                                • kinds
                                • fortime
                                • +
                                • kinds
                                • +
                                • forunittest
                              • @@ -319,11 +319,11 @@

                                Calls

                                - + program~~test21~~CallsGraph - + program~test21 @@ -420,6 +420,18 @@

                                Calls

                                + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                @@ -646,7 +658,7 @@

                                Source Code

                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                + on 2024-04-22T09:42:49.196740


                                diff --git a/program/test22.html b/program/test22.html index 00e4614..dfb5124 100644 --- a/program/test22.html +++ b/program/test22.html @@ -114,9 +114,9 @@

                                Variables

                                - t - ut - ierr + t + ut + ierr
                                @@ -158,9 +158,9 @@

                                Uses

                                  • -
                                  • forunittest
                                  • -
                                  • kinds
                                  • fortime
                                  • +
                                  • kinds
                                  • +
                                  • forunittest
                                • @@ -318,11 +318,11 @@

                                  Calls

                                  - + program~~test22~~CallsGraph - + program~test22 @@ -410,6 +410,18 @@

                                  Calls

                                  + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                  @@ -509,7 +521,7 @@

                                  Variables

                                  - + type(timer) @@ -525,7 +537,7 @@

                                  Variables

                                  - + type(unit_test) @@ -541,7 +553,7 @@

                                  Variables

                                  - + integer @@ -619,7 +631,7 @@

                                  Source Code

                                  Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                  + on 2024-04-22T09:42:49.196740


                                  diff --git a/program/test23.html b/program/test23.html index b146524..e675c19 100644 --- a/program/test23.html +++ b/program/test23.html @@ -114,11 +114,11 @@

                                  Variables

                                  - t - ut - nl - nloops - ierr + t + ut + nl + nloops + ierr
                                  @@ -160,9 +160,9 @@

                                  Uses

                                    • -
                                    • forunittest
                                    • -
                                    • kinds
                                    • fortime
                                    • +
                                    • kinds
                                    • +
                                    • forunittest
                                  • @@ -320,11 +320,11 @@

                                    Calls

                                    - + program~~test23~~CallsGraph - + program~test23 @@ -427,6 +427,18 @@

                                    Calls

                                    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                    @@ -526,7 +538,7 @@

                                    Variables

                                    - + type(timer) @@ -542,7 +554,7 @@

                                    Variables

                                    - + type(unit_test) @@ -558,7 +570,7 @@

                                    Variables

                                    - + integer @@ -574,7 +586,7 @@

                                    Variables

                                    - + integer @@ -590,7 +602,7 @@

                                    Variables

                                    - + integer @@ -672,7 +684,7 @@

                                    Source Code

                                    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                    + on 2024-04-22T09:42:49.196740


                                    diff --git a/program/test24.html b/program/test24.html index 6ab1061..9087da5 100644 --- a/program/test24.html +++ b/program/test24.html @@ -114,11 +114,11 @@

                                    Variables

                                    - t - ut - nl - nloops - ierr + t + ut + nl + nloops + ierr
                                    @@ -160,9 +160,9 @@

                                    Uses

                                      • -
                                      • forunittest
                                      • -
                                      • kinds
                                      • fortime
                                      • +
                                      • kinds
                                      • +
                                      • forunittest
                                    • @@ -320,11 +320,11 @@

                                      Calls

                                      - + program~~test24~~CallsGraph - + program~test24 @@ -427,6 +427,18 @@

                                      Calls

                                      + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                      @@ -526,7 +538,7 @@

                                      Variables

                                      - + type(timer) @@ -542,7 +554,7 @@

                                      Variables

                                      - + type(unit_test) @@ -558,7 +570,7 @@

                                      Variables

                                      - + integer @@ -574,7 +586,7 @@

                                      Variables

                                      - + integer @@ -590,7 +602,7 @@

                                      Variables

                                      - + integer @@ -672,7 +684,7 @@

                                      Source Code

                                      Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                      + on 2024-04-22T09:42:49.196740


                                      diff --git a/program/test25.html b/program/test25.html index 320e0b9..89fb6fc 100644 --- a/program/test25.html +++ b/program/test25.html @@ -114,8 +114,8 @@

                                      Variables

                                      - t - ut + t + ut
                                      @@ -157,9 +157,9 @@

                                      Uses

                                        • -
                                        • forunittest
                                        • -
                                        • kinds
                                        • fortime
                                        • +
                                        • kinds
                                        • +
                                        • forunittest
                                      • @@ -317,11 +317,11 @@

                                        Calls

                                        - + program~~test25~~CallsGraph - + program~test25 @@ -400,6 +400,18 @@

                                        Calls

                                        + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                        @@ -499,7 +511,7 @@

                                        Variables

                                        - + type(timer) @@ -515,7 +527,7 @@

                                        Variables

                                        - + type(unit_test) @@ -587,7 +599,7 @@

                                        Source Code

                                        Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                        + on 2024-04-22T09:42:49.196740


                                        diff --git a/program/test26.html b/program/test26.html index a36bb31..32f0421 100644 --- a/program/test26.html +++ b/program/test26.html @@ -114,10 +114,10 @@

                                        Variables

                                        - t - ut - nl - nloops + t + ut + nl + nloops
                                        @@ -159,9 +159,9 @@

                                        Uses

                                          • -
                                          • forunittest
                                          • -
                                          • kinds
                                          • fortime
                                          • +
                                          • kinds
                                          • +
                                          • forunittest
                                        • @@ -319,11 +319,11 @@

                                          Calls

                                          - + program~~test26~~CallsGraph - + program~test26 @@ -417,6 +417,18 @@

                                          Calls

                                          + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                          @@ -516,7 +528,7 @@

                                          Variables

                                          - + type(timer) @@ -532,7 +544,7 @@

                                          Variables

                                          - + type(unit_test) @@ -548,7 +560,7 @@

                                          Variables

                                          - + integer @@ -564,7 +576,7 @@

                                          Variables

                                          - + integer @@ -640,7 +652,7 @@

                                          Source Code

                                          Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                          + on 2024-04-22T09:42:49.196740


                                          diff --git a/program/test27.html b/program/test27.html index 93f07a6..a2643c4 100644 --- a/program/test27.html +++ b/program/test27.html @@ -114,10 +114,10 @@

                                          Variables

                                          - t - ut - nl - nloops + t + ut + nl + nloops
                                          @@ -159,9 +159,9 @@

                                          Uses

                                            • -
                                            • forunittest
                                            • -
                                            • kinds
                                            • fortime
                                            • +
                                            • kinds
                                            • +
                                            • forunittest
                                          • @@ -319,11 +319,11 @@

                                            Calls

                                            - + program~~test27~~CallsGraph - + program~test27 @@ -417,6 +417,18 @@

                                            Calls

                                            + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                            @@ -516,7 +528,7 @@

                                            Variables

                                            - + type(timer) @@ -532,7 +544,7 @@

                                            Variables

                                            - + type(unit_test) @@ -548,7 +560,7 @@

                                            Variables

                                            - + integer @@ -564,7 +576,7 @@

                                            Variables

                                            - + integer @@ -640,7 +652,7 @@

                                            Source Code

                                            Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                            + on 2024-04-22T09:42:49.196740


                                            diff --git a/program/test28.html b/program/test28.html index ec6bff9..8c31f79 100644 --- a/program/test28.html +++ b/program/test28.html @@ -114,8 +114,8 @@

                                            Variables

                                            - t - ut + t + ut
                                            @@ -157,9 +157,9 @@

                                            Uses

                                              • -
                                              • forunittest
                                              • -
                                              • kinds
                                              • fortime
                                              • +
                                              • kinds
                                              • +
                                              • forunittest
                                            • @@ -317,11 +317,11 @@

                                              Calls

                                              - + program~~test28~~CallsGraph - + program~test28 @@ -400,6 +400,18 @@

                                              Calls

                                              + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                              @@ -499,7 +511,7 @@

                                              Variables

                                              - + type(timer) @@ -515,7 +527,7 @@

                                              Variables

                                              - + type(unit_test) @@ -587,7 +599,7 @@

                                              Source Code

                                              Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                              + on 2024-04-22T09:42:49.196740


                                              diff --git a/program/test29.html b/program/test29.html index f01d64b..970b7bc 100644 --- a/program/test29.html +++ b/program/test29.html @@ -114,10 +114,10 @@

                                              Variables

                                              - t + t ut - nl - nloops + nl + nloops
                                              @@ -159,9 +159,9 @@

                                              Uses

                                                • -
                                                • forunittest
                                                • -
                                                • kinds
                                                • fortime
                                                • +
                                                • kinds
                                                • +
                                                • forunittest
                                              • @@ -319,11 +319,11 @@

                                                Calls

                                                - + program~~test29~~CallsGraph - + program~test29 @@ -417,6 +417,18 @@

                                                Calls

                                                + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                @@ -516,7 +528,7 @@

                                                Variables

                                                - + type(timer) @@ -548,7 +560,7 @@

                                                Variables

                                                - + integer @@ -564,7 +576,7 @@

                                                Variables

                                                - + integer @@ -640,7 +652,7 @@

                                                Source Code

                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                + on 2024-04-22T09:42:49.196740


                                                diff --git a/program/test3.html b/program/test3.html index 53786cf..b5a2154 100644 --- a/program/test3.html +++ b/program/test3.html @@ -114,10 +114,10 @@

                                                Variables

                                                - t - ut - nl - nloops + t + ut + nl + nloops
                                                @@ -159,9 +159,9 @@

                                                Uses

                                                  • -
                                                  • forunittest
                                                  • -
                                                  • kinds
                                                  • fortime
                                                  • +
                                                  • kinds
                                                  • +
                                                  • forunittest
                                                • @@ -319,11 +319,11 @@

                                                  Calls

                                                  - + program~~test3~~CallsGraph - + program~test3 @@ -402,6 +402,18 @@

                                                  Calls

                                                  + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                  @@ -501,7 +513,7 @@

                                                  Variables

                                                  - + type(timer) @@ -517,7 +529,7 @@

                                                  Variables

                                                  - + type(unit_test) @@ -533,7 +545,7 @@

                                                  Variables

                                                  - + integer @@ -549,7 +561,7 @@

                                                  Variables

                                                  - + integer @@ -625,7 +637,7 @@

                                                  Source Code

                                                  Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                  + on 2024-04-22T09:42:49.196740


                                                  diff --git a/program/test30.html b/program/test30.html index b4b3533..d406eec 100644 --- a/program/test30.html +++ b/program/test30.html @@ -114,10 +114,10 @@

                                                  Variables

                                                  - t - ut - nl - nloops + t + ut + nl + nloops
                                                  @@ -159,9 +159,9 @@

                                                  Uses

                                                    • -
                                                    • forunittest
                                                    • -
                                                    • kinds
                                                    • fortime
                                                    • +
                                                    • kinds
                                                    • +
                                                    • forunittest
                                                  • @@ -319,11 +319,11 @@

                                                    Calls

                                                    - + program~~test30~~CallsGraph - + program~test30 @@ -417,6 +417,18 @@

                                                    Calls

                                                    + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                    @@ -516,7 +528,7 @@

                                                    Variables

                                                    - + type(timer) @@ -532,7 +544,7 @@

                                                    Variables

                                                    - + type(unit_test) @@ -548,7 +560,7 @@

                                                    Variables

                                                    - + integer @@ -564,7 +576,7 @@

                                                    Variables

                                                    - + integer @@ -640,7 +652,7 @@

                                                    Source Code

                                                    Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                    + on 2024-04-22T09:42:49.196740


                                                    diff --git a/program/test4.html b/program/test4.html index 68f14e6..00e16c3 100644 --- a/program/test4.html +++ b/program/test4.html @@ -114,7 +114,7 @@

                                                    Variables

                                                    - t + t
                                                    @@ -156,8 +156,8 @@

                                                    Uses

                                                    • @@ -303,11 +303,11 @@

                                                      Calls

                                                      - + program~~test4~~CallsGraph - + program~test4 @@ -359,6 +359,18 @@

                                                      Calls

                                                      + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                      @@ -458,7 +470,7 @@

                                                      Variables

                                                      - + type(timer) @@ -526,7 +538,7 @@

                                                      Source Code

                                                      Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                      + on 2024-04-22T09:42:49.196740


                                                      diff --git a/program/test5.html b/program/test5.html index 6822dae..5d693cb 100644 --- a/program/test5.html +++ b/program/test5.html @@ -115,8 +115,8 @@

                                                      Variables

                                                      t - nl - nloops + nl + nloops
                                                      @@ -158,8 +158,8 @@

                                                      Uses

                                                      • @@ -305,11 +305,11 @@

                                                        Calls

                                                        - + program~~test5~~CallsGraph - + program~test5 @@ -376,6 +376,18 @@

                                                        Calls

                                                        + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                        @@ -491,7 +503,7 @@

                                                        Variables

                                                        - + integer @@ -507,7 +519,7 @@

                                                        Variables

                                                        - + integer @@ -579,7 +591,7 @@

                                                        Source Code

                                                        Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                        + on 2024-04-22T09:42:49.196740


                                                        diff --git a/program/test6.html b/program/test6.html index ef503cf..dada5e4 100644 --- a/program/test6.html +++ b/program/test6.html @@ -114,9 +114,9 @@

                                                        Variables

                                                        - t - nl - nloops + t + nl + nloops
                                                        @@ -158,8 +158,8 @@

                                                        Uses

                                                        • @@ -305,11 +305,11 @@

                                                          Calls

                                                          - + program~~test6~~CallsGraph - + program~test6 @@ -376,6 +376,18 @@

                                                          Calls

                                                          + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                          @@ -475,7 +487,7 @@

                                                          Variables

                                                          - + type(timer) @@ -491,7 +503,7 @@

                                                          Variables

                                                          - + integer @@ -507,7 +519,7 @@

                                                          Variables

                                                          - + integer @@ -579,7 +591,7 @@

                                                          Source Code

                                                          Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                          + on 2024-04-22T09:42:49.196740


                                                          diff --git a/program/test7.html b/program/test7.html index c186dc0..77b0d40 100644 --- a/program/test7.html +++ b/program/test7.html @@ -114,8 +114,8 @@

                                                          Variables

                                                          - t - ut + t + ut
                                                          @@ -157,9 +157,9 @@

                                                          Uses

                                                            • -
                                                            • forunittest
                                                            • -
                                                            • kinds
                                                            • fortime
                                                            • +
                                                            • kinds
                                                            • +
                                                            • forunittest
                                                          • @@ -317,11 +317,11 @@

                                                            Calls

                                                            - + program~~test7~~CallsGraph - + program~test7 @@ -403,6 +403,18 @@

                                                            Calls

                                                            + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                            @@ -502,7 +514,7 @@

                                                            Variables

                                                            - + type(timer) @@ -518,7 +530,7 @@

                                                            Variables

                                                            - + type(unit_test) @@ -592,7 +604,7 @@

                                                            Source Code

                                                            Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                            + on 2024-04-22T09:42:49.196740


                                                            diff --git a/program/test8.html b/program/test8.html index ef751b0..01883db 100644 --- a/program/test8.html +++ b/program/test8.html @@ -114,10 +114,10 @@

                                                            Variables

                                                            - t - ut - nl - nloops + t + ut + nl + nloops
                                                            @@ -159,9 +159,9 @@

                                                            Uses

                                                              • -
                                                              • forunittest
                                                              • -
                                                              • kinds
                                                              • fortime
                                                              • +
                                                              • kinds
                                                              • +
                                                              • forunittest
                                                            • @@ -319,11 +319,11 @@

                                                              Calls

                                                              - + program~~test8~~CallsGraph - + program~test8 @@ -420,6 +420,18 @@

                                                              Calls

                                                              + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                              @@ -519,7 +531,7 @@

                                                              Variables

                                                              - + type(timer) @@ -535,7 +547,7 @@

                                                              Variables

                                                              - + type(unit_test) @@ -551,7 +563,7 @@

                                                              Variables

                                                              - + integer @@ -567,7 +579,7 @@

                                                              Variables

                                                              - + integer @@ -646,7 +658,7 @@

                                                              Source Code

                                                              Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                              + on 2024-04-22T09:42:49.196740


                                                              diff --git a/program/test9.html b/program/test9.html index d7b3e0b..66a9e34 100644 --- a/program/test9.html +++ b/program/test9.html @@ -114,10 +114,10 @@

                                                              Variables

                                                              - t - ut - nl - nloops + t + ut + nl + nloops
                                                              @@ -159,9 +159,9 @@

                                                              Uses

                                                                • -
                                                                • forunittest
                                                                • -
                                                                • kinds
                                                                • fortime
                                                                • +
                                                                • kinds
                                                                • +
                                                                • forunittest
                                                              • @@ -319,11 +319,11 @@

                                                                Calls

                                                                - + program~~test9~~CallsGraph - + program~test9 @@ -420,6 +420,18 @@

                                                                Calls

                                                                + + +colorize + +colorize + + + +proc~print_time->colorize + + +
                                                                @@ -519,7 +531,7 @@

                                                                Variables

                                                                - + type(timer) @@ -535,7 +547,7 @@

                                                                Variables

                                                                - + type(unit_test) @@ -551,7 +563,7 @@

                                                                Variables

                                                                - + integer @@ -567,7 +579,7 @@

                                                                Variables

                                                                - + integer @@ -646,7 +658,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/search.html b/search.html index 9193c77..35b1805 100644 --- a/search.html +++ b/search.html @@ -101,7 +101,7 @@

                                                                Search Results

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/example1.f90.html b/sourcefile/example1.f90.html index 6e2e036..d693c15 100644 --- a/sourcefile/example1.f90.html +++ b/sourcefile/example1.f90.html @@ -276,7 +276,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/example2.f90.html b/sourcefile/example2.f90.html index 76eb13a..aba62de 100644 --- a/sourcefile/example2.f90.html +++ b/sourcefile/example2.f90.html @@ -76,7 +76,7 @@

                                                                example2.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -255,7 +255,7 @@

                                                                Source Code

                                                                do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%timer_stop(nloops = nloops, message = 'Elapsed time:', print = .true.) ! nloops, message and print are optional. + call t%timer_stop(nloops = nloops, message = 'Elapsed time:', print = .true., color='green') ! nloops, message, print and color are optional. call t%timer_write('example/example2_etimes') ! Optionally, write the elapsed time to a file end program example2 @@ -280,7 +280,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/example3.f90.html b/sourcefile/example3.f90.html index 89a6b6a..d04aef3 100644 --- a/sourcefile/example3.f90.html +++ b/sourcefile/example3.f90.html @@ -276,7 +276,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/example4.f90.html b/sourcefile/example4.f90.html index 174ff79..411eeb3 100644 --- a/sourcefile/example4.f90.html +++ b/sourcefile/example4.f90.html @@ -76,7 +76,7 @@

                                                                example4.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -255,7 +255,7 @@

                                                                Source Code

                                                                do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%ctimer_stop(nloops = nloops, message = 'CPU time:', print = .true.) ! nloops, message and print are optional + call t%ctimer_stop(nloops = nloops, message = 'CPU time:', print = .true., color='yellow') ! nloops, message, print and color are optional. call t%ctimer_write('example/example4_ctimes') ! Optionally, write the elapsed time to a file end program example4 @@ -280,7 +280,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/example5.f90.html b/sourcefile/example5.f90.html index 705ff2b..dac1563 100644 --- a/sourcefile/example5.f90.html +++ b/sourcefile/example5.f90.html @@ -276,7 +276,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/example6.f90.html b/sourcefile/example6.f90.html index 1e2f2c3..79083be 100644 --- a/sourcefile/example6.f90.html +++ b/sourcefile/example6.f90.html @@ -76,7 +76,7 @@

                                                                example6.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -255,7 +255,7 @@

                                                                Source Code

                                                                do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%dtimer_stop(nloops = nloops, message = 'Elapsed time:', print = .true.) ! nloops, message and print are optional. + call t%dtimer_stop(nloops = nloops, message = 'Elapsed time:', print = .true., color='red') ! nloops, message, print and color are optional. call t%dtimer_write('example/example6_etimes') ! Optionally, write the elapsed time to a file end program example6 @@ -280,7 +280,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/fortime.f90.html b/sourcefile/fortime.f90.html index e51dc6a..d8494f2 100644 --- a/sourcefile/fortime.f90.html +++ b/sourcefile/fortime.f90.html @@ -76,7 +76,7 @@

                                                                fortime.f90
                                                              • 273 statements + title="36.2% of total for source files.">284 statements
                                                              • @@ -861,471 +861,482 @@

                                                                Source Code

                                                                !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the elapsed time. !> Optionally, it can print a message along with the elapsed time. - impure subroutine timer_stop(this, nloops, message, print) + impure subroutine timer_stop(this, nloops, message, print, color) class(timer), intent(inout) :: this integer, intent(in), optional :: nloops character(*), intent(in), optional :: message character(:), allocatable :: msg logical, intent(in), optional :: print - - ! Stop the timer - call system_clock(count=this%clock_end) - - ! Calculate the elapsed processor ticks - this%clock_elapsed = this%clock_end - this%clock_start - - ! Convert processor ticks to seconds - if (.not.present(nloops)) & - this%elapsed_time = real(this%clock_elapsed, kind=rk) / real(this%clock_rate, kind=rk) - if ( present(nloops)) & - this%elapsed_time = real(this%clock_elapsed, kind=rk) / real(this%clock_rate, kind=rk) / real(nloops, kind=rk) - - ! Print the elapsed time - if (.not. present(message)) then - msg = "Elapsed time:" - else - msg = message - end if - - if (present(print)) then - if (print) call print_time(this%elapsed_time, msg) - else - call print_time(this%elapsed_time, msg) - end if - - ! Deallocate the message - if (allocated(msg)) deallocate(msg) - - end subroutine timer_stop - !=============================================================================== - + character(*), intent(in), optional :: color + + ! Stop the timer + call system_clock(count=this%clock_end) + + ! Calculate the elapsed processor ticks + this%clock_elapsed = this%clock_end - this%clock_start + + ! Convert processor ticks to seconds + if (.not.present(nloops)) & + this%elapsed_time = real(this%clock_elapsed, kind=rk) / real(this%clock_rate, kind=rk) + if ( present(nloops)) & + this%elapsed_time = real(this%clock_elapsed, kind=rk) / real(this%clock_rate, kind=rk) / real(nloops, kind=rk) + + ! Print the elapsed time + if (.not. present(message)) then + msg = "Elapsed time:" + else + msg = message + end if + + if (present(print)) then + if (print) call print_time(this%elapsed_time, msg, color) + else + call print_time(this%elapsed_time, msg, color) + end if + + ! Deallocate the message + if (allocated(msg)) deallocate(msg) + + end subroutine timer_stop + !=============================================================================== - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Writes the elapsed time to a file. - impure subroutine timer_write(this, file_name) - class(timer), intent(in) :: this - character(*), intent(in) :: file_name - logical :: file_exists - integer :: nunit - - ! Check if the file exists - inquire(file=file_name, exist=file_exists) - - ! Open the file in appropriate mode - if (file_exists) then - open(newunit=nunit, file=file_name, status='old', action='write', position='append') - else - open(newunit=nunit, file=file_name, status='new', action='write') - end if - - ! Write the elapsed time to the file - write(nunit, '(g0)') this%elapsed_time - - ! Close the file - close(nunit) - - end subroutine timer_write - !=============================================================================== - + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Writes the elapsed time to a file. + impure subroutine timer_write(this, file_name) + class(timer), intent(in) :: this + character(*), intent(in) :: file_name + logical :: file_exists + integer :: nunit + + ! Check if the file exists + inquire(file=file_name, exist=file_exists) + + ! Open the file in appropriate mode + if (file_exists) then + open(newunit=nunit, file=file_name, status='old', action='write', position='append') + else + open(newunit=nunit, file=file_name, status='new', action='write') + end if + + ! Write the elapsed time to the file + write(nunit, '(g0)') this%elapsed_time + + ! Close the file + close(nunit) + + end subroutine timer_write + !=============================================================================== - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Starts the timer by recording the current CPU time value. - !> This value is used to calculate the CPU time later. - impure subroutine ctimer_start(this) - class(timer), intent(inout) :: this - - ! Start the timer - call cpu_time(this%cpu_start) - - end subroutine ctimer_start - !=============================================================================== - + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Starts the timer by recording the current CPU time value. + !> This value is used to calculate the CPU time later. + impure subroutine ctimer_start(this) + class(timer), intent(inout) :: this + + ! Start the timer + call cpu_time(this%cpu_start) + + end subroutine ctimer_start + !=============================================================================== - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Stops the timer and calculates the CPU time. - !> Optionally, it can print a message along with the CPU time. - impure subroutine ctimer_stop(this, nloops, message, print) - class(timer), intent(inout) :: this - integer, intent(in), optional :: nloops - character(*), intent(in), optional :: message - character(:), allocatable :: msg - logical, intent(in), optional :: print - - ! Stop the timer - call cpu_time(this%cpu_end) - - ! Calculate the elapsed CPU time - this%cpu_elapsed = this%cpu_end - this%cpu_start - - ! Convert CPU time to seconds - if (.not.present(nloops)) this%cpu_time = this%cpu_elapsed - if ( present(nloops)) this%cpu_time = this%cpu_elapsed / real(nloops, kind=rk) - - ! Print the elapsed time - if (.not. present(message)) then - msg = "CPU time:" - else - msg = message - end if - - if (present(print)) then - if (print) call print_time(this%cpu_time, msg) - else - call print_time(this%cpu_time, msg) - end if - - ! Deallocate the message - if (allocated(msg)) deallocate(msg) - - end subroutine ctimer_stop - !=============================================================================== - - - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Writes the CPU time to a file. - impure subroutine ctimer_write(this, file_name) - class(timer), intent(in) :: this - character(*), intent(in) :: file_name - logical :: file_exists - integer :: nunit - - ! Check if the file exists - inquire(file=file_name, exist=file_exists) - - ! Open the file in appropriate mode - if (file_exists) then - open(newunit=nunit, file=file_name, status='old', action='write', position='append') - else - open(newunit=nunit, file=file_name, status='new', action='write') - end if - - ! Write the CPU time to the file - write(nunit, '(g0)') this%cpu_time - - ! Close the file - close(nunit) - - end subroutine ctimer_write - !=============================================================================== - - - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Starts the timer by recording the current OMP time value. - !> This value is used to calculate the OMP time later. -#if defined(USE_OMP) - impure subroutine otimer_start(this) - use omp_lib - class(timer), intent(inout) :: this - - ! Start the timer - this%omp_start = omp_get_wtime() - - end subroutine otimer_start - !=============================================================================== -#endif - - -#if defined(USE_OMP) - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Stops the timer and calculates the OMP time. - !> Optionally, it can print a message along with the OMP time. - impure subroutine otimer_stop(this, nloops, message, print) - use omp_lib - class(timer), intent(inout) :: this - integer, intent(in), optional :: nloops - character(*), intent(in), optional :: message - character(:), allocatable :: msg - logical, intent(in), optional :: print - - ! Stop the timer - this%omp_end = omp_get_wtime() + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Stops the timer and calculates the CPU time. + !> Optionally, it can print a message along with the CPU time. + impure subroutine ctimer_stop(this, nloops, message, print, color) + class(timer), intent(inout) :: this + integer, intent(in), optional :: nloops + character(*), intent(in), optional :: message + character(:), allocatable :: msg + logical, intent(in), optional :: print + character(*), intent(in), optional :: color + + ! Stop the timer + call cpu_time(this%cpu_end) + + ! Calculate the elapsed CPU time + this%cpu_elapsed = this%cpu_end - this%cpu_start + + ! Convert CPU time to seconds + if (.not.present(nloops)) this%cpu_time = this%cpu_elapsed + if ( present(nloops)) this%cpu_time = this%cpu_elapsed / real(nloops, kind=rk) + + ! Print the elapsed time + if (.not. present(message)) then + msg = "CPU time:" + else + msg = message + end if + + if (present(print)) then + if (print) call print_time(this%cpu_time, msg, color) + else + call print_time(this%cpu_time, msg, color) + end if + + ! Deallocate the message + if (allocated(msg)) deallocate(msg) + + end subroutine ctimer_stop + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Writes the CPU time to a file. + impure subroutine ctimer_write(this, file_name) + class(timer), intent(in) :: this + character(*), intent(in) :: file_name + logical :: file_exists + integer :: nunit + + ! Check if the file exists + inquire(file=file_name, exist=file_exists) + + ! Open the file in appropriate mode + if (file_exists) then + open(newunit=nunit, file=file_name, status='old', action='write', position='append') + else + open(newunit=nunit, file=file_name, status='new', action='write') + end if + + ! Write the CPU time to the file + write(nunit, '(g0)') this%cpu_time + + ! Close the file + close(nunit) + + end subroutine ctimer_write + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Starts the timer by recording the current OMP time value. + !> This value is used to calculate the OMP time later. +#if defined(USE_OMP) + impure subroutine otimer_start(this) + use omp_lib + class(timer), intent(inout) :: this + + ! Start the timer + this%omp_start = omp_get_wtime() + + end subroutine otimer_start + !=============================================================================== +#endif + + +#if defined(USE_OMP) + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Stops the timer and calculates the OMP time. + !> Optionally, it can print a message along with the OMP time. + impure subroutine otimer_stop(this, nloops, message, print, color) + use omp_lib + class(timer), intent(inout) :: this + integer, intent(in), optional :: nloops + character(*), intent(in), optional :: message + character(:), allocatable :: msg + logical, intent(in), optional :: print + character(*), intent(in), optional :: color - ! Calculate the elapsed OMP time - this%omp_elapsed = this%omp_end - this%omp_start + ! Stop the timer + this%omp_end = omp_get_wtime() - ! Convert OMP time to seconds - if (.not.present(nloops)) this%omp_time = this%omp_elapsed - if ( present(nloops)) this%omp_time = this%omp_elapsed / real(nloops, kind=rk) - - ! Print the elapsed time - if (.not. present(message)) then - msg = "OMP time:" - else - msg = message - end if - - if (present(print)) then - if (print) call print_time(this%omp_time, msg) - else - call print_time(this%omp_time, msg) - end if - - ! Deallocate the message - if (allocated(msg)) deallocate(msg) + ! Calculate the elapsed OMP time + this%omp_elapsed = this%omp_end - this%omp_start + + ! Convert OMP time to seconds + if (.not.present(nloops)) this%omp_time = this%omp_elapsed + if ( present(nloops)) this%omp_time = this%omp_elapsed / real(nloops, kind=rk) + + ! Print the elapsed time + if (.not. present(message)) then + msg = "OMP time:" + else + msg = message + end if + + if (present(print)) then + if (print) call print_time(this%omp_time, msg, color) + else + call print_time(this%omp_time, msg, color) + end if - end subroutine otimer_stop - !=============================================================================== -#endif - - -#if defined(USE_OMP) - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Writes the OMP time to a file. - impure subroutine otimer_write(this, file_name) - use omp_lib - class(timer), intent(in) :: this - character(*), intent(in) :: file_name - logical :: file_exists - integer :: nunit - - ! Check if the file exists - inquire(file=file_name, exist=file_exists) + ! Deallocate the message + if (allocated(msg)) deallocate(msg) + + end subroutine otimer_stop + !=============================================================================== +#endif + + +#if defined(USE_OMP) + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Writes the OMP time to a file. + impure subroutine otimer_write(this, file_name) + use omp_lib + class(timer), intent(in) :: this + character(*), intent(in) :: file_name + logical :: file_exists + integer :: nunit - ! Open the file in appropriate mode - if (file_exists) then - open(newunit=nunit, file=file_name, status='old', action='write', position='append') - else - open(newunit=nunit, file=file_name, status='new', action='write') - end if - - ! Write the OMP time to the file - write(nunit, '(g0)') this%omp_time + ! Check if the file exists + inquire(file=file_name, exist=file_exists) + + ! Open the file in appropriate mode + if (file_exists) then + open(newunit=nunit, file=file_name, status='old', action='write', position='append') + else + open(newunit=nunit, file=file_name, status='new', action='write') + end if - ! Close the file - close(nunit) + ! Write the OMP time to the file + write(nunit, '(g0)') this%omp_time - end subroutine otimer_write - !=============================================================================== -#endif - - -#if defined(USE_MPI) - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Starts the timer by recording the current MPI time value. - !> This value is used to calculate the MPI time later. - impure subroutine mtimer_start(this) - ! include 'mpif.h' - class(timer), intent(inout) :: this - - interface - function mpi_wtime() - import rk - real(rk) :: mpi_wtime - end function mpi_wtime - end interface - - ! Start the timer - this%mpi_start = mpi_wtime() + ! Close the file + close(nunit) + + end subroutine otimer_write + !=============================================================================== +#endif + + +#if defined(USE_MPI) + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Starts the timer by recording the current MPI time value. + !> This value is used to calculate the MPI time later. + impure subroutine mtimer_start(this) + ! include 'mpif.h' + class(timer), intent(inout) :: this + + interface + function mpi_wtime() + import rk + real(rk) :: mpi_wtime + end function mpi_wtime + end interface - end subroutine mtimer_start - !=============================================================================== -#endif - - -#if defined(USE_MPI) - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Stops the timer and calculates the MPI time. - !> Optionally, it can print a message along with the MPI time. - impure subroutine mtimer_stop(this, nloops, message, print) - ! include 'mpif.h' - class(timer), intent(inout) :: this - integer, intent(in), optional :: nloops - character(*), intent(in), optional :: message - character(:), allocatable :: msg - logical, intent(in), optional :: print - - interface - function mpi_wtime() - import rk - real(rk) :: mpi_wtime - end function mpi_wtime - end interface - - ! Stop the timer - this%mpi_end = mpi_wtime() - - ! Calculate the elapsed MPI time - this%mpi_elapsed = this%mpi_end - this%mpi_start - - ! Convert MPI time to seconds - if (.not.present(nloops)) this%mpi_time = this%mpi_elapsed - if ( present(nloops)) this%mpi_time = this%mpi_elapsed / real(nloops, kind=rk) + ! Start the timer + this%mpi_start = mpi_wtime() + + end subroutine mtimer_start + !=============================================================================== +#endif + + +#if defined(USE_MPI) + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Stops the timer and calculates the MPI time. + !> Optionally, it can print a message along with the MPI time. + impure subroutine mtimer_stop(this, nloops, message, print, color) + ! include 'mpif.h' + class(timer), intent(inout) :: this + integer, intent(in), optional :: nloops + character(*), intent(in), optional :: message + character(:), allocatable :: msg + logical, intent(in), optional :: print + character(*), intent(in), optional :: color + + interface + function mpi_wtime() + import rk + real(rk) :: mpi_wtime + end function mpi_wtime + end interface + + ! Stop the timer + this%mpi_end = mpi_wtime() + + ! Calculate the elapsed MPI time + this%mpi_elapsed = this%mpi_end - this%mpi_start - ! Print the elapsed time - if (.not. present(message)) then - msg = "MPI time:" - else - msg = message - end if - - if (present(print)) then - if (print) call print_time(this%mpi_time, msg) - else - call print_time(this%mpi_time, msg) - end if - - ! Deallocate the message - if (allocated(msg)) deallocate(msg) - - end subroutine mtimer_stop - !=============================================================================== -#endif + ! Convert MPI time to seconds + if (.not.present(nloops)) this%mpi_time = this%mpi_elapsed + if ( present(nloops)) this%mpi_time = this%mpi_elapsed / real(nloops, kind=rk) + + ! Print the elapsed time + if (.not. present(message)) then + msg = "MPI time:" + else + msg = message + end if + + if (present(print)) then + if (print) call print_time(this%mpi_time, msg, color) + else + call print_time(this%mpi_time, msg, color) + end if + + ! Deallocate the message + if (allocated(msg)) deallocate(msg) - -#if defined(USE_MPI) - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Writes the MPI time to a file. - impure subroutine mtimer_write(this, file_name) - class(timer), intent(in) :: this - character(*), intent(in) :: file_name - logical :: file_exists - integer :: nunit - - ! Check if the file exists - inquire(file=file_name, exist=file_exists) - - ! Open the file in appropriate mode - if (file_exists) then - open(newunit=nunit, file=file_name, status='old', action='write', position='append') - else - open(newunit=nunit, file=file_name, status='new', action='write') - end if - - ! Write the MPI time to the file - write(nunit, '(g0)') this%mpi_time - - ! Close the file - close(nunit) - - end subroutine mtimer_write - !=============================================================================== -#endif + end subroutine mtimer_stop + !=============================================================================== +#endif + + +#if defined(USE_MPI) + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Writes the MPI time to a file. + impure subroutine mtimer_write(this, file_name) + class(timer), intent(in) :: this + character(*), intent(in) :: file_name + logical :: file_exists + integer :: nunit + + ! Check if the file exists + inquire(file=file_name, exist=file_exists) + + ! Open the file in appropriate mode + if (file_exists) then + open(newunit=nunit, file=file_name, status='old', action='write', position='append') + else + open(newunit=nunit, file=file_name, status='new', action='write') + end if + + ! Write the MPI time to the file + write(nunit, '(g0)') this%mpi_time + + ! Close the file + close(nunit) - + end subroutine mtimer_write !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Starts the timer by recording the current processor clock value. - !> This value is used to calculate the elapsed time later. - impure subroutine dtimer_start(this) - class(timer), intent(inout) :: this - - ! Start the timer - call date_and_time(values=this%values_start) - - end subroutine dtimer_start - !=============================================================================== - +#endif + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Starts the timer by recording the current processor clock value. + !> This value is used to calculate the elapsed time later. + impure subroutine dtimer_start(this) + class(timer), intent(inout) :: this + + ! Start the timer + call date_and_time(values=this%values_start) - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Stops the timer and calculates the elapsed time. - !> Optionally, it can print a message along with the elapsed time. - impure subroutine dtimer_stop(this, nloops, message, print) - class(timer), intent(inout) :: this - integer, intent(in), optional :: nloops - character(*), intent(in), optional :: message - character(:), allocatable :: msg - logical, intent(in), optional :: print - real(rk) :: values_elapsed_sec - - ! Stop the timer - call date_and_time(values=this%values_end) - - ! Calculate the elapsed processor ticks - this%values_elapsed = this%values_end - this%values_start - - ! Convert processor ticks to seconds - if (.not.present(nloops)) & - this%elapsed_dtime = to_seconds(this%values_elapsed) - if ( present(nloops)) & - this%elapsed_dtime = to_seconds(this%values_elapsed) / real(nloops, kind=rk) - - ! Print the elapsed time - if (.not. present(message)) then - msg = "Elapsed time:" - else - msg = message - end if - - if (present(print)) then - if (print) call print_time(this%elapsed_dtime, msg) - else - call print_time(this%elapsed_dtime, msg) - end if - - ! Deallocate the message - if (allocated(msg)) deallocate(msg) - - end subroutine dtimer_stop - !=============================================================================== - - - !=============================================================================== - !> author: Seyed Ali Ghasemi - !> Writes the elapsed time to a file. - impure subroutine dtimer_write(this, file_name) - class(timer), intent(in) :: this - character(*), intent(in) :: file_name - logical :: file_exists - integer :: nunit - - ! Check if the file exists - inquire(file=file_name, exist=file_exists) - - ! Open the file in appropriate mode - if (file_exists) then - open(newunit=nunit, file=file_name, status='old', action='write', position='append') - else - open(newunit=nunit, file=file_name, status='new', action='write') - end if - - ! Write the elapsed time to the file - write(nunit, '(g0)') this%elapsed_dtime - - ! Close the file - close(nunit) - - end subroutine dtimer_write - !=============================================================================== - - - !=============================================================================== - !> author: Seyed Ali Ghasemi - pure function to_seconds(values) result(seconds) - integer, dimension(8), intent(in) :: values - real(rk) :: seconds - - seconds = real(values(3), rk) * 24.0_rk * 60.0_rk * 60.0_rk + & - real(values(5), rk) * 60.0_rk * 60.0_rk + & - real(values(6), rk) * 60.0_rk + & - real(values(7), rk) + & - real(values(8), rk) / 1000.0_rk - - end function to_seconds - !=============================================================================== - - - !=============================================================================== - !> author: Seyed Ali Ghasemi - impure subroutine print_time(time, message) - real(rk), intent(in) :: time - character(*), intent(in) :: message - - print '(A, F16.9, " [s]")', trim(message), time - end subroutine print_time - !=============================================================================== - -end module fortime + end subroutine dtimer_start + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Stops the timer and calculates the elapsed time. + !> Optionally, it can print a message along with the elapsed time. + impure subroutine dtimer_stop(this, nloops, message, print, color) + class(timer), intent(inout) :: this + integer, intent(in), optional :: nloops + character(*), intent(in), optional :: message + character(:), allocatable :: msg + logical, intent(in), optional :: print + real(rk) :: values_elapsed_sec + character(*), intent(in), optional :: color + + ! Stop the timer + call date_and_time(values=this%values_end) + + ! Calculate the elapsed processor ticks + this%values_elapsed = this%values_end - this%values_start + + ! Convert processor ticks to seconds + if (.not.present(nloops)) & + this%elapsed_dtime = to_seconds(this%values_elapsed) + if ( present(nloops)) & + this%elapsed_dtime = to_seconds(this%values_elapsed) / real(nloops, kind=rk) + + ! Print the elapsed time + if (.not. present(message)) then + msg = "Elapsed time:" + else + msg = message + end if + + if (present(print)) then + if (print) call print_time(this%elapsed_dtime, msg, color) + else + call print_time(this%elapsed_dtime, msg, color) + end if + + ! Deallocate the message + if (allocated(msg)) deallocate(msg) + + end subroutine dtimer_stop + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + !> Writes the elapsed time to a file. + impure subroutine dtimer_write(this, file_name) + class(timer), intent(in) :: this + character(*), intent(in) :: file_name + logical :: file_exists + integer :: nunit + + ! Check if the file exists + inquire(file=file_name, exist=file_exists) + + ! Open the file in appropriate mode + if (file_exists) then + open(newunit=nunit, file=file_name, status='old', action='write', position='append') + else + open(newunit=nunit, file=file_name, status='new', action='write') + end if + + ! Write the elapsed time to the file + write(nunit, '(g0)') this%elapsed_dtime + + ! Close the file + close(nunit) + + end subroutine dtimer_write + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + pure function to_seconds(values) result(seconds) + integer, dimension(8), intent(in) :: values + real(rk) :: seconds + + seconds = real(values(3), rk) * 24.0_rk * 60.0_rk * 60.0_rk + & + real(values(5), rk) * 60.0_rk * 60.0_rk + & + real(values(6), rk) * 60.0_rk + & + real(values(7), rk) + & + real(values(8), rk) / 1000.0_rk + + end function to_seconds + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + impure subroutine print_time(time, message, color) + use face + real(rk), intent(in) :: time + character(*), intent(in) :: message + character(*), intent(in), optional :: color + + if (present(color)) then + print '(A, F16.9, A)', colorize(trim(message), color_fg=trim(color)), time, colorize(" [s]", color_fg=trim(color)) + else + print '(A, F16.9, A)', colorize(trim(message), color_fg='blue'), time, colorize(" [s]", color_fg='blue') + end if + end subroutine print_time + !=============================================================================== + +end module fortime @@ -1347,7 +1358,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test1.f90.html b/sourcefile/test1.f90.html index 6385253..4787b6f 100644 --- a/sourcefile/test1.f90.html +++ b/sourcefile/test1.f90.html @@ -76,7 +76,7 @@

                                                                test1.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test10.f90.html b/sourcefile/test10.f90.html index 42d2320..6e5bdf3 100644 --- a/sourcefile/test10.f90.html +++ b/sourcefile/test10.f90.html @@ -289,7 +289,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test11.f90.html b/sourcefile/test11.f90.html index 177d333..1b1bc5f 100644 --- a/sourcefile/test11.f90.html +++ b/sourcefile/test11.f90.html @@ -76,7 +76,7 @@

                                                                test11.f90
                                                              • 19 statements + title=" 2.4% of total for source files.">19 statements
                                                              • @@ -293,7 +293,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test12.f90.html b/sourcefile/test12.f90.html index 9db15e5..02c39c2 100644 --- a/sourcefile/test12.f90.html +++ b/sourcefile/test12.f90.html @@ -76,7 +76,7 @@

                                                                test12.f90
                                                              • 19 statements + title=" 2.4% of total for source files.">19 statements
                                                              • @@ -293,7 +293,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test13.f90.html b/sourcefile/test13.f90.html index ea167ed..f1f635d 100644 --- a/sourcefile/test13.f90.html +++ b/sourcefile/test13.f90.html @@ -76,7 +76,7 @@

                                                                test13.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test14.f90.html b/sourcefile/test14.f90.html index 7602984..9ab185d 100644 --- a/sourcefile/test14.f90.html +++ b/sourcefile/test14.f90.html @@ -76,7 +76,7 @@

                                                                test14.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test15.f90.html b/sourcefile/test15.f90.html index 63c4770..3ec0c79 100644 --- a/sourcefile/test15.f90.html +++ b/sourcefile/test15.f90.html @@ -76,7 +76,7 @@

                                                                test15.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test16.f90.html b/sourcefile/test16.f90.html index 8216a2e..cd60c7a 100644 --- a/sourcefile/test16.f90.html +++ b/sourcefile/test16.f90.html @@ -76,7 +76,7 @@

                                                                test16.f90
                                                              • 9 statements + title=" 1.1% of total for source files.">9 statements
                                                              • @@ -279,7 +279,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test17.f90.html b/sourcefile/test17.f90.html index e0a02e9..4faa3f5 100644 --- a/sourcefile/test17.f90.html +++ b/sourcefile/test17.f90.html @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test18.f90.html b/sourcefile/test18.f90.html index edec234..fcab142 100644 --- a/sourcefile/test18.f90.html +++ b/sourcefile/test18.f90.html @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test19.f90.html b/sourcefile/test19.f90.html index 5d21a4b..bd768c8 100644 --- a/sourcefile/test19.f90.html +++ b/sourcefile/test19.f90.html @@ -76,7 +76,7 @@

                                                                test19.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -285,7 +285,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test2.f90.html b/sourcefile/test2.f90.html index fe1d11d..1c53cbd 100644 --- a/sourcefile/test2.f90.html +++ b/sourcefile/test2.f90.html @@ -76,7 +76,7 @@

                                                                test2.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test20.f90.html b/sourcefile/test20.f90.html index 0a8ad24..86ac5ee 100644 --- a/sourcefile/test20.f90.html +++ b/sourcefile/test20.f90.html @@ -76,7 +76,7 @@

                                                                test20.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -290,7 +290,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test21.f90.html b/sourcefile/test21.f90.html index 8f04d56..19e1e9c 100644 --- a/sourcefile/test21.f90.html +++ b/sourcefile/test21.f90.html @@ -76,7 +76,7 @@

                                                                test21.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -290,7 +290,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test22.f90.html b/sourcefile/test22.f90.html index 787cc21..98fac3b 100644 --- a/sourcefile/test22.f90.html +++ b/sourcefile/test22.f90.html @@ -289,7 +289,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test23.f90.html b/sourcefile/test23.f90.html index d5c0148..83a343e 100644 --- a/sourcefile/test23.f90.html +++ b/sourcefile/test23.f90.html @@ -76,7 +76,7 @@

                                                                test23.f90
                                                              • 19 statements + title=" 2.4% of total for source files.">19 statements
                                                              • @@ -293,7 +293,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test24.f90.html b/sourcefile/test24.f90.html index 81d6066..7d7ac31 100644 --- a/sourcefile/test24.f90.html +++ b/sourcefile/test24.f90.html @@ -76,7 +76,7 @@

                                                                test24.f90
                                                              • 19 statements + title=" 2.4% of total for source files.">19 statements
                                                              • @@ -293,7 +293,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test25.f90.html b/sourcefile/test25.f90.html index 98e4acc..6c47d87 100644 --- a/sourcefile/test25.f90.html +++ b/sourcefile/test25.f90.html @@ -76,7 +76,7 @@

                                                                test25.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test26.f90.html b/sourcefile/test26.f90.html index 08769a0..3346c44 100644 --- a/sourcefile/test26.f90.html +++ b/sourcefile/test26.f90.html @@ -76,7 +76,7 @@

                                                                test26.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test27.f90.html b/sourcefile/test27.f90.html index 3e48e79..dd2555a 100644 --- a/sourcefile/test27.f90.html +++ b/sourcefile/test27.f90.html @@ -76,7 +76,7 @@

                                                                test27.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test28.f90.html b/sourcefile/test28.f90.html index 357edc8..4ead96d 100644 --- a/sourcefile/test28.f90.html +++ b/sourcefile/test28.f90.html @@ -76,7 +76,7 @@

                                                                test28.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test29.f90.html b/sourcefile/test29.f90.html index a705e54..9d97fbd 100644 --- a/sourcefile/test29.f90.html +++ b/sourcefile/test29.f90.html @@ -76,7 +76,7 @@

                                                                test29.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test3.f90.html b/sourcefile/test3.f90.html index 3160578..466ec10 100644 --- a/sourcefile/test3.f90.html +++ b/sourcefile/test3.f90.html @@ -76,7 +76,7 @@

                                                                test3.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test30.f90.html b/sourcefile/test30.f90.html index 7f5e803..c2e8fd3 100644 --- a/sourcefile/test30.f90.html +++ b/sourcefile/test30.f90.html @@ -76,7 +76,7 @@

                                                                test30.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -287,7 +287,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test4.f90.html b/sourcefile/test4.f90.html index 59f8581..4bbdfe6 100644 --- a/sourcefile/test4.f90.html +++ b/sourcefile/test4.f90.html @@ -76,7 +76,7 @@

                                                                test4.f90
                                                              • 9 statements + title=" 1.1% of total for source files.">9 statements
                                                              • @@ -279,7 +279,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test5.f90.html b/sourcefile/test5.f90.html index 0da3539..5dd1305 100644 --- a/sourcefile/test5.f90.html +++ b/sourcefile/test5.f90.html @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test6.f90.html b/sourcefile/test6.f90.html index 623e2d9..cb3d3d9 100644 --- a/sourcefile/test6.f90.html +++ b/sourcefile/test6.f90.html @@ -283,7 +283,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test7.f90.html b/sourcefile/test7.f90.html index 602aae5..57d82f5 100644 --- a/sourcefile/test7.f90.html +++ b/sourcefile/test7.f90.html @@ -76,7 +76,7 @@

                                                                test7.f90
                                                              • 12 statements + title=" 1.5% of total for source files.">12 statements
                                                              • @@ -285,7 +285,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test8.f90.html b/sourcefile/test8.f90.html index 93294a6..7faaf0e 100644 --- a/sourcefile/test8.f90.html +++ b/sourcefile/test8.f90.html @@ -76,7 +76,7 @@

                                                                test8.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -290,7 +290,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/sourcefile/test9.f90.html b/sourcefile/test9.f90.html index 983e2e7..d701b5b 100644 --- a/sourcefile/test9.f90.html +++ b/sourcefile/test9.f90.html @@ -76,7 +76,7 @@

                                                                test9.f90
                                                              • 16 statements + title=" 2.0% of total for source files.">16 statements
                                                              • @@ -290,7 +290,7 @@

                                                                Source Code

                                                                Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                + on 2024-04-22T09:42:49.196740


                                                                diff --git a/src/example2.f90 b/src/example2.f90 index 92522dc..5363f1a 100644 --- a/src/example2.f90 +++ b/src/example2.f90 @@ -11,7 +11,7 @@ program example2 do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%timer_stop(nloops = nloops, message = 'Elapsed time:', print = .true.) ! nloops, message and print are optional. + call t%timer_stop(nloops = nloops, message = 'Elapsed time:', print = .true., color='green') ! nloops, message, print and color are optional. call t%timer_write('example/example2_etimes') ! Optionally, write the elapsed time to a file end program example2 diff --git a/src/example4.f90 b/src/example4.f90 index fd415b7..4c5662e 100644 --- a/src/example4.f90 +++ b/src/example4.f90 @@ -11,7 +11,7 @@ program example4 do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%ctimer_stop(nloops = nloops, message = 'CPU time:', print = .true.) ! nloops, message and print are optional + call t%ctimer_stop(nloops = nloops, message = 'CPU time:', print = .true., color='yellow') ! nloops, message, print and color are optional. call t%ctimer_write('example/example4_ctimes') ! Optionally, write the elapsed time to a file end program example4 diff --git a/src/example6.f90 b/src/example6.f90 index 0272bbc..7373018 100644 --- a/src/example6.f90 +++ b/src/example6.f90 @@ -11,7 +11,7 @@ program example6 do nl = 1, nloops call sleep(1) ! Perform operations ntimes end do - call t%dtimer_stop(nloops = nloops, message = 'Elapsed time:', print = .true.) ! nloops, message and print are optional. + call t%dtimer_stop(nloops = nloops, message = 'Elapsed time:', print = .true., color='red') ! nloops, message, print and color are optional. call t%dtimer_write('example/example6_etimes') ! Optionally, write the elapsed time to a file end program example6 diff --git a/src/fortime.f90 b/src/fortime.f90 index 419107c..2669be6 100644 --- a/src/fortime.f90 +++ b/src/fortime.f90 @@ -92,12 +92,13 @@ end subroutine timer_start !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the elapsed time. !> Optionally, it can print a message along with the elapsed time. - impure subroutine timer_stop(this, nloops, message, print) + impure subroutine timer_stop(this, nloops, message, print, color) class(timer), intent(inout) :: this integer, intent(in), optional :: nloops character(*), intent(in), optional :: message character(:), allocatable :: msg logical, intent(in), optional :: print + character(*), intent(in), optional :: color ! Stop the timer call system_clock(count=this%clock_end) @@ -119,9 +120,9 @@ impure subroutine timer_stop(this, nloops, message, print) end if if (present(print)) then - if (print) call print_time(this%elapsed_time, msg) + if (print) call print_time(this%elapsed_time, msg, color) else - call print_time(this%elapsed_time, msg) + call print_time(this%elapsed_time, msg, color) end if ! Deallocate the message @@ -178,12 +179,13 @@ end subroutine ctimer_start !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the CPU time. !> Optionally, it can print a message along with the CPU time. - impure subroutine ctimer_stop(this, nloops, message, print) + impure subroutine ctimer_stop(this, nloops, message, print, color) class(timer), intent(inout) :: this integer, intent(in), optional :: nloops character(*), intent(in), optional :: message character(:), allocatable :: msg logical, intent(in), optional :: print + character(*), intent(in), optional :: color ! Stop the timer call cpu_time(this%cpu_end) @@ -203,9 +205,9 @@ impure subroutine ctimer_stop(this, nloops, message, print) end if if (present(print)) then - if (print) call print_time(this%cpu_time, msg) + if (print) call print_time(this%cpu_time, msg, color) else - call print_time(this%cpu_time, msg) + call print_time(this%cpu_time, msg, color) end if ! Deallocate the message @@ -266,13 +268,14 @@ end subroutine otimer_start !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the OMP time. !> Optionally, it can print a message along with the OMP time. - impure subroutine otimer_stop(this, nloops, message, print) + impure subroutine otimer_stop(this, nloops, message, print, color) use omp_lib class(timer), intent(inout) :: this integer, intent(in), optional :: nloops character(*), intent(in), optional :: message character(:), allocatable :: msg logical, intent(in), optional :: print + character(*), intent(in), optional :: color ! Stop the timer this%omp_end = omp_get_wtime() @@ -292,9 +295,9 @@ impure subroutine otimer_stop(this, nloops, message, print) end if if (present(print)) then - if (print) call print_time(this%omp_time, msg) + if (print) call print_time(this%omp_time, msg, color) else - call print_time(this%omp_time, msg) + call print_time(this%omp_time, msg, color) end if ! Deallocate the message @@ -366,13 +369,14 @@ end subroutine mtimer_start !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the MPI time. !> Optionally, it can print a message along with the MPI time. - impure subroutine mtimer_stop(this, nloops, message, print) + impure subroutine mtimer_stop(this, nloops, message, print, color) ! include 'mpif.h' class(timer), intent(inout) :: this integer, intent(in), optional :: nloops character(*), intent(in), optional :: message character(:), allocatable :: msg logical, intent(in), optional :: print + character(*), intent(in), optional :: color interface function mpi_wtime() @@ -399,9 +403,9 @@ end function mpi_wtime end if if (present(print)) then - if (print) call print_time(this%mpi_time, msg) + if (print) call print_time(this%mpi_time, msg, color) else - call print_time(this%mpi_time, msg) + call print_time(this%mpi_time, msg, color) end if ! Deallocate the message @@ -461,13 +465,14 @@ end subroutine dtimer_start !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the elapsed time. !> Optionally, it can print a message along with the elapsed time. - impure subroutine dtimer_stop(this, nloops, message, print) + impure subroutine dtimer_stop(this, nloops, message, print, color) class(timer), intent(inout) :: this integer, intent(in), optional :: nloops character(*), intent(in), optional :: message character(:), allocatable :: msg logical, intent(in), optional :: print real(rk) :: values_elapsed_sec + character(*), intent(in), optional :: color ! Stop the timer call date_and_time(values=this%values_end) @@ -489,9 +494,9 @@ impure subroutine dtimer_stop(this, nloops, message, print) end if if (present(print)) then - if (print) call print_time(this%elapsed_dtime, msg) + if (print) call print_time(this%elapsed_dtime, msg, color) else - call print_time(this%elapsed_dtime, msg) + call print_time(this%elapsed_dtime, msg, color) end if ! Deallocate the message @@ -548,11 +553,17 @@ end function to_seconds !=============================================================================== !> author: Seyed Ali Ghasemi - impure subroutine print_time(time, message) + impure subroutine print_time(time, message, color) + use face real(rk), intent(in) :: time character(*), intent(in) :: message + character(*), intent(in), optional :: color - print '(A, F16.9, " [s]")', trim(message), time + if (present(color)) then + print '(A, F16.9, A)', colorize(trim(message), color_fg=trim(color)), time, colorize(" [s]", color_fg=trim(color)) + else + print '(A, F16.9, A)', colorize(trim(message), color_fg='blue'), time, colorize(" [s]", color_fg='blue') + end if end subroutine print_time !=============================================================================== diff --git a/tipuesearch/tipuesearch_content.js b/tipuesearch/tipuesearch_content.js index 9b79082..68c6cbd 100644 --- a/tipuesearch/tipuesearch_content.js +++ b/tipuesearch/tipuesearch_content.js @@ -1 +1 @@ -var tipuesearch = {"pages":[{"title":" ForTime ","text":"ForTime ForTime : A Fortran library for measuring elapsed time, DATE_AND_TIME time, CPU time, OMP time and MPI time. fpm dependency If you want to use ForTime as a dependency in your own fpm project,\nyou can easily include it by adding the following line to your fpm.toml file: [dependencies] fortime = { git = \"https://github.com/gha3mi/fortime.git\" } Usage Measuring elapsed time (system_clock) use fortime type ( timer ) :: t call t % timer_start () ! Your code or section to be timed call t % timer_stop ( nloops , message , print ) ! nloops, message and print are optional call t % timer_write ( file_name ) ! Optionally, write the result to a file Measuring elapsed time (date_and_time) use fortime type ( timer ) :: t call t % dtimer_start () ! Your code or section to be timed call t % dtimer_stop ( nloops , message , print ) ! nloops, message and print are optional call t % dtimer_write ( file_name ) ! Optionally, write the result to a file Measuring CPU time (cpu_time) use fortime type ( timer ) :: t call t % ctimer_start () ! Your code or section to be timed call t % ctimer_stop ( nloops , message , print ) ! nloops, message and print are optional call t % ctimer_write ( file_name ) ! Optionally, write the result to a file Measuring OpenMP time (omp_get_wtime) use fortime type ( timer ) :: t call t % otimer_start () ! Your code or section to be timed call t % otimer_stop ( nloops , message , print ) ! nloops, message and print are optional call t % otimer_write ( file_name ) ! Optionally, write the result to a file Note: Compile with the -DUSE_OMP option when using the OpenMP timer. Measuring MPI time (mpi_wtime) use fortime type ( timer ) :: t call t % mtimer_start () ! Your code or section to be timed call t % mtimer_stop ( nloops , message , print ) ! nloops, message and print are optional call t % mtimer_write ( file_name ) ! Optionally, write the result to a file Note: Compile with the -DUSE_MPI option when using the MPI timer. Running Examples and Tests Clone the Repository First, clone the ForTime repository from GitHub and navigate to the project directory: git clone https://github.com/gha3mi/fortime.git cd fortime Running Examples To run a specific example from the example directory using your preferred Fortran compiler, use the following command: fpm run --example --compiler Replace with the name of the example file (excluding the .f90 extension) and with the name of your Fortran compiler (e.g., ifx , ifort , gfortran , nvfortran ). Running Tests To execute tests, use the following command with your chosen compiler: fpm test --compiler Replace with the name of your Fortran compiler. Documentation The most up-to-date API documentation for the master branch is available here .\nTo generate the API documentation for ForTime using ford run the following\ncommand: ford ford.yml Contributing Contributions to ForTime are welcome! If you find any issues or would like to suggest improvements, please open an issue. Developer Info Seyed Ali Ghasemi","tags":"home","loc":"index.html"},{"title":"timer – ForTime ","text":"type, public :: timer Components Type Visibility Attributes Name Initial integer, private :: clock_rate integer, private :: clock_start integer, private :: clock_end integer, private :: clock_elapsed real(kind=rk), public :: elapsed_time real(kind=rk), private :: cpu_start real(kind=rk), private :: cpu_end real(kind=rk), private :: cpu_elapsed real(kind=rk), public :: cpu_time real(kind=rk), private :: omp_start real(kind=rk), private :: omp_end real(kind=rk), private :: omp_elapsed real(kind=rk), public :: omp_time real(kind=rk), private :: mpi_start real(kind=rk), private :: mpi_end real(kind=rk), private :: mpi_elapsed real(kind=rk), public :: mpi_time integer, private, dimension(8) :: values_start integer, private, dimension(8) :: values_end integer, private, dimension(8) :: values_elapsed real(kind=rk), public :: elapsed_dtime Type-Bound Procedures procedure, public :: timer_start private impure subroutine timer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: timer_stop private impure subroutine timer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print procedure, public :: timer_write private impure subroutine timer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: ctimer_start private impure subroutine ctimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current CPU time value.\nThis value is used to calculate the CPU time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: ctimer_stop private impure subroutine ctimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the CPU time.\nOptionally, it can print a message along with the CPU time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print procedure, public :: ctimer_write private impure subroutine ctimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the CPU time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: otimer_start private impure subroutine otimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current OMP time value.\nThis value is used to calculate the OMP time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: otimer_stop private impure subroutine otimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the OMP time.\nOptionally, it can print a message along with the OMP time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print procedure, public :: otimer_write private impure subroutine otimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the OMP time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: mtimer_start private impure subroutine mtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current MPI time value.\nThis value is used to calculate the MPI time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: mtimer_stop private impure subroutine mtimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the MPI time.\nOptionally, it can print a message along with the MPI time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print procedure, public :: mtimer_write private impure subroutine mtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the MPI time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: dtimer_start private impure subroutine dtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: dtimer_stop private impure subroutine dtimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print procedure, public :: dtimer_write private impure subroutine dtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name","tags":"","loc":"type/timer.html"},{"title":"to_seconds – ForTime","text":"private pure function to_seconds(values) result(seconds) Arguments Type Intent Optional Attributes Name integer, intent(in), dimension(8) :: values Return Value real(kind=rk) Called by proc~~to_seconds~~CalledByGraph proc~to_seconds to_seconds proc~dtimer_stop timer%dtimer_stop proc~dtimer_stop->proc~to_seconds program~example5 example5 program~example5->proc~dtimer_stop program~example6 example6 program~example6->proc~dtimer_stop program~test25 test25 program~test25->proc~dtimer_stop program~test26 test26 program~test26->proc~dtimer_stop program~test27 test27 program~test27->proc~dtimer_stop program~test28 test28 program~test28->proc~dtimer_stop program~test29 test29 program~test29->proc~dtimer_stop program~test30 test30 program~test30->proc~dtimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code pure function to_seconds ( values ) result ( seconds ) integer , dimension ( 8 ), intent ( in ) :: values real ( rk ) :: seconds seconds = real ( values ( 3 ), rk ) * 2 4.0_rk * 6 0.0_rk * 6 0.0_rk + & real ( values ( 5 ), rk ) * 6 0.0_rk * 6 0.0_rk + & real ( values ( 6 ), rk ) * 6 0.0_rk + & real ( values ( 7 ), rk ) + & real ( values ( 8 ), rk ) / 100 0.0_rk end function to_seconds","tags":"","loc":"proc/to_seconds.html"},{"title":"timer_start – ForTime","text":"private impure subroutine timer_start(this) Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~timer_start~~CalledByGraph proc~timer_start timer%timer_start program~example1 example1 program~example1->proc~timer_start program~example2 example2 program~example2->proc~timer_start program~test1 test1 program~test1->proc~timer_start program~test13 test13 program~test13->proc~timer_start program~test14 test14 program~test14->proc~timer_start program~test15 test15 program~test15->proc~timer_start program~test2 test2 program~test2->proc~timer_start program~test3 test3 program~test3->proc~timer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine timer_start ( this ) class ( timer ), intent ( inout ) :: this ! Get the processor clock rate call system_clock ( count_rate = this % clock_rate ) ! Start the timer call system_clock ( count = this % clock_start ) end subroutine timer_start","tags":"","loc":"proc/timer_start.html"},{"title":"timer_stop – ForTime","text":"private impure subroutine timer_stop(this, nloops, message, print) Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print Calls proc~~timer_stop~~CallsGraph proc~timer_stop timer%timer_stop proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~timer_stop~~CalledByGraph proc~timer_stop timer%timer_stop program~example1 example1 program~example1->proc~timer_stop program~example2 example2 program~example2->proc~timer_stop program~test1 test1 program~test1->proc~timer_stop program~test13 test13 program~test13->proc~timer_stop program~test14 test14 program~test14->proc~timer_stop program~test15 test15 program~test15->proc~timer_stop program~test2 test2 program~test2->proc~timer_stop program~test3 test3 program~test3->proc~timer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine timer_stop ( this , nloops , message , print ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print ! Stop the timer call system_clock ( count = this % clock_end ) ! Calculate the elapsed processor ticks this % clock_elapsed = this % clock_end - this % clock_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) if ( present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_time , msg ) else call print_time ( this % elapsed_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine timer_stop","tags":"","loc":"proc/timer_stop.html"},{"title":"timer_write – ForTime","text":"private impure subroutine timer_write(this, file_name) Writes the elapsed time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~timer_write~~CalledByGraph proc~timer_write timer%timer_write program~example2 example2 program~example2->proc~timer_write program~test14 test14 program~test14->proc~timer_write program~test15 test15 program~test15->proc~timer_write program~test2 test2 program~test2->proc~timer_write program~test3 test3 program~test3->proc~timer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine timer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_time ! Close the file close ( nunit ) end subroutine timer_write","tags":"","loc":"proc/timer_write.html"},{"title":"ctimer_start – ForTime","text":"private impure subroutine ctimer_start(this) Starts the timer by recording the current CPU time value.\nThis value is used to calculate the CPU time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~ctimer_start~~CalledByGraph proc~ctimer_start timer%ctimer_start program~example3 example3 program~example3->proc~ctimer_start program~example4 example4 program~example4->proc~ctimer_start program~test16 test16 program~test16->proc~ctimer_start program~test17 test17 program~test17->proc~ctimer_start program~test18 test18 program~test18->proc~ctimer_start program~test4 test4 program~test4->proc~ctimer_start program~test5 test5 program~test5->proc~ctimer_start program~test6 test6 program~test6->proc~ctimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine ctimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call cpu_time ( this % cpu_start ) end subroutine ctimer_start","tags":"","loc":"proc/ctimer_start.html"},{"title":"ctimer_stop – ForTime","text":"private impure subroutine ctimer_stop(this, nloops, message, print) Stops the timer and calculates the CPU time.\nOptionally, it can print a message along with the CPU time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print Calls proc~~ctimer_stop~~CallsGraph proc~ctimer_stop timer%ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~ctimer_stop~~CalledByGraph proc~ctimer_stop timer%ctimer_stop program~example3 example3 program~example3->proc~ctimer_stop program~example4 example4 program~example4->proc~ctimer_stop program~test16 test16 program~test16->proc~ctimer_stop program~test17 test17 program~test17->proc~ctimer_stop program~test18 test18 program~test18->proc~ctimer_stop program~test4 test4 program~test4->proc~ctimer_stop program~test5 test5 program~test5->proc~ctimer_stop program~test6 test6 program~test6->proc~ctimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine ctimer_stop ( this , nloops , message , print ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print ! Stop the timer call cpu_time ( this % cpu_end ) ! Calculate the elapsed CPU time this % cpu_elapsed = this % cpu_end - this % cpu_start ! Convert CPU time to seconds if (. not . present ( nloops )) this % cpu_time = this % cpu_elapsed if ( present ( nloops )) this % cpu_time = this % cpu_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"CPU time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % cpu_time , msg ) else call print_time ( this % cpu_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine ctimer_stop","tags":"","loc":"proc/ctimer_stop.html"},{"title":"ctimer_write – ForTime","text":"private impure subroutine ctimer_write(this, file_name) Writes the CPU time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~ctimer_write~~CalledByGraph proc~ctimer_write timer%ctimer_write program~example4 example4 program~example4->proc~ctimer_write program~test17 test17 program~test17->proc~ctimer_write program~test18 test18 program~test18->proc~ctimer_write program~test5 test5 program~test5->proc~ctimer_write program~test6 test6 program~test6->proc~ctimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine ctimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the CPU time to the file write ( nunit , '(g0)' ) this % cpu_time ! Close the file close ( nunit ) end subroutine ctimer_write","tags":"","loc":"proc/ctimer_write.html"},{"title":"otimer_start – ForTime","text":"private impure subroutine otimer_start(this) Uses omp_lib proc~~otimer_start~~UsesGraph proc~otimer_start timer%otimer_start omp_lib omp_lib proc~otimer_start->omp_lib Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Starts the timer by recording the current OMP time value.\nThis value is used to calculate the OMP time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Calls proc~~otimer_start~~CallsGraph proc~otimer_start timer%otimer_start omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~otimer_start~~CalledByGraph proc~otimer_start timer%otimer_start program~test19 test19 program~test19->proc~otimer_start program~test20 test20 program~test20->proc~otimer_start program~test21 test21 program~test21->proc~otimer_start program~test7 test7 program~test7->proc~otimer_start program~test8 test8 program~test8->proc~otimer_start program~test9 test9 program~test9->proc~otimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine otimer_start ( this ) use omp_lib class ( timer ), intent ( inout ) :: this ! Start the timer this % omp_start = omp_get_wtime () end subroutine otimer_start","tags":"","loc":"proc/otimer_start.html"},{"title":"otimer_stop – ForTime","text":"private impure subroutine otimer_stop(this, nloops, message, print) Uses omp_lib proc~~otimer_stop~~UsesGraph proc~otimer_stop timer%otimer_stop omp_lib omp_lib proc~otimer_stop->omp_lib Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Stops the timer and calculates the OMP time.\nOptionally, it can print a message along with the OMP time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print Calls proc~~otimer_stop~~CallsGraph proc~otimer_stop timer%otimer_stop omp_get_wtime omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~otimer_stop~~CalledByGraph proc~otimer_stop timer%otimer_stop program~test19 test19 program~test19->proc~otimer_stop program~test20 test20 program~test20->proc~otimer_stop program~test21 test21 program~test21->proc~otimer_stop program~test7 test7 program~test7->proc~otimer_stop program~test8 test8 program~test8->proc~otimer_stop program~test9 test9 program~test9->proc~otimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine otimer_stop ( this , nloops , message , print ) use omp_lib class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print ! Stop the timer this % omp_end = omp_get_wtime () ! Calculate the elapsed OMP time this % omp_elapsed = this % omp_end - this % omp_start ! Convert OMP time to seconds if (. not . present ( nloops )) this % omp_time = this % omp_elapsed if ( present ( nloops )) this % omp_time = this % omp_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"OMP time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % omp_time , msg ) else call print_time ( this % omp_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine otimer_stop","tags":"","loc":"proc/otimer_stop.html"},{"title":"otimer_write – ForTime","text":"private impure subroutine otimer_write(this, file_name) Uses omp_lib proc~~otimer_write~~UsesGraph proc~otimer_write timer%otimer_write omp_lib omp_lib proc~otimer_write->omp_lib Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Writes the OMP time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~otimer_write~~CalledByGraph proc~otimer_write timer%otimer_write program~test20 test20 program~test20->proc~otimer_write program~test21 test21 program~test21->proc~otimer_write program~test8 test8 program~test8->proc~otimer_write program~test9 test9 program~test9->proc~otimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine otimer_write ( this , file_name ) use omp_lib class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the OMP time to the file write ( nunit , '(g0)' ) this % omp_time ! Close the file close ( nunit ) end subroutine otimer_write","tags":"","loc":"proc/otimer_write.html"},{"title":"mtimer_start – ForTime","text":"private impure subroutine mtimer_start(this) Starts the timer by recording the current MPI time value.\nThis value is used to calculate the MPI time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~mtimer_start~~CalledByGraph proc~mtimer_start timer%mtimer_start program~test10 test10 program~test10->proc~mtimer_start program~test11 test11 program~test11->proc~mtimer_start program~test12 test12 program~test12->proc~mtimer_start program~test22 test22 program~test22->proc~mtimer_start program~test23 test23 program~test23->proc~mtimer_start program~test24 test24 program~test24->proc~mtimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine mtimer_start ( this ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Start the timer this % mpi_start = mpi_wtime () end subroutine mtimer_start","tags":"","loc":"proc/mtimer_start.html"},{"title":"mtimer_stop – ForTime","text":"private impure subroutine mtimer_stop(this, nloops, message, print) Stops the timer and calculates the MPI time.\nOptionally, it can print a message along with the MPI time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print Calls proc~~mtimer_stop~~CallsGraph proc~mtimer_stop timer%mtimer_stop proc~print_time print_time proc~mtimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~mtimer_stop~~CalledByGraph proc~mtimer_stop timer%mtimer_stop program~test10 test10 program~test10->proc~mtimer_stop program~test11 test11 program~test11->proc~mtimer_stop program~test12 test12 program~test12->proc~mtimer_stop program~test22 test22 program~test22->proc~mtimer_stop program~test23 test23 program~test23->proc~mtimer_stop program~test24 test24 program~test24->proc~mtimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine mtimer_stop ( this , nloops , message , print ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Stop the timer this % mpi_end = mpi_wtime () ! Calculate the elapsed MPI time this % mpi_elapsed = this % mpi_end - this % mpi_start ! Convert MPI time to seconds if (. not . present ( nloops )) this % mpi_time = this % mpi_elapsed if ( present ( nloops )) this % mpi_time = this % mpi_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"MPI time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % mpi_time , msg ) else call print_time ( this % mpi_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine mtimer_stop","tags":"","loc":"proc/mtimer_stop.html"},{"title":"mtimer_write – ForTime","text":"private impure subroutine mtimer_write(this, file_name) Writes the MPI time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~mtimer_write~~CalledByGraph proc~mtimer_write timer%mtimer_write program~test11 test11 program~test11->proc~mtimer_write program~test12 test12 program~test12->proc~mtimer_write program~test23 test23 program~test23->proc~mtimer_write program~test24 test24 program~test24->proc~mtimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine mtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the MPI time to the file write ( nunit , '(g0)' ) this % mpi_time ! Close the file close ( nunit ) end subroutine mtimer_write","tags":"","loc":"proc/mtimer_write.html"},{"title":"dtimer_start – ForTime","text":"private impure subroutine dtimer_start(this) Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~dtimer_start~~CalledByGraph proc~dtimer_start timer%dtimer_start program~example5 example5 program~example5->proc~dtimer_start program~example6 example6 program~example6->proc~dtimer_start program~test25 test25 program~test25->proc~dtimer_start program~test26 test26 program~test26->proc~dtimer_start program~test27 test27 program~test27->proc~dtimer_start program~test28 test28 program~test28->proc~dtimer_start program~test29 test29 program~test29->proc~dtimer_start program~test30 test30 program~test30->proc~dtimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine dtimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call date_and_time ( values = this % values_start ) end subroutine dtimer_start","tags":"","loc":"proc/dtimer_start.html"},{"title":"dtimer_stop – ForTime","text":"private impure subroutine dtimer_stop(this, nloops, message, print) Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print Calls proc~~dtimer_stop~~CallsGraph proc~dtimer_stop timer%dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~dtimer_stop~~CalledByGraph proc~dtimer_stop timer%dtimer_stop program~example5 example5 program~example5->proc~dtimer_stop program~example6 example6 program~example6->proc~dtimer_stop program~test25 test25 program~test25->proc~dtimer_stop program~test26 test26 program~test26->proc~dtimer_stop program~test27 test27 program~test27->proc~dtimer_stop program~test28 test28 program~test28->proc~dtimer_stop program~test29 test29 program~test29->proc~dtimer_stop program~test30 test30 program~test30->proc~dtimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine dtimer_stop ( this , nloops , message , print ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print real ( rk ) :: values_elapsed_sec ! Stop the timer call date_and_time ( values = this % values_end ) ! Calculate the elapsed processor ticks this % values_elapsed = this % values_end - this % values_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) if ( present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_dtime , msg ) else call print_time ( this % elapsed_dtime , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine dtimer_stop","tags":"","loc":"proc/dtimer_stop.html"},{"title":"dtimer_write – ForTime","text":"private impure subroutine dtimer_write(this, file_name) Writes the elapsed time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~dtimer_write~~CalledByGraph proc~dtimer_write timer%dtimer_write program~example6 example6 program~example6->proc~dtimer_write program~test26 test26 program~test26->proc~dtimer_write program~test27 test27 program~test27->proc~dtimer_write program~test29 test29 program~test29->proc~dtimer_write program~test30 test30 program~test30->proc~dtimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine dtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_dtime ! Close the file close ( nunit ) end subroutine dtimer_write","tags":"","loc":"proc/dtimer_write.html"},{"title":"print_time – ForTime","text":"private impure subroutine print_time(time, message) Arguments Type Intent Optional Attributes Name real(kind=rk), intent(in) :: time character(len=*), intent(in) :: message Called by proc~~print_time~~CalledByGraph proc~print_time print_time proc~ctimer_stop timer%ctimer_stop proc~ctimer_stop->proc~print_time proc~dtimer_stop timer%dtimer_stop proc~dtimer_stop->proc~print_time proc~mtimer_stop timer%mtimer_stop proc~mtimer_stop->proc~print_time proc~otimer_stop timer%otimer_stop proc~otimer_stop->proc~print_time proc~timer_stop timer%timer_stop proc~timer_stop->proc~print_time program~example1 example1 program~example1->proc~timer_stop program~example2 example2 program~example2->proc~timer_stop program~example3 example3 program~example3->proc~ctimer_stop program~example4 example4 program~example4->proc~ctimer_stop program~example5 example5 program~example5->proc~dtimer_stop program~example6 example6 program~example6->proc~dtimer_stop program~test1 test1 program~test1->proc~timer_stop program~test10 test10 program~test10->proc~mtimer_stop program~test11 test11 program~test11->proc~mtimer_stop program~test12 test12 program~test12->proc~mtimer_stop program~test13 test13 program~test13->proc~timer_stop program~test14 test14 program~test14->proc~timer_stop program~test15 test15 program~test15->proc~timer_stop program~test16 test16 program~test16->proc~ctimer_stop program~test17 test17 program~test17->proc~ctimer_stop program~test18 test18 program~test18->proc~ctimer_stop program~test19 test19 program~test19->proc~otimer_stop program~test2 test2 program~test2->proc~timer_stop program~test20 test20 program~test20->proc~otimer_stop program~test21 test21 program~test21->proc~otimer_stop program~test22 test22 program~test22->proc~mtimer_stop program~test23 test23 program~test23->proc~mtimer_stop program~test24 test24 program~test24->proc~mtimer_stop program~test25 test25 program~test25->proc~dtimer_stop program~test26 test26 program~test26->proc~dtimer_stop program~test27 test27 program~test27->proc~dtimer_stop program~test28 test28 program~test28->proc~dtimer_stop program~test29 test29 program~test29->proc~dtimer_stop program~test3 test3 program~test3->proc~timer_stop program~test30 test30 program~test30->proc~dtimer_stop program~test4 test4 program~test4->proc~ctimer_stop program~test5 test5 program~test5->proc~ctimer_stop program~test6 test6 program~test6->proc~ctimer_stop program~test7 test7 program~test7->proc~otimer_stop program~test8 test8 program~test8->proc~otimer_stop program~test9 test9 program~test9->proc~otimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine print_time ( time , message ) real ( rk ), intent ( in ) :: time character ( * ), intent ( in ) :: message print '(A, F16.9, \" [s]\")' , trim ( message ), time end subroutine print_time","tags":"","loc":"proc/print_time.html"},{"title":"fortime – ForTime","text":"This module provides a timer object for measuring elapsed time.\nIt includes procedures for starting and stopping the timer, as well\nas calculating and printing the elapsed time in seconds. Uses kinds module~~fortime~~UsesGraph module~fortime fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Used by module~~fortime~~UsedByGraph module~fortime fortime program~example1 example1 program~example1->module~fortime program~example2 example2 program~example2->module~fortime program~example3 example3 program~example3->module~fortime program~example4 example4 program~example4->module~fortime program~example5 example5 program~example5->module~fortime program~example6 example6 program~example6->module~fortime program~test1 test1 program~test1->module~fortime program~test10 test10 program~test10->module~fortime program~test11 test11 program~test11->module~fortime program~test12 test12 program~test12->module~fortime program~test13 test13 program~test13->module~fortime program~test14 test14 program~test14->module~fortime program~test15 test15 program~test15->module~fortime program~test16 test16 program~test16->module~fortime program~test17 test17 program~test17->module~fortime program~test18 test18 program~test18->module~fortime program~test19 test19 program~test19->module~fortime program~test2 test2 program~test2->module~fortime program~test20 test20 program~test20->module~fortime program~test21 test21 program~test21->module~fortime program~test22 test22 program~test22->module~fortime program~test23 test23 program~test23->module~fortime program~test24 test24 program~test24->module~fortime program~test25 test25 program~test25->module~fortime program~test26 test26 program~test26->module~fortime program~test27 test27 program~test27->module~fortime program~test28 test28 program~test28->module~fortime program~test29 test29 program~test29->module~fortime program~test3 test3 program~test3->module~fortime program~test30 test30 program~test30->module~fortime program~test4 test4 program~test4->module~fortime program~test5 test5 program~test5->module~fortime program~test6 test6 program~test6->module~fortime program~test7 test7 program~test7->module~fortime program~test8 test8 program~test8->module~fortime program~test9 test9 program~test9->module~fortime Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Derived Types type, public :: timer Components Type Visibility Attributes Name Initial integer, private :: clock_rate integer, private :: clock_start integer, private :: clock_end integer, private :: clock_elapsed real(kind=rk), public :: elapsed_time real(kind=rk), private :: cpu_start real(kind=rk), private :: cpu_end real(kind=rk), private :: cpu_elapsed real(kind=rk), public :: cpu_time real(kind=rk), private :: omp_start real(kind=rk), private :: omp_end real(kind=rk), private :: omp_elapsed real(kind=rk), public :: omp_time real(kind=rk), private :: mpi_start real(kind=rk), private :: mpi_end real(kind=rk), private :: mpi_elapsed real(kind=rk), public :: mpi_time integer, private, dimension(8) :: values_start integer, private, dimension(8) :: values_end integer, private, dimension(8) :: values_elapsed real(kind=rk), public :: elapsed_dtime Type-Bound Procedures procedure, public :: timer_start procedure, public :: timer_stop procedure, public :: timer_write procedure, public :: ctimer_start procedure, public :: ctimer_stop procedure, public :: ctimer_write procedure, public :: otimer_start procedure, public :: otimer_stop procedure, public :: otimer_write procedure, public :: mtimer_start procedure, public :: mtimer_stop procedure, public :: mtimer_write procedure, public :: dtimer_start procedure, public :: dtimer_stop procedure, public :: dtimer_write Functions private pure function to_seconds (values) result(seconds) Author Seyed Ali Ghasemi Arguments Type Intent Optional Attributes Name integer, intent(in), dimension(8) :: values Return Value real(kind=rk) Subroutines private impure subroutine timer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine timer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print private impure subroutine timer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine ctimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current CPU time value.\nThis value is used to calculate the CPU time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine ctimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the CPU time.\nOptionally, it can print a message along with the CPU time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print private impure subroutine ctimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the CPU time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine otimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current OMP time value.\nThis value is used to calculate the OMP time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine otimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the OMP time.\nOptionally, it can print a message along with the OMP time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print private impure subroutine otimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the OMP time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine mtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current MPI time value.\nThis value is used to calculate the MPI time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine mtimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the MPI time.\nOptionally, it can print a message along with the MPI time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print private impure subroutine mtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the MPI time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine dtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine dtimer_stop (this, nloops, message, print) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print private impure subroutine dtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine print_time (time, message) Author Seyed Ali Ghasemi Arguments Type Intent Optional Attributes Name real(kind=rk), intent(in) :: time character(len=*), intent(in) :: message","tags":"","loc":"module/fortime.html"},{"title":"test28 – ForTime","text":"Uses forunittest kinds fortime program~~test28~~UsesGraph program~test28 test28 forunittest forunittest program~test28->forunittest kinds kinds program~test28->kinds module~fortime fortime program~test28->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test28~~CallsGraph program~test28 test28 check check program~test28->check proc~dtimer_start timer%dtimer_start program~test28->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test28->proc~dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test28 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop ( print = . false .) call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test28' ) end program test28","tags":"","loc":"program/test28.html"},{"title":"test14 – ForTime","text":"Uses forunittest kinds fortime program~~test14~~UsesGraph program~test14 test14 forunittest forunittest program~test14->forunittest kinds kinds program~test14->kinds module~fortime fortime program~test14->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test14~~CallsGraph program~test14 test14 check check program~test14->check proc~timer_start timer%timer_start program~test14->proc~timer_start proc~timer_stop timer%timer_stop program~test14->proc~timer_stop proc~timer_write timer%timer_write program~test14->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test14 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test14_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test14' ) end program test14","tags":"","loc":"program/test14.html"},{"title":"test21 – ForTime","text":"Uses forunittest kinds fortime program~~test21~~UsesGraph program~test21 test21 forunittest forunittest program~test21->forunittest kinds kinds program~test21->kinds module~fortime fortime program~test21->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test21~~CallsGraph program~test21 test21 check check program~test21->check proc~otimer_start timer%otimer_start program~test21->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test21->proc~otimer_stop proc~otimer_write timer%otimer_write program~test21->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test21 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test21_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test21' ) #endif end program test21","tags":"","loc":"program/test21.html"},{"title":"test1 – ForTime","text":"Uses forunittest kinds fortime program~~test1~~UsesGraph program~test1 test1 forunittest forunittest program~test1->forunittest kinds kinds program~test1->kinds module~fortime fortime program~test1->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test1~~CallsGraph program~test1 test1 check check program~test1->check proc~timer_start timer%timer_start program~test1->proc~timer_start proc~timer_stop timer%timer_stop program~test1->proc~timer_stop proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test1 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test1' ) end program test1","tags":"","loc":"program/test1.html"},{"title":"test7 – ForTime","text":"Uses forunittest kinds fortime program~~test7~~UsesGraph program~test7 test7 forunittest forunittest program~test7->forunittest kinds kinds program~test7->kinds module~fortime fortime program~test7->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test7~~CallsGraph program~test7 test7 check check program~test7->check proc~otimer_start timer%otimer_start program~test7->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test7->proc~otimer_stop omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test7 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop () call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test7' ) #endif end program test7","tags":"","loc":"program/test7.html"},{"title":"test13 – ForTime","text":"Uses forunittest kinds fortime program~~test13~~UsesGraph program~test13 test13 forunittest forunittest program~test13->forunittest kinds kinds program~test13->kinds module~fortime fortime program~test13->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test13~~CallsGraph program~test13 test13 check check program~test13->check proc~timer_start timer%timer_start program~test13->proc~timer_start proc~timer_stop timer%timer_stop program~test13->proc~timer_stop proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test13 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop ( print = . false .) call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test13' ) end program test13","tags":"","loc":"program/test13.html"},{"title":"test16 – ForTime","text":"Uses kinds fortime program~~test16~~UsesGraph program~test16 test16 kinds kinds program~test16->kinds module~fortime fortime program~test16->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test16~~CallsGraph program~test16 test16 proc~ctimer_start timer%ctimer_start program~test16->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test16->proc~ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program test16 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop ( print = . false .) end program test16","tags":"","loc":"program/test16.html"},{"title":"test24 – ForTime","text":"Uses forunittest kinds fortime program~~test24~~UsesGraph program~test24 test24 forunittest forunittest program~test24->forunittest kinds kinds program~test24->kinds module~fortime fortime program~test24->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test24~~CallsGraph program~test24 test24 check check program~test24->check mpi_finalize mpi_finalize program~test24->mpi_finalize mpi_init mpi_init program~test24->mpi_init proc~mtimer_start timer%mtimer_start program~test24->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test24->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test24->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test24 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test24_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test24' ) #endif end program test24","tags":"","loc":"program/test24.html"},{"title":"test10 – ForTime","text":"Uses forunittest kinds fortime program~~test10~~UsesGraph program~test10 test10 forunittest forunittest program~test10->forunittest kinds kinds program~test10->kinds module~fortime fortime program~test10->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test10~~CallsGraph program~test10 test10 check check program~test10->check mpi_finalize mpi_finalize program~test10->mpi_finalize mpi_init mpi_init program~test10->mpi_init proc~mtimer_start timer%mtimer_start program~test10->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test10->proc~mtimer_stop proc~print_time print_time proc~mtimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: ierr Source Code program test10 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop () call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test10' ) #endif end program test10","tags":"","loc":"program/test10.html"},{"title":"test27 – ForTime","text":"Uses forunittest kinds fortime program~~test27~~UsesGraph program~test27 test27 forunittest forunittest program~test27->forunittest kinds kinds program~test27->kinds module~fortime fortime program~test27->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test27~~CallsGraph program~test27 test27 check check program~test27->check proc~dtimer_start timer%dtimer_start program~test27->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test27->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test27->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test27 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test27_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test27' ) end program test27","tags":"","loc":"program/test27.html"},{"title":"example4 – ForTime","text":"Uses fortime program~~example4~~UsesGraph program~example4 example4 module~fortime fortime program~example4->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example4~~CallsGraph program~example4 example4 proc~ctimer_start timer%ctimer_start program~example4->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~example4->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~example4->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program example4 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . true .) ! nloops, message and print are optional call t % ctimer_write ( 'example/example4_ctimes' ) ! Optionally, write the elapsed time to a file end program example4","tags":"","loc":"program/example4.html"},{"title":"test25 – ForTime","text":"Uses forunittest kinds fortime program~~test25~~UsesGraph program~test25 test25 forunittest forunittest program~test25->forunittest kinds kinds program~test25->kinds module~fortime fortime program~test25->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test25~~CallsGraph program~test25 test25 check check program~test25->check proc~dtimer_start timer%dtimer_start program~test25->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test25->proc~dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test25 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test25' ) end program test25","tags":"","loc":"program/test25.html"},{"title":"test8 – ForTime","text":"Uses forunittest kinds fortime program~~test8~~UsesGraph program~test8 test8 forunittest forunittest program~test8->forunittest kinds kinds program~test8->kinds module~fortime fortime program~test8->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test8~~CallsGraph program~test8 test8 check check program~test8->check proc~otimer_start timer%otimer_start program~test8->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test8->proc~otimer_stop proc~otimer_write timer%otimer_write program~test8->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test8 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' ) call t % otimer_write ( 'test/test8_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test8' ) #endif end program test8","tags":"","loc":"program/test8.html"},{"title":"test29 – ForTime","text":"Uses forunittest kinds fortime program~~test29~~UsesGraph program~test29 test29 forunittest forunittest program~test29->forunittest kinds kinds program~test29->kinds module~fortime fortime program~test29->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test29~~CallsGraph program~test29 test29 check check program~test29->check proc~dtimer_start timer%dtimer_start program~test29->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test29->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test29->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test29 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test29_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test29' ) end program test29","tags":"","loc":"program/test29.html"},{"title":"test19 – ForTime","text":"Uses forunittest kinds fortime program~~test19~~UsesGraph program~test19 test19 forunittest forunittest program~test19->forunittest kinds kinds program~test19->kinds module~fortime fortime program~test19->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test19~~CallsGraph program~test19 test19 check check program~test19->check proc~otimer_start timer%otimer_start program~test19->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test19->proc~otimer_stop omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test19 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop ( print = . false .) call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test19' ) #endif end program test19","tags":"","loc":"program/test19.html"},{"title":"test17 – ForTime","text":"Uses kinds fortime program~~test17~~UsesGraph program~test17 test17 kinds kinds program~test17->kinds module~fortime fortime program~test17->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test17~~CallsGraph program~test17 test17 proc~ctimer_start timer%ctimer_start program~test17->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test17->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test17->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test17 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test17_ctimes' ) ! Optionally, write the elapsed time to a file end program test17","tags":"","loc":"program/test17.html"},{"title":"test11 – ForTime","text":"Uses forunittest kinds fortime program~~test11~~UsesGraph program~test11 test11 forunittest forunittest program~test11->forunittest kinds kinds program~test11->kinds module~fortime fortime program~test11->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test11~~CallsGraph program~test11 test11 check check program~test11->check mpi_finalize mpi_finalize program~test11->mpi_finalize mpi_init mpi_init program~test11->mpi_init proc~mtimer_start timer%mtimer_start program~test11->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test11->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test11->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test11 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test11_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test11' ) #endif end program test11","tags":"","loc":"program/test11.html"},{"title":"test3 – ForTime","text":"Uses forunittest kinds fortime program~~test3~~UsesGraph program~test3 test3 forunittest forunittest program~test3->forunittest kinds kinds program~test3->kinds module~fortime fortime program~test3->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test3~~CallsGraph program~test3 test3 check check program~test3->check proc~timer_start timer%timer_start program~test3->proc~timer_start proc~timer_stop timer%timer_stop program~test3->proc~timer_stop proc~timer_write timer%timer_write program~test3->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test3 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' ) call t % timer_write ( 'test/test3_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test3' ) end program test3","tags":"","loc":"program/test3.html"},{"title":"example3 – ForTime","text":"Uses fortime program~~example3~~UsesGraph program~example3 example3 module~fortime fortime program~example3->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example3~~CallsGraph program~example3 example3 proc~ctimer_start timer%ctimer_start program~example3->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~example3->proc~ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program example3 use fortime implicit none type ( timer ) :: t call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program example3","tags":"","loc":"program/example3.html"},{"title":"test26 – ForTime","text":"Uses forunittest kinds fortime program~~test26~~UsesGraph program~test26 test26 forunittest forunittest program~test26->forunittest kinds kinds program~test26->kinds module~fortime fortime program~test26->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test26~~CallsGraph program~test26 test26 check check program~test26->check proc~dtimer_start timer%dtimer_start program~test26->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test26->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test26->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test26 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test26_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test26' ) end program test26","tags":"","loc":"program/test26.html"},{"title":"test2 – ForTime","text":"Uses forunittest kinds fortime program~~test2~~UsesGraph program~test2 test2 forunittest forunittest program~test2->forunittest kinds kinds program~test2->kinds module~fortime fortime program~test2->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test2~~CallsGraph program~test2 test2 check check program~test2->check proc~timer_start timer%timer_start program~test2->proc~timer_start proc~timer_stop timer%timer_stop program~test2->proc~timer_stop proc~timer_write timer%timer_write program~test2->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test2 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % timer_write ( 'test/test2_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test2' ) end program test2","tags":"","loc":"program/test2.html"},{"title":"example5 – ForTime","text":"Uses fortime program~~example5~~UsesGraph program~example5 example5 module~fortime fortime program~example5->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example5~~CallsGraph program~example5 example5 proc~dtimer_start timer%dtimer_start program~example5->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~example5->proc~dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program example5 use fortime implicit none type ( timer ) :: t call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () end program example5","tags":"","loc":"program/example5.html"},{"title":"test6 – ForTime","text":"Uses kinds fortime program~~test6~~UsesGraph program~test6 test6 kinds kinds program~test6->kinds module~fortime fortime program~test6->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test6~~CallsGraph program~test6 test6 proc~ctimer_start timer%ctimer_start program~test6->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test6->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test6->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test6 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' ) call t % ctimer_write ( 'test/test6_ctimes' ) ! Optionally, write the elapsed time to a file end program test6","tags":"","loc":"program/test6.html"},{"title":"test15 – ForTime","text":"Uses forunittest kinds fortime program~~test15~~UsesGraph program~test15 test15 forunittest forunittest program~test15->forunittest kinds kinds program~test15->kinds module~fortime fortime program~test15->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test15~~CallsGraph program~test15 test15 check check program~test15->check proc~timer_start timer%timer_start program~test15->proc~timer_start proc~timer_stop timer%timer_stop program~test15->proc~timer_stop proc~timer_write timer%timer_write program~test15->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test15 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test15_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test15' ) end program test15","tags":"","loc":"program/test15.html"},{"title":"test9 – ForTime","text":"Uses forunittest kinds fortime program~~test9~~UsesGraph program~test9 test9 forunittest forunittest program~test9->forunittest kinds kinds program~test9->kinds module~fortime fortime program~test9->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test9~~CallsGraph program~test9 test9 check check program~test9->check proc~otimer_start timer%otimer_start program~test9->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test9->proc~otimer_stop proc~otimer_write timer%otimer_write program~test9->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test9 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' ) call t % otimer_write ( 'test/test9_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test9' ) #endif end program test9","tags":"","loc":"program/test9.html"},{"title":"test4 – ForTime","text":"Uses kinds fortime program~~test4~~UsesGraph program~test4 test4 kinds kinds program~test4->kinds module~fortime fortime program~test4->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test4~~CallsGraph program~test4 test4 proc~ctimer_start timer%ctimer_start program~test4->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test4->proc~ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program test4 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program test4","tags":"","loc":"program/test4.html"},{"title":"test18 – ForTime","text":"Uses kinds fortime program~~test18~~UsesGraph program~test18 test18 kinds kinds program~test18->kinds module~fortime fortime program~test18->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test18~~CallsGraph program~test18 test18 proc~ctimer_start timer%ctimer_start program~test18->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test18->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test18->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test18 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test18_ctimes' ) ! Optionally, write the elapsed time to a file end program test18","tags":"","loc":"program/test18.html"},{"title":"test23 – ForTime","text":"Uses forunittest kinds fortime program~~test23~~UsesGraph program~test23 test23 forunittest forunittest program~test23->forunittest kinds kinds program~test23->kinds module~fortime fortime program~test23->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test23~~CallsGraph program~test23 test23 check check program~test23->check mpi_finalize mpi_finalize program~test23->mpi_finalize mpi_init mpi_init program~test23->mpi_init proc~mtimer_start timer%mtimer_start program~test23->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test23->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test23->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test23 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test23_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test23' ) #endif end program test23","tags":"","loc":"program/test23.html"},{"title":"test12 – ForTime","text":"Uses forunittest kinds fortime program~~test12~~UsesGraph program~test12 test12 forunittest forunittest program~test12->forunittest kinds kinds program~test12->kinds module~fortime fortime program~test12->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test12~~CallsGraph program~test12 test12 check check program~test12->check mpi_finalize mpi_finalize program~test12->mpi_finalize mpi_init mpi_init program~test12->mpi_init proc~mtimer_start timer%mtimer_start program~test12->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test12->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test12->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test12 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test12_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test12' ) #endif end program test12","tags":"","loc":"program/test12.html"},{"title":"example2 – ForTime","text":"Uses fortime program~~example2~~UsesGraph program~example2 example2 module~fortime fortime program~example2->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example2~~CallsGraph program~example2 example2 proc~timer_start timer%timer_start program~example2->proc~timer_start proc~timer_stop timer%timer_stop program~example2->proc~timer_stop proc~timer_write timer%timer_write program~example2->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program example2 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true .) ! nloops, message and print are optional. call t % timer_write ( 'example/example2_etimes' ) ! Optionally, write the elapsed time to a file end program example2","tags":"","loc":"program/example2.html"},{"title":"example1 – ForTime","text":"Uses fortime program~~example1~~UsesGraph program~example1 example1 module~fortime fortime program~example1->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example1~~CallsGraph program~example1 example1 proc~timer_start timer%timer_start program~example1->proc~timer_start proc~timer_stop timer%timer_stop program~example1->proc~timer_stop proc~print_time print_time proc~timer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program example1 use fortime implicit none type ( timer ) :: t call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () end program example1","tags":"","loc":"program/example1.html"},{"title":"test30 – ForTime","text":"Uses forunittest kinds fortime program~~test30~~UsesGraph program~test30 test30 forunittest forunittest program~test30->forunittest kinds kinds program~test30->kinds module~fortime fortime program~test30->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test30~~CallsGraph program~test30 test30 check check program~test30->check proc~dtimer_start timer%dtimer_start program~test30->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test30->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test30->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test30 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test30_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test30' ) end program test30","tags":"","loc":"program/test30.html"},{"title":"example6 – ForTime","text":"Uses fortime program~~example6~~UsesGraph program~example6 example6 module~fortime fortime program~example6->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example6~~CallsGraph program~example6 example6 proc~dtimer_start timer%dtimer_start program~example6->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~example6->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~example6->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program example6 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true .) ! nloops, message and print are optional. call t % dtimer_write ( 'example/example6_etimes' ) ! Optionally, write the elapsed time to a file end program example6","tags":"","loc":"program/example6.html"},{"title":"test22 – ForTime","text":"Uses forunittest kinds fortime program~~test22~~UsesGraph program~test22 test22 forunittest forunittest program~test22->forunittest kinds kinds program~test22->kinds module~fortime fortime program~test22->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test22~~CallsGraph program~test22 test22 check check program~test22->check mpi_finalize mpi_finalize program~test22->mpi_finalize mpi_init mpi_init program~test22->mpi_init proc~mtimer_start timer%mtimer_start program~test22->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test22->proc~mtimer_stop proc~print_time print_time proc~mtimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: ierr Source Code program test22 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop ( print = . false .) call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test22' ) #endif end program test22","tags":"","loc":"program/test22.html"},{"title":"test5 – ForTime","text":"Uses kinds fortime program~~test5~~UsesGraph program~test5 test5 kinds kinds program~test5->kinds module~fortime fortime program~test5->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test5~~CallsGraph program~test5 test5 proc~ctimer_start timer%ctimer_start program~test5->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test5->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test5->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test5 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' ) call t % ctimer_write ( 'test/test5_ctimes' ) ! Optionally, write the elapsed time to a file end program test5","tags":"","loc":"program/test5.html"},{"title":"test20 – ForTime","text":"Uses forunittest kinds fortime program~~test20~~UsesGraph program~test20 test20 forunittest forunittest program~test20->forunittest kinds kinds program~test20->kinds module~fortime fortime program~test20->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test20~~CallsGraph program~test20 test20 check check program~test20->check proc~otimer_start timer%otimer_start program~test20->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test20->proc~otimer_stop proc~otimer_write timer%otimer_write program~test20->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test20 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test20_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test20' ) #endif end program test20","tags":"","loc":"program/test20.html"},{"title":"test28.f90 – ForTime","text":"This file depends on sourcefile~~test28.f90~~EfferentGraph sourcefile~test28.f90 test28.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test28.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test28 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop ( print = . false .) call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test28' ) end program test28","tags":"","loc":"sourcefile/test28.f90.html"},{"title":"test14.f90 – ForTime","text":"This file depends on sourcefile~~test14.f90~~EfferentGraph sourcefile~test14.f90 test14.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test14.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test14 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test14_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test14' ) end program test14","tags":"","loc":"sourcefile/test14.f90.html"},{"title":"test21.f90 – ForTime","text":"This file depends on sourcefile~~test21.f90~~EfferentGraph sourcefile~test21.f90 test21.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test21.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test21 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test21_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test21' ) #endif end program test21","tags":"","loc":"sourcefile/test21.f90.html"},{"title":"test1.f90 – ForTime","text":"This file depends on sourcefile~~test1.f90~~EfferentGraph sourcefile~test1.f90 test1.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test1.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test1 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test1' ) end program test1","tags":"","loc":"sourcefile/test1.f90.html"},{"title":"test7.f90 – ForTime","text":"This file depends on sourcefile~~test7.f90~~EfferentGraph sourcefile~test7.f90 test7.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test7.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test7 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop () call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test7' ) #endif end program test7","tags":"","loc":"sourcefile/test7.f90.html"},{"title":"test13.f90 – ForTime","text":"This file depends on sourcefile~~test13.f90~~EfferentGraph sourcefile~test13.f90 test13.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test13.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test13 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop ( print = . false .) call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test13' ) end program test13","tags":"","loc":"sourcefile/test13.f90.html"},{"title":"test16.f90 – ForTime","text":"This file depends on sourcefile~~test16.f90~~EfferentGraph sourcefile~test16.f90 test16.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test16.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test16 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop ( print = . false .) end program test16","tags":"","loc":"sourcefile/test16.f90.html"},{"title":"test24.f90 – ForTime","text":"This file depends on sourcefile~~test24.f90~~EfferentGraph sourcefile~test24.f90 test24.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test24.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test24 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test24_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test24' ) #endif end program test24","tags":"","loc":"sourcefile/test24.f90.html"},{"title":"test10.f90 – ForTime","text":"This file depends on sourcefile~~test10.f90~~EfferentGraph sourcefile~test10.f90 test10.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test10.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test10 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop () call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test10' ) #endif end program test10","tags":"","loc":"sourcefile/test10.f90.html"},{"title":"test27.f90 – ForTime","text":"This file depends on sourcefile~~test27.f90~~EfferentGraph sourcefile~test27.f90 test27.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test27.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test27 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test27_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test27' ) end program test27","tags":"","loc":"sourcefile/test27.f90.html"},{"title":"example4.f90 – ForTime","text":"This file depends on sourcefile~~example4.f90~~EfferentGraph sourcefile~example4.f90 example4.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example4.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example4 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . true .) ! nloops, message and print are optional call t % ctimer_write ( 'example/example4_ctimes' ) ! Optionally, write the elapsed time to a file end program example4","tags":"","loc":"sourcefile/example4.f90.html"},{"title":"test25.f90 – ForTime","text":"This file depends on sourcefile~~test25.f90~~EfferentGraph sourcefile~test25.f90 test25.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test25.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test25 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test25' ) end program test25","tags":"","loc":"sourcefile/test25.f90.html"},{"title":"test8.f90 – ForTime","text":"This file depends on sourcefile~~test8.f90~~EfferentGraph sourcefile~test8.f90 test8.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test8.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test8 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' ) call t % otimer_write ( 'test/test8_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test8' ) #endif end program test8","tags":"","loc":"sourcefile/test8.f90.html"},{"title":"test29.f90 – ForTime","text":"This file depends on sourcefile~~test29.f90~~EfferentGraph sourcefile~test29.f90 test29.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test29.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test29 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test29_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test29' ) end program test29","tags":"","loc":"sourcefile/test29.f90.html"},{"title":"test19.f90 – ForTime","text":"This file depends on sourcefile~~test19.f90~~EfferentGraph sourcefile~test19.f90 test19.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test19.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test19 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop ( print = . false .) call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test19' ) #endif end program test19","tags":"","loc":"sourcefile/test19.f90.html"},{"title":"fortime.f90 – ForTime","text":"Files dependent on this one sourcefile~~fortime.f90~~AfferentGraph sourcefile~fortime.f90 fortime.f90 sourcefile~example1.f90 example1.f90 sourcefile~example1.f90->sourcefile~fortime.f90 sourcefile~example2.f90 example2.f90 sourcefile~example2.f90->sourcefile~fortime.f90 sourcefile~example3.f90 example3.f90 sourcefile~example3.f90->sourcefile~fortime.f90 sourcefile~example4.f90 example4.f90 sourcefile~example4.f90->sourcefile~fortime.f90 sourcefile~example5.f90 example5.f90 sourcefile~example5.f90->sourcefile~fortime.f90 sourcefile~example6.f90 example6.f90 sourcefile~example6.f90->sourcefile~fortime.f90 sourcefile~test1.f90 test1.f90 sourcefile~test1.f90->sourcefile~fortime.f90 sourcefile~test10.f90 test10.f90 sourcefile~test10.f90->sourcefile~fortime.f90 sourcefile~test11.f90 test11.f90 sourcefile~test11.f90->sourcefile~fortime.f90 sourcefile~test12.f90 test12.f90 sourcefile~test12.f90->sourcefile~fortime.f90 sourcefile~test13.f90 test13.f90 sourcefile~test13.f90->sourcefile~fortime.f90 sourcefile~test14.f90 test14.f90 sourcefile~test14.f90->sourcefile~fortime.f90 sourcefile~test15.f90 test15.f90 sourcefile~test15.f90->sourcefile~fortime.f90 sourcefile~test16.f90 test16.f90 sourcefile~test16.f90->sourcefile~fortime.f90 sourcefile~test17.f90 test17.f90 sourcefile~test17.f90->sourcefile~fortime.f90 sourcefile~test18.f90 test18.f90 sourcefile~test18.f90->sourcefile~fortime.f90 sourcefile~test19.f90 test19.f90 sourcefile~test19.f90->sourcefile~fortime.f90 sourcefile~test2.f90 test2.f90 sourcefile~test2.f90->sourcefile~fortime.f90 sourcefile~test20.f90 test20.f90 sourcefile~test20.f90->sourcefile~fortime.f90 sourcefile~test21.f90 test21.f90 sourcefile~test21.f90->sourcefile~fortime.f90 sourcefile~test22.f90 test22.f90 sourcefile~test22.f90->sourcefile~fortime.f90 sourcefile~test23.f90 test23.f90 sourcefile~test23.f90->sourcefile~fortime.f90 sourcefile~test24.f90 test24.f90 sourcefile~test24.f90->sourcefile~fortime.f90 sourcefile~test25.f90 test25.f90 sourcefile~test25.f90->sourcefile~fortime.f90 sourcefile~test26.f90 test26.f90 sourcefile~test26.f90->sourcefile~fortime.f90 sourcefile~test27.f90 test27.f90 sourcefile~test27.f90->sourcefile~fortime.f90 sourcefile~test28.f90 test28.f90 sourcefile~test28.f90->sourcefile~fortime.f90 sourcefile~test29.f90 test29.f90 sourcefile~test29.f90->sourcefile~fortime.f90 sourcefile~test3.f90 test3.f90 sourcefile~test3.f90->sourcefile~fortime.f90 sourcefile~test30.f90 test30.f90 sourcefile~test30.f90->sourcefile~fortime.f90 sourcefile~test4.f90 test4.f90 sourcefile~test4.f90->sourcefile~fortime.f90 sourcefile~test5.f90 test5.f90 sourcefile~test5.f90->sourcefile~fortime.f90 sourcefile~test6.f90 test6.f90 sourcefile~test6.f90->sourcefile~fortime.f90 sourcefile~test7.f90 test7.f90 sourcefile~test7.f90->sourcefile~fortime.f90 sourcefile~test8.f90 test8.f90 sourcefile~test8.f90->sourcefile~fortime.f90 sourcefile~test9.f90 test9.f90 sourcefile~test9.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code !> This module provides a timer object for measuring elapsed time. !> It includes procedures for starting and stopping the timer, as well !> as calculating and printing the elapsed time in seconds. module fortime use kinds implicit none private public :: timer !=============================================================================== type :: timer integer , private :: clock_rate ! Processor clock rate integer , private :: clock_start ! Start time in processor ticks integer , private :: clock_end ! End time in processor ticks integer , private :: clock_elapsed ! Elapsed time in processor ticks real ( rk ) :: elapsed_time ! Elapsed time in seconds real ( rk ), private :: cpu_start ! Start CPU time real ( rk ), private :: cpu_end ! End CPU time real ( rk ), private :: cpu_elapsed ! Elapsed CPU time real ( rk ) :: cpu_time ! Elapsed time in seconds #if defined(USE_OMP) real ( rk ), private :: omp_start ! Start OMP time real ( rk ), private :: omp_end ! End OMP time real ( rk ), private :: omp_elapsed ! Elapsed OMP time real ( rk ) :: omp_time ! Elapsed time in seconds #endif #if defined(USE_MPI) real ( rk ), private :: mpi_start ! Start MPI time real ( rk ), private :: mpi_end ! End MPI time real ( rk ), private :: mpi_elapsed ! Elapsed MPI time real ( rk ) :: mpi_time ! Elapsed time in seconds #endif integer , dimension ( 8 ), private :: values_start ! Start date and time values integer , dimension ( 8 ), private :: values_end ! End date and time values integer , dimension ( 8 ), private :: values_elapsed ! Elapsed date and time values real ( rk ) :: elapsed_dtime ! Elapsed time in seconds contains procedure :: timer_start ! Procedure for starting the timer procedure :: timer_stop ! Procedure for stopping the timer procedure :: timer_write ! Procedure for writing elapsed time to a file procedure :: ctimer_start ! Procedure for starting the CPU timer procedure :: ctimer_stop ! Procedure for stopping the CPU timer procedure :: ctimer_write ! Procedure for writing elapsed CPU time to a file #if defined(USE_OMP) procedure :: otimer_start ! Procedure for starting the OMP timer procedure :: otimer_stop ! Procedure for stopping the OMP timer procedure :: otimer_write ! Procedure for writing elapsed OMP time to a file #endif #if defined(USE_MPI) procedure :: mtimer_start ! Procedure for starting the MPI timer procedure :: mtimer_stop ! Procedure for stopping the MPI timer procedure :: mtimer_write ! Procedure for writing elapsed MPI time to a file #endif procedure :: dtimer_start ! Procedure for starting the date_and_time timer procedure :: dtimer_stop ! Procedure for stopping the date_and_time timer procedure :: dtimer_write ! Procedure for writing elapsed date_and_time time to a file end type !=============================================================================== contains !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current processor clock value. !> This value is used to calculate the elapsed time later. impure subroutine timer_start ( this ) class ( timer ), intent ( inout ) :: this ! Get the processor clock rate call system_clock ( count_rate = this % clock_rate ) ! Start the timer call system_clock ( count = this % clock_start ) end subroutine timer_start !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the elapsed time. !> Optionally, it can print a message along with the elapsed time. impure subroutine timer_stop ( this , nloops , message , print ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print ! Stop the timer call system_clock ( count = this % clock_end ) ! Calculate the elapsed processor ticks this % clock_elapsed = this % clock_end - this % clock_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) if ( present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_time , msg ) else call print_time ( this % elapsed_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine timer_stop !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the elapsed time to a file. impure subroutine timer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_time ! Close the file close ( nunit ) end subroutine timer_write !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current CPU time value. !> This value is used to calculate the CPU time later. impure subroutine ctimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call cpu_time ( this % cpu_start ) end subroutine ctimer_start !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the CPU time. !> Optionally, it can print a message along with the CPU time. impure subroutine ctimer_stop ( this , nloops , message , print ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print ! Stop the timer call cpu_time ( this % cpu_end ) ! Calculate the elapsed CPU time this % cpu_elapsed = this % cpu_end - this % cpu_start ! Convert CPU time to seconds if (. not . present ( nloops )) this % cpu_time = this % cpu_elapsed if ( present ( nloops )) this % cpu_time = this % cpu_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"CPU time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % cpu_time , msg ) else call print_time ( this % cpu_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine ctimer_stop !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the CPU time to a file. impure subroutine ctimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the CPU time to the file write ( nunit , '(g0)' ) this % cpu_time ! Close the file close ( nunit ) end subroutine ctimer_write !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current OMP time value. !> This value is used to calculate the OMP time later. #if defined(USE_OMP) impure subroutine otimer_start ( this ) use omp_lib class ( timer ), intent ( inout ) :: this ! Start the timer this % omp_start = omp_get_wtime () end subroutine otimer_start !=============================================================================== #endif #if defined(USE_OMP) !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the OMP time. !> Optionally, it can print a message along with the OMP time. impure subroutine otimer_stop ( this , nloops , message , print ) use omp_lib class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print ! Stop the timer this % omp_end = omp_get_wtime () ! Calculate the elapsed OMP time this % omp_elapsed = this % omp_end - this % omp_start ! Convert OMP time to seconds if (. not . present ( nloops )) this % omp_time = this % omp_elapsed if ( present ( nloops )) this % omp_time = this % omp_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"OMP time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % omp_time , msg ) else call print_time ( this % omp_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine otimer_stop !=============================================================================== #endif #if defined(USE_OMP) !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the OMP time to a file. impure subroutine otimer_write ( this , file_name ) use omp_lib class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the OMP time to the file write ( nunit , '(g0)' ) this % omp_time ! Close the file close ( nunit ) end subroutine otimer_write !=============================================================================== #endif #if defined(USE_MPI) !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current MPI time value. !> This value is used to calculate the MPI time later. impure subroutine mtimer_start ( this ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Start the timer this % mpi_start = mpi_wtime () end subroutine mtimer_start !=============================================================================== #endif #if defined(USE_MPI) !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the MPI time. !> Optionally, it can print a message along with the MPI time. impure subroutine mtimer_stop ( this , nloops , message , print ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Stop the timer this % mpi_end = mpi_wtime () ! Calculate the elapsed MPI time this % mpi_elapsed = this % mpi_end - this % mpi_start ! Convert MPI time to seconds if (. not . present ( nloops )) this % mpi_time = this % mpi_elapsed if ( present ( nloops )) this % mpi_time = this % mpi_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"MPI time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % mpi_time , msg ) else call print_time ( this % mpi_time , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine mtimer_stop !=============================================================================== #endif #if defined(USE_MPI) !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the MPI time to a file. impure subroutine mtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the MPI time to the file write ( nunit , '(g0)' ) this % mpi_time ! Close the file close ( nunit ) end subroutine mtimer_write !=============================================================================== #endif !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current processor clock value. !> This value is used to calculate the elapsed time later. impure subroutine dtimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call date_and_time ( values = this % values_start ) end subroutine dtimer_start !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the elapsed time. !> Optionally, it can print a message along with the elapsed time. impure subroutine dtimer_stop ( this , nloops , message , print ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print real ( rk ) :: values_elapsed_sec ! Stop the timer call date_and_time ( values = this % values_end ) ! Calculate the elapsed processor ticks this % values_elapsed = this % values_end - this % values_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) if ( present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_dtime , msg ) else call print_time ( this % elapsed_dtime , msg ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine dtimer_stop !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the elapsed time to a file. impure subroutine dtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_dtime ! Close the file close ( nunit ) end subroutine dtimer_write !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi pure function to_seconds ( values ) result ( seconds ) integer , dimension ( 8 ), intent ( in ) :: values real ( rk ) :: seconds seconds = real ( values ( 3 ), rk ) * 2 4.0_rk * 6 0.0_rk * 6 0.0_rk + & real ( values ( 5 ), rk ) * 6 0.0_rk * 6 0.0_rk + & real ( values ( 6 ), rk ) * 6 0.0_rk + & real ( values ( 7 ), rk ) + & real ( values ( 8 ), rk ) / 100 0.0_rk end function to_seconds !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi impure subroutine print_time ( time , message ) real ( rk ), intent ( in ) :: time character ( * ), intent ( in ) :: message print '(A, F16.9, \" [s]\")' , trim ( message ), time end subroutine print_time !=============================================================================== end module fortime","tags":"","loc":"sourcefile/fortime.f90.html"},{"title":"test17.f90 – ForTime","text":"This file depends on sourcefile~~test17.f90~~EfferentGraph sourcefile~test17.f90 test17.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test17.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test17 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test17_ctimes' ) ! Optionally, write the elapsed time to a file end program test17","tags":"","loc":"sourcefile/test17.f90.html"},{"title":"test11.f90 – ForTime","text":"This file depends on sourcefile~~test11.f90~~EfferentGraph sourcefile~test11.f90 test11.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test11.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test11 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test11_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test11' ) #endif end program test11","tags":"","loc":"sourcefile/test11.f90.html"},{"title":"test3.f90 – ForTime","text":"This file depends on sourcefile~~test3.f90~~EfferentGraph sourcefile~test3.f90 test3.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test3.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test3 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' ) call t % timer_write ( 'test/test3_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test3' ) end program test3","tags":"","loc":"sourcefile/test3.f90.html"},{"title":"example3.f90 – ForTime","text":"This file depends on sourcefile~~example3.f90~~EfferentGraph sourcefile~example3.f90 example3.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example3.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example3 use fortime implicit none type ( timer ) :: t call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program example3","tags":"","loc":"sourcefile/example3.f90.html"},{"title":"test26.f90 – ForTime","text":"This file depends on sourcefile~~test26.f90~~EfferentGraph sourcefile~test26.f90 test26.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test26.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test26 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test26_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test26' ) end program test26","tags":"","loc":"sourcefile/test26.f90.html"},{"title":"test2.f90 – ForTime","text":"This file depends on sourcefile~~test2.f90~~EfferentGraph sourcefile~test2.f90 test2.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test2.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test2 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % timer_write ( 'test/test2_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test2' ) end program test2","tags":"","loc":"sourcefile/test2.f90.html"},{"title":"example5.f90 – ForTime","text":"This file depends on sourcefile~~example5.f90~~EfferentGraph sourcefile~example5.f90 example5.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example5.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example5 use fortime implicit none type ( timer ) :: t call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () end program example5","tags":"","loc":"sourcefile/example5.f90.html"},{"title":"test6.f90 – ForTime","text":"This file depends on sourcefile~~test6.f90~~EfferentGraph sourcefile~test6.f90 test6.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test6.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test6 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' ) call t % ctimer_write ( 'test/test6_ctimes' ) ! Optionally, write the elapsed time to a file end program test6","tags":"","loc":"sourcefile/test6.f90.html"},{"title":"test15.f90 – ForTime","text":"This file depends on sourcefile~~test15.f90~~EfferentGraph sourcefile~test15.f90 test15.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test15.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test15 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test15_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test15' ) end program test15","tags":"","loc":"sourcefile/test15.f90.html"},{"title":"test9.f90 – ForTime","text":"This file depends on sourcefile~~test9.f90~~EfferentGraph sourcefile~test9.f90 test9.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test9.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test9 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' ) call t % otimer_write ( 'test/test9_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test9' ) #endif end program test9","tags":"","loc":"sourcefile/test9.f90.html"},{"title":"test4.f90 – ForTime","text":"This file depends on sourcefile~~test4.f90~~EfferentGraph sourcefile~test4.f90 test4.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test4.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test4 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program test4","tags":"","loc":"sourcefile/test4.f90.html"},{"title":"test18.f90 – ForTime","text":"This file depends on sourcefile~~test18.f90~~EfferentGraph sourcefile~test18.f90 test18.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test18.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test18 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test18_ctimes' ) ! Optionally, write the elapsed time to a file end program test18","tags":"","loc":"sourcefile/test18.f90.html"},{"title":"test23.f90 – ForTime","text":"This file depends on sourcefile~~test23.f90~~EfferentGraph sourcefile~test23.f90 test23.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test23.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test23 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test23_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test23' ) #endif end program test23","tags":"","loc":"sourcefile/test23.f90.html"},{"title":"test12.f90 – ForTime","text":"This file depends on sourcefile~~test12.f90~~EfferentGraph sourcefile~test12.f90 test12.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test12.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test12 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test12_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test12' ) #endif end program test12","tags":"","loc":"sourcefile/test12.f90.html"},{"title":"example2.f90 – ForTime","text":"This file depends on sourcefile~~example2.f90~~EfferentGraph sourcefile~example2.f90 example2.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example2.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example2 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true .) ! nloops, message and print are optional. call t % timer_write ( 'example/example2_etimes' ) ! Optionally, write the elapsed time to a file end program example2","tags":"","loc":"sourcefile/example2.f90.html"},{"title":"example1.f90 – ForTime","text":"This file depends on sourcefile~~example1.f90~~EfferentGraph sourcefile~example1.f90 example1.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example1.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example1 use fortime implicit none type ( timer ) :: t call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () end program example1","tags":"","loc":"sourcefile/example1.f90.html"},{"title":"test30.f90 – ForTime","text":"This file depends on sourcefile~~test30.f90~~EfferentGraph sourcefile~test30.f90 test30.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test30.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test30 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test30_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test30' ) end program test30","tags":"","loc":"sourcefile/test30.f90.html"},{"title":"example6.f90 – ForTime","text":"This file depends on sourcefile~~example6.f90~~EfferentGraph sourcefile~example6.f90 example6.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example6.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example6 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true .) ! nloops, message and print are optional. call t % dtimer_write ( 'example/example6_etimes' ) ! Optionally, write the elapsed time to a file end program example6","tags":"","loc":"sourcefile/example6.f90.html"},{"title":"test22.f90 – ForTime","text":"This file depends on sourcefile~~test22.f90~~EfferentGraph sourcefile~test22.f90 test22.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test22.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test22 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop ( print = . false .) call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test22' ) #endif end program test22","tags":"","loc":"sourcefile/test22.f90.html"},{"title":"test5.f90 – ForTime","text":"This file depends on sourcefile~~test5.f90~~EfferentGraph sourcefile~test5.f90 test5.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test5.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test5 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' ) call t % ctimer_write ( 'test/test5_ctimes' ) ! Optionally, write the elapsed time to a file end program test5","tags":"","loc":"sourcefile/test5.f90.html"},{"title":"test20.f90 – ForTime","text":"This file depends on sourcefile~~test20.f90~~EfferentGraph sourcefile~test20.f90 test20.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test20.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test20 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test20_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test20' ) #endif end program test20","tags":"","loc":"sourcefile/test20.f90.html"}]} \ No newline at end of file +var tipuesearch = {"pages":[{"title":" ForTime ","text":"ForTime ForTime : A Fortran library for measuring elapsed time, DATE_AND_TIME time, CPU time, OMP time and MPI time. fpm dependency If you want to use ForTime as a dependency in your own fpm project,\nyou can easily include it by adding the following line to your fpm.toml file: [dependencies] fortime = { git = \"https://github.com/gha3mi/fortime.git\" } Usage Measuring elapsed time (system_clock) use fortime type ( timer ) :: t call t % timer_start () ! Your code or section to be timed call t % timer_stop ( nloops , message , print , color ) ! nloops, message, print and color are optional call t % timer_write ( file_name ) ! Optionally, write the result to a file Measuring elapsed time (date_and_time) use fortime type ( timer ) :: t call t % dtimer_start () ! Your code or section to be timed call t % dtimer_stop ( nloops , message , print , color ) ! nloops, message, print and color are optional call t % dtimer_write ( file_name ) ! Optionally, write the result to a file Measuring CPU time (cpu_time) use fortime type ( timer ) :: t call t % ctimer_start () ! Your code or section to be timed call t % ctimer_stop ( nloops , message , print , color ) ! nloops, message, print and color are optional call t % ctimer_write ( file_name ) ! Optionally, write the result to a file Measuring OpenMP time (omp_get_wtime) use fortime type ( timer ) :: t call t % otimer_start () ! Your code or section to be timed call t % otimer_stop ( nloops , message , print , color ) ! nloops, message, print and color are optional call t % otimer_write ( file_name ) ! Optionally, write the result to a file Note: Compile with the -DUSE_OMP option when using the OpenMP timer. Measuring MPI time (mpi_wtime) use fortime type ( timer ) :: t call t % mtimer_start () ! Your code or section to be timed call t % mtimer_stop ( nloops , message , print , color ) ! nloops, message, print and color are optional call t % mtimer_write ( file_name ) ! Optionally, write the result to a file Note: Compile with the -DUSE_MPI option when using the MPI timer. Running Examples and Tests Clone the Repository First, clone the ForTime repository from GitHub and navigate to the project directory: git clone https://github.com/gha3mi/fortime.git cd fortime Running Examples To run a specific example from the example directory using your preferred Fortran compiler, use the following command: fpm run --example --compiler Replace with the name of the example file (excluding the .f90 extension) and with the name of your Fortran compiler (e.g., ifx , ifort , gfortran , nvfortran ). Running Tests To execute tests, use the following command with your chosen compiler: fpm test --compiler Replace with the name of your Fortran compiler. Documentation The most up-to-date API documentation for the master branch is available here .\nTo generate the API documentation for ForTime using ford run the following\ncommand: ford ford.yml Contributing Contributions to ForTime are welcome! If you find any issues or would like to suggest improvements, please open an issue. Developer Info Seyed Ali Ghasemi","tags":"home","loc":"index.html"},{"title":"timer – ForTime ","text":"type, public :: timer Components Type Visibility Attributes Name Initial integer, private :: clock_rate integer, private :: clock_start integer, private :: clock_end integer, private :: clock_elapsed real(kind=rk), public :: elapsed_time real(kind=rk), private :: cpu_start real(kind=rk), private :: cpu_end real(kind=rk), private :: cpu_elapsed real(kind=rk), public :: cpu_time real(kind=rk), private :: omp_start real(kind=rk), private :: omp_end real(kind=rk), private :: omp_elapsed real(kind=rk), public :: omp_time real(kind=rk), private :: mpi_start real(kind=rk), private :: mpi_end real(kind=rk), private :: mpi_elapsed real(kind=rk), public :: mpi_time integer, private, dimension(8) :: values_start integer, private, dimension(8) :: values_end integer, private, dimension(8) :: values_elapsed real(kind=rk), public :: elapsed_dtime Type-Bound Procedures procedure, public :: timer_start private impure subroutine timer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: timer_stop private impure subroutine timer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color procedure, public :: timer_write private impure subroutine timer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: ctimer_start private impure subroutine ctimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current CPU time value.\nThis value is used to calculate the CPU time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: ctimer_stop private impure subroutine ctimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the CPU time.\nOptionally, it can print a message along with the CPU time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color procedure, public :: ctimer_write private impure subroutine ctimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the CPU time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: otimer_start private impure subroutine otimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current OMP time value.\nThis value is used to calculate the OMP time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: otimer_stop private impure subroutine otimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the OMP time.\nOptionally, it can print a message along with the OMP time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color procedure, public :: otimer_write private impure subroutine otimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the OMP time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: mtimer_start private impure subroutine mtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current MPI time value.\nThis value is used to calculate the MPI time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: mtimer_stop private impure subroutine mtimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the MPI time.\nOptionally, it can print a message along with the MPI time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color procedure, public :: mtimer_write private impure subroutine mtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the MPI time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name procedure, public :: dtimer_start private impure subroutine dtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this procedure, public :: dtimer_stop private impure subroutine dtimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color procedure, public :: dtimer_write private impure subroutine dtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name","tags":"","loc":"type/timer.html"},{"title":"to_seconds – ForTime","text":"private pure function to_seconds(values) result(seconds) Arguments Type Intent Optional Attributes Name integer, intent(in), dimension(8) :: values Return Value real(kind=rk) Called by proc~~to_seconds~~CalledByGraph proc~to_seconds to_seconds proc~dtimer_stop timer%dtimer_stop proc~dtimer_stop->proc~to_seconds program~example5 example5 program~example5->proc~dtimer_stop program~example6 example6 program~example6->proc~dtimer_stop program~test25 test25 program~test25->proc~dtimer_stop program~test26 test26 program~test26->proc~dtimer_stop program~test27 test27 program~test27->proc~dtimer_stop program~test28 test28 program~test28->proc~dtimer_stop program~test29 test29 program~test29->proc~dtimer_stop program~test30 test30 program~test30->proc~dtimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code pure function to_seconds ( values ) result ( seconds ) integer , dimension ( 8 ), intent ( in ) :: values real ( rk ) :: seconds seconds = real ( values ( 3 ), rk ) * 2 4.0_rk * 6 0.0_rk * 6 0.0_rk + & real ( values ( 5 ), rk ) * 6 0.0_rk * 6 0.0_rk + & real ( values ( 6 ), rk ) * 6 0.0_rk + & real ( values ( 7 ), rk ) + & real ( values ( 8 ), rk ) / 100 0.0_rk end function to_seconds","tags":"","loc":"proc/to_seconds.html"},{"title":"timer_start – ForTime","text":"private impure subroutine timer_start(this) Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~timer_start~~CalledByGraph proc~timer_start timer%timer_start program~example1 example1 program~example1->proc~timer_start program~example2 example2 program~example2->proc~timer_start program~test1 test1 program~test1->proc~timer_start program~test13 test13 program~test13->proc~timer_start program~test14 test14 program~test14->proc~timer_start program~test15 test15 program~test15->proc~timer_start program~test2 test2 program~test2->proc~timer_start program~test3 test3 program~test3->proc~timer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine timer_start ( this ) class ( timer ), intent ( inout ) :: this ! Get the processor clock rate call system_clock ( count_rate = this % clock_rate ) ! Start the timer call system_clock ( count = this % clock_start ) end subroutine timer_start","tags":"","loc":"proc/timer_start.html"},{"title":"timer_stop – ForTime","text":"private impure subroutine timer_stop(this, nloops, message, print, color) Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color Calls proc~~timer_stop~~CallsGraph proc~timer_stop timer%timer_stop proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~timer_stop~~CalledByGraph proc~timer_stop timer%timer_stop program~example1 example1 program~example1->proc~timer_stop program~example2 example2 program~example2->proc~timer_stop program~test1 test1 program~test1->proc~timer_stop program~test13 test13 program~test13->proc~timer_stop program~test14 test14 program~test14->proc~timer_stop program~test15 test15 program~test15->proc~timer_stop program~test2 test2 program~test2->proc~timer_stop program~test3 test3 program~test3->proc~timer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine timer_stop ( this , nloops , message , print , color ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color ! Stop the timer call system_clock ( count = this % clock_end ) ! Calculate the elapsed processor ticks this % clock_elapsed = this % clock_end - this % clock_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) if ( present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_time , msg , color ) else call print_time ( this % elapsed_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine timer_stop","tags":"","loc":"proc/timer_stop.html"},{"title":"timer_write – ForTime","text":"private impure subroutine timer_write(this, file_name) Writes the elapsed time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~timer_write~~CalledByGraph proc~timer_write timer%timer_write program~example2 example2 program~example2->proc~timer_write program~test14 test14 program~test14->proc~timer_write program~test15 test15 program~test15->proc~timer_write program~test2 test2 program~test2->proc~timer_write program~test3 test3 program~test3->proc~timer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine timer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_time ! Close the file close ( nunit ) end subroutine timer_write","tags":"","loc":"proc/timer_write.html"},{"title":"ctimer_start – ForTime","text":"private impure subroutine ctimer_start(this) Starts the timer by recording the current CPU time value.\nThis value is used to calculate the CPU time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~ctimer_start~~CalledByGraph proc~ctimer_start timer%ctimer_start program~example3 example3 program~example3->proc~ctimer_start program~example4 example4 program~example4->proc~ctimer_start program~test16 test16 program~test16->proc~ctimer_start program~test17 test17 program~test17->proc~ctimer_start program~test18 test18 program~test18->proc~ctimer_start program~test4 test4 program~test4->proc~ctimer_start program~test5 test5 program~test5->proc~ctimer_start program~test6 test6 program~test6->proc~ctimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine ctimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call cpu_time ( this % cpu_start ) end subroutine ctimer_start","tags":"","loc":"proc/ctimer_start.html"},{"title":"ctimer_stop – ForTime","text":"private impure subroutine ctimer_stop(this, nloops, message, print, color) Stops the timer and calculates the CPU time.\nOptionally, it can print a message along with the CPU time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color Calls proc~~ctimer_stop~~CallsGraph proc~ctimer_stop timer%ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~ctimer_stop~~CalledByGraph proc~ctimer_stop timer%ctimer_stop program~example3 example3 program~example3->proc~ctimer_stop program~example4 example4 program~example4->proc~ctimer_stop program~test16 test16 program~test16->proc~ctimer_stop program~test17 test17 program~test17->proc~ctimer_stop program~test18 test18 program~test18->proc~ctimer_stop program~test4 test4 program~test4->proc~ctimer_stop program~test5 test5 program~test5->proc~ctimer_stop program~test6 test6 program~test6->proc~ctimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine ctimer_stop ( this , nloops , message , print , color ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color ! Stop the timer call cpu_time ( this % cpu_end ) ! Calculate the elapsed CPU time this % cpu_elapsed = this % cpu_end - this % cpu_start ! Convert CPU time to seconds if (. not . present ( nloops )) this % cpu_time = this % cpu_elapsed if ( present ( nloops )) this % cpu_time = this % cpu_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"CPU time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % cpu_time , msg , color ) else call print_time ( this % cpu_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine ctimer_stop","tags":"","loc":"proc/ctimer_stop.html"},{"title":"ctimer_write – ForTime","text":"private impure subroutine ctimer_write(this, file_name) Writes the CPU time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~ctimer_write~~CalledByGraph proc~ctimer_write timer%ctimer_write program~example4 example4 program~example4->proc~ctimer_write program~test17 test17 program~test17->proc~ctimer_write program~test18 test18 program~test18->proc~ctimer_write program~test5 test5 program~test5->proc~ctimer_write program~test6 test6 program~test6->proc~ctimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine ctimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the CPU time to the file write ( nunit , '(g0)' ) this % cpu_time ! Close the file close ( nunit ) end subroutine ctimer_write","tags":"","loc":"proc/ctimer_write.html"},{"title":"otimer_start – ForTime","text":"private impure subroutine otimer_start(this) Uses omp_lib proc~~otimer_start~~UsesGraph proc~otimer_start timer%otimer_start omp_lib omp_lib proc~otimer_start->omp_lib Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Starts the timer by recording the current OMP time value.\nThis value is used to calculate the OMP time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Calls proc~~otimer_start~~CallsGraph proc~otimer_start timer%otimer_start omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~otimer_start~~CalledByGraph proc~otimer_start timer%otimer_start program~test19 test19 program~test19->proc~otimer_start program~test20 test20 program~test20->proc~otimer_start program~test21 test21 program~test21->proc~otimer_start program~test7 test7 program~test7->proc~otimer_start program~test8 test8 program~test8->proc~otimer_start program~test9 test9 program~test9->proc~otimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine otimer_start ( this ) use omp_lib class ( timer ), intent ( inout ) :: this ! Start the timer this % omp_start = omp_get_wtime () end subroutine otimer_start","tags":"","loc":"proc/otimer_start.html"},{"title":"otimer_stop – ForTime","text":"private impure subroutine otimer_stop(this, nloops, message, print, color) Uses omp_lib proc~~otimer_stop~~UsesGraph proc~otimer_stop timer%otimer_stop omp_lib omp_lib proc~otimer_stop->omp_lib Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Stops the timer and calculates the OMP time.\nOptionally, it can print a message along with the OMP time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color Calls proc~~otimer_stop~~CallsGraph proc~otimer_stop timer%otimer_stop omp_get_wtime omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~otimer_stop~~CalledByGraph proc~otimer_stop timer%otimer_stop program~test19 test19 program~test19->proc~otimer_stop program~test20 test20 program~test20->proc~otimer_stop program~test21 test21 program~test21->proc~otimer_stop program~test7 test7 program~test7->proc~otimer_stop program~test8 test8 program~test8->proc~otimer_stop program~test9 test9 program~test9->proc~otimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine otimer_stop ( this , nloops , message , print , color ) use omp_lib class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color ! Stop the timer this % omp_end = omp_get_wtime () ! Calculate the elapsed OMP time this % omp_elapsed = this % omp_end - this % omp_start ! Convert OMP time to seconds if (. not . present ( nloops )) this % omp_time = this % omp_elapsed if ( present ( nloops )) this % omp_time = this % omp_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"OMP time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % omp_time , msg , color ) else call print_time ( this % omp_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine otimer_stop","tags":"","loc":"proc/otimer_stop.html"},{"title":"otimer_write – ForTime","text":"private impure subroutine otimer_write(this, file_name) Uses omp_lib proc~~otimer_write~~UsesGraph proc~otimer_write timer%otimer_write omp_lib omp_lib proc~otimer_write->omp_lib Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Writes the OMP time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~otimer_write~~CalledByGraph proc~otimer_write timer%otimer_write program~test20 test20 program~test20->proc~otimer_write program~test21 test21 program~test21->proc~otimer_write program~test8 test8 program~test8->proc~otimer_write program~test9 test9 program~test9->proc~otimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine otimer_write ( this , file_name ) use omp_lib class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the OMP time to the file write ( nunit , '(g0)' ) this % omp_time ! Close the file close ( nunit ) end subroutine otimer_write","tags":"","loc":"proc/otimer_write.html"},{"title":"mtimer_start – ForTime","text":"private impure subroutine mtimer_start(this) Starts the timer by recording the current MPI time value.\nThis value is used to calculate the MPI time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~mtimer_start~~CalledByGraph proc~mtimer_start timer%mtimer_start program~test10 test10 program~test10->proc~mtimer_start program~test11 test11 program~test11->proc~mtimer_start program~test12 test12 program~test12->proc~mtimer_start program~test22 test22 program~test22->proc~mtimer_start program~test23 test23 program~test23->proc~mtimer_start program~test24 test24 program~test24->proc~mtimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine mtimer_start ( this ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Start the timer this % mpi_start = mpi_wtime () end subroutine mtimer_start","tags":"","loc":"proc/mtimer_start.html"},{"title":"mtimer_stop – ForTime","text":"private impure subroutine mtimer_stop(this, nloops, message, print, color) Stops the timer and calculates the MPI time.\nOptionally, it can print a message along with the MPI time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color Calls proc~~mtimer_stop~~CallsGraph proc~mtimer_stop timer%mtimer_stop proc~print_time print_time proc~mtimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~mtimer_stop~~CalledByGraph proc~mtimer_stop timer%mtimer_stop program~test10 test10 program~test10->proc~mtimer_stop program~test11 test11 program~test11->proc~mtimer_stop program~test12 test12 program~test12->proc~mtimer_stop program~test22 test22 program~test22->proc~mtimer_stop program~test23 test23 program~test23->proc~mtimer_stop program~test24 test24 program~test24->proc~mtimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine mtimer_stop ( this , nloops , message , print , color ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Stop the timer this % mpi_end = mpi_wtime () ! Calculate the elapsed MPI time this % mpi_elapsed = this % mpi_end - this % mpi_start ! Convert MPI time to seconds if (. not . present ( nloops )) this % mpi_time = this % mpi_elapsed if ( present ( nloops )) this % mpi_time = this % mpi_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"MPI time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % mpi_time , msg , color ) else call print_time ( this % mpi_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine mtimer_stop","tags":"","loc":"proc/mtimer_stop.html"},{"title":"mtimer_write – ForTime","text":"private impure subroutine mtimer_write(this, file_name) Writes the MPI time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~mtimer_write~~CalledByGraph proc~mtimer_write timer%mtimer_write program~test11 test11 program~test11->proc~mtimer_write program~test12 test12 program~test12->proc~mtimer_write program~test23 test23 program~test23->proc~mtimer_write program~test24 test24 program~test24->proc~mtimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine mtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the MPI time to the file write ( nunit , '(g0)' ) this % mpi_time ! Close the file close ( nunit ) end subroutine mtimer_write","tags":"","loc":"proc/mtimer_write.html"},{"title":"dtimer_start – ForTime","text":"private impure subroutine dtimer_start(this) Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this Called by proc~~dtimer_start~~CalledByGraph proc~dtimer_start timer%dtimer_start program~example5 example5 program~example5->proc~dtimer_start program~example6 example6 program~example6->proc~dtimer_start program~test25 test25 program~test25->proc~dtimer_start program~test26 test26 program~test26->proc~dtimer_start program~test27 test27 program~test27->proc~dtimer_start program~test28 test28 program~test28->proc~dtimer_start program~test29 test29 program~test29->proc~dtimer_start program~test30 test30 program~test30->proc~dtimer_start Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine dtimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call date_and_time ( values = this % values_start ) end subroutine dtimer_start","tags":"","loc":"proc/dtimer_start.html"},{"title":"dtimer_stop – ForTime","text":"private impure subroutine dtimer_stop(this, nloops, message, print, color) Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color Calls proc~~dtimer_stop~~CallsGraph proc~dtimer_stop timer%dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~dtimer_stop~~CalledByGraph proc~dtimer_stop timer%dtimer_stop program~example5 example5 program~example5->proc~dtimer_stop program~example6 example6 program~example6->proc~dtimer_stop program~test25 test25 program~test25->proc~dtimer_stop program~test26 test26 program~test26->proc~dtimer_stop program~test27 test27 program~test27->proc~dtimer_stop program~test28 test28 program~test28->proc~dtimer_stop program~test29 test29 program~test29->proc~dtimer_stop program~test30 test30 program~test30->proc~dtimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine dtimer_stop ( this , nloops , message , print , color ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print real ( rk ) :: values_elapsed_sec character ( * ), intent ( in ), optional :: color ! Stop the timer call date_and_time ( values = this % values_end ) ! Calculate the elapsed processor ticks this % values_elapsed = this % values_end - this % values_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) if ( present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_dtime , msg , color ) else call print_time ( this % elapsed_dtime , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine dtimer_stop","tags":"","loc":"proc/dtimer_stop.html"},{"title":"dtimer_write – ForTime","text":"private impure subroutine dtimer_write(this, file_name) Writes the elapsed time to a file. Type Bound timer Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name Called by proc~~dtimer_write~~CalledByGraph proc~dtimer_write timer%dtimer_write program~example6 example6 program~example6->proc~dtimer_write program~test26 test26 program~test26->proc~dtimer_write program~test27 test27 program~test27->proc~dtimer_write program~test29 test29 program~test29->proc~dtimer_write program~test30 test30 program~test30->proc~dtimer_write Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine dtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_dtime ! Close the file close ( nunit ) end subroutine dtimer_write","tags":"","loc":"proc/dtimer_write.html"},{"title":"print_time – ForTime","text":"private impure subroutine print_time(time, message, color) Uses face proc~~print_time~~UsesGraph proc~print_time print_time face face proc~print_time->face Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Arguments Type Intent Optional Attributes Name real(kind=rk), intent(in) :: time character(len=*), intent(in) :: message character(len=*), intent(in), optional :: color Calls proc~~print_time~~CallsGraph proc~print_time print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Called by proc~~print_time~~CalledByGraph proc~print_time print_time proc~ctimer_stop timer%ctimer_stop proc~ctimer_stop->proc~print_time proc~dtimer_stop timer%dtimer_stop proc~dtimer_stop->proc~print_time proc~mtimer_stop timer%mtimer_stop proc~mtimer_stop->proc~print_time proc~otimer_stop timer%otimer_stop proc~otimer_stop->proc~print_time proc~timer_stop timer%timer_stop proc~timer_stop->proc~print_time program~example1 example1 program~example1->proc~timer_stop program~example2 example2 program~example2->proc~timer_stop program~example3 example3 program~example3->proc~ctimer_stop program~example4 example4 program~example4->proc~ctimer_stop program~example5 example5 program~example5->proc~dtimer_stop program~example6 example6 program~example6->proc~dtimer_stop program~test1 test1 program~test1->proc~timer_stop program~test10 test10 program~test10->proc~mtimer_stop program~test11 test11 program~test11->proc~mtimer_stop program~test12 test12 program~test12->proc~mtimer_stop program~test13 test13 program~test13->proc~timer_stop program~test14 test14 program~test14->proc~timer_stop program~test15 test15 program~test15->proc~timer_stop program~test16 test16 program~test16->proc~ctimer_stop program~test17 test17 program~test17->proc~ctimer_stop program~test18 test18 program~test18->proc~ctimer_stop program~test19 test19 program~test19->proc~otimer_stop program~test2 test2 program~test2->proc~timer_stop program~test20 test20 program~test20->proc~otimer_stop program~test21 test21 program~test21->proc~otimer_stop program~test22 test22 program~test22->proc~mtimer_stop program~test23 test23 program~test23->proc~mtimer_stop program~test24 test24 program~test24->proc~mtimer_stop program~test25 test25 program~test25->proc~dtimer_stop program~test26 test26 program~test26->proc~dtimer_stop program~test27 test27 program~test27->proc~dtimer_stop program~test28 test28 program~test28->proc~dtimer_stop program~test29 test29 program~test29->proc~dtimer_stop program~test3 test3 program~test3->proc~timer_stop program~test30 test30 program~test30->proc~dtimer_stop program~test4 test4 program~test4->proc~ctimer_stop program~test5 test5 program~test5->proc~ctimer_stop program~test6 test6 program~test6->proc~ctimer_stop program~test7 test7 program~test7->proc~otimer_stop program~test8 test8 program~test8->proc~otimer_stop program~test9 test9 program~test9->proc~otimer_stop Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code impure subroutine print_time ( time , message , color ) use face real ( rk ), intent ( in ) :: time character ( * ), intent ( in ) :: message character ( * ), intent ( in ), optional :: color if ( present ( color )) then print '(A, F16.9, A)' , colorize ( trim ( message ), color_fg = trim ( color )), time , colorize ( \" [s]\" , color_fg = trim ( color )) else print '(A, F16.9, A)' , colorize ( trim ( message ), color_fg = 'blue' ), time , colorize ( \" [s]\" , color_fg = 'blue' ) end if end subroutine print_time","tags":"","loc":"proc/print_time.html"},{"title":"fortime – ForTime","text":"This module provides a timer object for measuring elapsed time.\nIt includes procedures for starting and stopping the timer, as well\nas calculating and printing the elapsed time in seconds. Uses kinds module~~fortime~~UsesGraph module~fortime fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Used by module~~fortime~~UsedByGraph module~fortime fortime program~example1 example1 program~example1->module~fortime program~example2 example2 program~example2->module~fortime program~example3 example3 program~example3->module~fortime program~example4 example4 program~example4->module~fortime program~example5 example5 program~example5->module~fortime program~example6 example6 program~example6->module~fortime program~test1 test1 program~test1->module~fortime program~test10 test10 program~test10->module~fortime program~test11 test11 program~test11->module~fortime program~test12 test12 program~test12->module~fortime program~test13 test13 program~test13->module~fortime program~test14 test14 program~test14->module~fortime program~test15 test15 program~test15->module~fortime program~test16 test16 program~test16->module~fortime program~test17 test17 program~test17->module~fortime program~test18 test18 program~test18->module~fortime program~test19 test19 program~test19->module~fortime program~test2 test2 program~test2->module~fortime program~test20 test20 program~test20->module~fortime program~test21 test21 program~test21->module~fortime program~test22 test22 program~test22->module~fortime program~test23 test23 program~test23->module~fortime program~test24 test24 program~test24->module~fortime program~test25 test25 program~test25->module~fortime program~test26 test26 program~test26->module~fortime program~test27 test27 program~test27->module~fortime program~test28 test28 program~test28->module~fortime program~test29 test29 program~test29->module~fortime program~test3 test3 program~test3->module~fortime program~test30 test30 program~test30->module~fortime program~test4 test4 program~test4->module~fortime program~test5 test5 program~test5->module~fortime program~test6 test6 program~test6->module~fortime program~test7 test7 program~test7->module~fortime program~test8 test8 program~test8->module~fortime program~test9 test9 program~test9->module~fortime Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Derived Types type, public :: timer Components Type Visibility Attributes Name Initial integer, private :: clock_rate integer, private :: clock_start integer, private :: clock_end integer, private :: clock_elapsed real(kind=rk), public :: elapsed_time real(kind=rk), private :: cpu_start real(kind=rk), private :: cpu_end real(kind=rk), private :: cpu_elapsed real(kind=rk), public :: cpu_time real(kind=rk), private :: omp_start real(kind=rk), private :: omp_end real(kind=rk), private :: omp_elapsed real(kind=rk), public :: omp_time real(kind=rk), private :: mpi_start real(kind=rk), private :: mpi_end real(kind=rk), private :: mpi_elapsed real(kind=rk), public :: mpi_time integer, private, dimension(8) :: values_start integer, private, dimension(8) :: values_end integer, private, dimension(8) :: values_elapsed real(kind=rk), public :: elapsed_dtime Type-Bound Procedures procedure, public :: timer_start procedure, public :: timer_stop procedure, public :: timer_write procedure, public :: ctimer_start procedure, public :: ctimer_stop procedure, public :: ctimer_write procedure, public :: otimer_start procedure, public :: otimer_stop procedure, public :: otimer_write procedure, public :: mtimer_start procedure, public :: mtimer_stop procedure, public :: mtimer_write procedure, public :: dtimer_start procedure, public :: dtimer_stop procedure, public :: dtimer_write Functions private pure function to_seconds (values) result(seconds) Author Seyed Ali Ghasemi Arguments Type Intent Optional Attributes Name integer, intent(in), dimension(8) :: values Return Value real(kind=rk) Subroutines private impure subroutine timer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine timer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color private impure subroutine timer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine ctimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current CPU time value.\nThis value is used to calculate the CPU time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine ctimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the CPU time.\nOptionally, it can print a message along with the CPU time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color private impure subroutine ctimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the CPU time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine otimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current OMP time value.\nThis value is used to calculate the OMP time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine otimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the OMP time.\nOptionally, it can print a message along with the OMP time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color private impure subroutine otimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the OMP time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine mtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current MPI time value.\nThis value is used to calculate the MPI time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine mtimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the MPI time.\nOptionally, it can print a message along with the MPI time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color private impure subroutine mtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the MPI time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine dtimer_start (this) Author Seyed Ali Ghasemi Starts the timer by recording the current processor clock value.\nThis value is used to calculate the elapsed time later. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this private impure subroutine dtimer_stop (this, nloops, message, print, color) Author Seyed Ali Ghasemi Stops the timer and calculates the elapsed time.\nOptionally, it can print a message along with the elapsed time. Arguments Type Intent Optional Attributes Name class( timer ), intent(inout) :: this integer, intent(in), optional :: nloops character(len=*), intent(in), optional :: message logical, intent(in), optional :: print character(len=*), intent(in), optional :: color private impure subroutine dtimer_write (this, file_name) Author Seyed Ali Ghasemi Writes the elapsed time to a file. Arguments Type Intent Optional Attributes Name class( timer ), intent(in) :: this character(len=*), intent(in) :: file_name private impure subroutine print_time (time, message, color) Author Seyed Ali Ghasemi Arguments Type Intent Optional Attributes Name real(kind=rk), intent(in) :: time character(len=*), intent(in) :: message character(len=*), intent(in), optional :: color","tags":"","loc":"module/fortime.html"},{"title":"test23 – ForTime","text":"Uses fortime kinds forunittest program~~test23~~UsesGraph program~test23 test23 forunittest forunittest program~test23->forunittest kinds kinds program~test23->kinds module~fortime fortime program~test23->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test23~~CallsGraph program~test23 test23 check check program~test23->check mpi_finalize mpi_finalize program~test23->mpi_finalize mpi_init mpi_init program~test23->mpi_init proc~mtimer_start timer%mtimer_start program~test23->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test23->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test23->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test23 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test23_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test23' ) #endif end program test23","tags":"","loc":"program/test23.html"},{"title":"test19 – ForTime","text":"Uses fortime kinds forunittest program~~test19~~UsesGraph program~test19 test19 forunittest forunittest program~test19->forunittest kinds kinds program~test19->kinds module~fortime fortime program~test19->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test19~~CallsGraph program~test19 test19 check check program~test19->check proc~otimer_start timer%otimer_start program~test19->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test19->proc~otimer_stop omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test19 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop ( print = . false .) call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test19' ) #endif end program test19","tags":"","loc":"program/test19.html"},{"title":"test21 – ForTime","text":"Uses fortime kinds forunittest program~~test21~~UsesGraph program~test21 test21 forunittest forunittest program~test21->forunittest kinds kinds program~test21->kinds module~fortime fortime program~test21->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test21~~CallsGraph program~test21 test21 check check program~test21->check proc~otimer_start timer%otimer_start program~test21->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test21->proc~otimer_stop proc~otimer_write timer%otimer_write program~test21->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test21 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test21_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test21' ) #endif end program test21","tags":"","loc":"program/test21.html"},{"title":"example2 – ForTime","text":"Uses fortime program~~example2~~UsesGraph program~example2 example2 module~fortime fortime program~example2->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example2~~CallsGraph program~example2 example2 proc~timer_start timer%timer_start program~example2->proc~timer_start proc~timer_stop timer%timer_stop program~example2->proc~timer_stop proc~timer_write timer%timer_write program~example2->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program example2 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true ., color = 'green' ) ! nloops, message, print and color are optional. call t % timer_write ( 'example/example2_etimes' ) ! Optionally, write the elapsed time to a file end program example2","tags":"","loc":"program/example2.html"},{"title":"test22 – ForTime","text":"Uses fortime kinds forunittest program~~test22~~UsesGraph program~test22 test22 forunittest forunittest program~test22->forunittest kinds kinds program~test22->kinds module~fortime fortime program~test22->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test22~~CallsGraph program~test22 test22 check check program~test22->check mpi_finalize mpi_finalize program~test22->mpi_finalize mpi_init mpi_init program~test22->mpi_init proc~mtimer_start timer%mtimer_start program~test22->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test22->proc~mtimer_stop proc~print_time print_time proc~mtimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: ierr Source Code program test22 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop ( print = . false .) call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test22' ) #endif end program test22","tags":"","loc":"program/test22.html"},{"title":"example1 – ForTime","text":"Uses fortime program~~example1~~UsesGraph program~example1 example1 module~fortime fortime program~example1->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example1~~CallsGraph program~example1 example1 proc~timer_start timer%timer_start program~example1->proc~timer_start proc~timer_stop timer%timer_stop program~example1->proc~timer_stop proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program example1 use fortime implicit none type ( timer ) :: t call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () end program example1","tags":"","loc":"program/example1.html"},{"title":"test9 – ForTime","text":"Uses fortime kinds forunittest program~~test9~~UsesGraph program~test9 test9 forunittest forunittest program~test9->forunittest kinds kinds program~test9->kinds module~fortime fortime program~test9->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test9~~CallsGraph program~test9 test9 check check program~test9->check proc~otimer_start timer%otimer_start program~test9->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test9->proc~otimer_stop proc~otimer_write timer%otimer_write program~test9->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test9 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' ) call t % otimer_write ( 'test/test9_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test9' ) #endif end program test9","tags":"","loc":"program/test9.html"},{"title":"test16 – ForTime","text":"Uses fortime kinds program~~test16~~UsesGraph program~test16 test16 kinds kinds program~test16->kinds module~fortime fortime program~test16->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test16~~CallsGraph program~test16 test16 proc~ctimer_start timer%ctimer_start program~test16->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test16->proc~ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program test16 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop ( print = . false .) end program test16","tags":"","loc":"program/test16.html"},{"title":"test3 – ForTime","text":"Uses fortime kinds forunittest program~~test3~~UsesGraph program~test3 test3 forunittest forunittest program~test3->forunittest kinds kinds program~test3->kinds module~fortime fortime program~test3->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test3~~CallsGraph program~test3 test3 check check program~test3->check proc~timer_start timer%timer_start program~test3->proc~timer_start proc~timer_stop timer%timer_stop program~test3->proc~timer_stop proc~timer_write timer%timer_write program~test3->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test3 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' ) call t % timer_write ( 'test/test3_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test3' ) end program test3","tags":"","loc":"program/test3.html"},{"title":"test4 – ForTime","text":"Uses fortime kinds program~~test4~~UsesGraph program~test4 test4 kinds kinds program~test4->kinds module~fortime fortime program~test4->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test4~~CallsGraph program~test4 test4 proc~ctimer_start timer%ctimer_start program~test4->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test4->proc~ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program test4 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program test4","tags":"","loc":"program/test4.html"},{"title":"test2 – ForTime","text":"Uses fortime kinds forunittest program~~test2~~UsesGraph program~test2 test2 forunittest forunittest program~test2->forunittest kinds kinds program~test2->kinds module~fortime fortime program~test2->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test2~~CallsGraph program~test2 test2 check check program~test2->check proc~timer_start timer%timer_start program~test2->proc~timer_start proc~timer_stop timer%timer_stop program~test2->proc~timer_stop proc~timer_write timer%timer_write program~test2->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test2 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % timer_write ( 'test/test2_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test2' ) end program test2","tags":"","loc":"program/test2.html"},{"title":"example3 – ForTime","text":"Uses fortime program~~example3~~UsesGraph program~example3 example3 module~fortime fortime program~example3->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example3~~CallsGraph program~example3 example3 proc~ctimer_start timer%ctimer_start program~example3->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~example3->proc~ctimer_stop proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program example3 use fortime implicit none type ( timer ) :: t call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program example3","tags":"","loc":"program/example3.html"},{"title":"test6 – ForTime","text":"Uses fortime kinds program~~test6~~UsesGraph program~test6 test6 kinds kinds program~test6->kinds module~fortime fortime program~test6->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test6~~CallsGraph program~test6 test6 proc~ctimer_start timer%ctimer_start program~test6->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test6->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test6->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test6 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' ) call t % ctimer_write ( 'test/test6_ctimes' ) ! Optionally, write the elapsed time to a file end program test6","tags":"","loc":"program/test6.html"},{"title":"test12 – ForTime","text":"Uses fortime kinds forunittest program~~test12~~UsesGraph program~test12 test12 forunittest forunittest program~test12->forunittest kinds kinds program~test12->kinds module~fortime fortime program~test12->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test12~~CallsGraph program~test12 test12 check check program~test12->check mpi_finalize mpi_finalize program~test12->mpi_finalize mpi_init mpi_init program~test12->mpi_init proc~mtimer_start timer%mtimer_start program~test12->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test12->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test12->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test12 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test12_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test12' ) #endif end program test12","tags":"","loc":"program/test12.html"},{"title":"test20 – ForTime","text":"Uses fortime kinds forunittest program~~test20~~UsesGraph program~test20 test20 forunittest forunittest program~test20->forunittest kinds kinds program~test20->kinds module~fortime fortime program~test20->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test20~~CallsGraph program~test20 test20 check check program~test20->check proc~otimer_start timer%otimer_start program~test20->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test20->proc~otimer_stop proc~otimer_write timer%otimer_write program~test20->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test20 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test20_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test20' ) #endif end program test20","tags":"","loc":"program/test20.html"},{"title":"test18 – ForTime","text":"Uses fortime kinds program~~test18~~UsesGraph program~test18 test18 kinds kinds program~test18->kinds module~fortime fortime program~test18->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test18~~CallsGraph program~test18 test18 proc~ctimer_start timer%ctimer_start program~test18->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test18->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test18->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test18 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test18_ctimes' ) ! Optionally, write the elapsed time to a file end program test18","tags":"","loc":"program/test18.html"},{"title":"test10 – ForTime","text":"Uses fortime kinds forunittest program~~test10~~UsesGraph program~test10 test10 forunittest forunittest program~test10->forunittest kinds kinds program~test10->kinds module~fortime fortime program~test10->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test10~~CallsGraph program~test10 test10 check check program~test10->check mpi_finalize mpi_finalize program~test10->mpi_finalize mpi_init mpi_init program~test10->mpi_init proc~mtimer_start timer%mtimer_start program~test10->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test10->proc~mtimer_stop proc~print_time print_time proc~mtimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: ierr Source Code program test10 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop () call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test10' ) #endif end program test10","tags":"","loc":"program/test10.html"},{"title":"test15 – ForTime","text":"Uses fortime kinds forunittest program~~test15~~UsesGraph program~test15 test15 forunittest forunittest program~test15->forunittest kinds kinds program~test15->kinds module~fortime fortime program~test15->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test15~~CallsGraph program~test15 test15 check check program~test15->check proc~timer_start timer%timer_start program~test15->proc~timer_start proc~timer_stop timer%timer_stop program~test15->proc~timer_stop proc~timer_write timer%timer_write program~test15->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test15 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test15_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test15' ) end program test15","tags":"","loc":"program/test15.html"},{"title":"test29 – ForTime","text":"Uses fortime kinds forunittest program~~test29~~UsesGraph program~test29 test29 forunittest forunittest program~test29->forunittest kinds kinds program~test29->kinds module~fortime fortime program~test29->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test29~~CallsGraph program~test29 test29 check check program~test29->check proc~dtimer_start timer%dtimer_start program~test29->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test29->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test29->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test29 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test29_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test29' ) end program test29","tags":"","loc":"program/test29.html"},{"title":"test7 – ForTime","text":"Uses fortime kinds forunittest program~~test7~~UsesGraph program~test7 test7 forunittest forunittest program~test7->forunittest kinds kinds program~test7->kinds module~fortime fortime program~test7->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test7~~CallsGraph program~test7 test7 check check program~test7->check proc~otimer_start timer%otimer_start program~test7->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test7->proc~otimer_stop omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test7 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop () call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test7' ) #endif end program test7","tags":"","loc":"program/test7.html"},{"title":"test11 – ForTime","text":"Uses fortime kinds forunittest program~~test11~~UsesGraph program~test11 test11 forunittest forunittest program~test11->forunittest kinds kinds program~test11->kinds module~fortime fortime program~test11->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test11~~CallsGraph program~test11 test11 check check program~test11->check mpi_finalize mpi_finalize program~test11->mpi_finalize mpi_init mpi_init program~test11->mpi_init proc~mtimer_start timer%mtimer_start program~test11->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test11->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test11->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test11 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test11_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test11' ) #endif end program test11","tags":"","loc":"program/test11.html"},{"title":"example6 – ForTime","text":"Uses fortime program~~example6~~UsesGraph program~example6 example6 module~fortime fortime program~example6->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example6~~CallsGraph program~example6 example6 proc~dtimer_start timer%dtimer_start program~example6->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~example6->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~example6->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program example6 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true ., color = 'red' ) ! nloops, message, print and color are optional. call t % dtimer_write ( 'example/example6_etimes' ) ! Optionally, write the elapsed time to a file end program example6","tags":"","loc":"program/example6.html"},{"title":"test27 – ForTime","text":"Uses fortime kinds forunittest program~~test27~~UsesGraph program~test27 test27 forunittest forunittest program~test27->forunittest kinds kinds program~test27->kinds module~fortime fortime program~test27->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test27~~CallsGraph program~test27 test27 check check program~test27->check proc~dtimer_start timer%dtimer_start program~test27->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test27->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test27->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test27 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test27_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test27' ) end program test27","tags":"","loc":"program/test27.html"},{"title":"test13 – ForTime","text":"Uses fortime kinds forunittest program~~test13~~UsesGraph program~test13 test13 forunittest forunittest program~test13->forunittest kinds kinds program~test13->kinds module~fortime fortime program~test13->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test13~~CallsGraph program~test13 test13 check check program~test13->check proc~timer_start timer%timer_start program~test13->proc~timer_start proc~timer_stop timer%timer_stop program~test13->proc~timer_stop proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test13 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop ( print = . false .) call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test13' ) end program test13","tags":"","loc":"program/test13.html"},{"title":"test28 – ForTime","text":"Uses fortime kinds forunittest program~~test28~~UsesGraph program~test28 test28 forunittest forunittest program~test28->forunittest kinds kinds program~test28->kinds module~fortime fortime program~test28->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test28~~CallsGraph program~test28 test28 check check program~test28->check proc~dtimer_start timer%dtimer_start program~test28->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test28->proc~dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test28 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop ( print = . false .) call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test28' ) end program test28","tags":"","loc":"program/test28.html"},{"title":"test17 – ForTime","text":"Uses fortime kinds program~~test17~~UsesGraph program~test17 test17 kinds kinds program~test17->kinds module~fortime fortime program~test17->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test17~~CallsGraph program~test17 test17 proc~ctimer_start timer%ctimer_start program~test17->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test17->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test17->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test17 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test17_ctimes' ) ! Optionally, write the elapsed time to a file end program test17","tags":"","loc":"program/test17.html"},{"title":"test14 – ForTime","text":"Uses fortime kinds forunittest program~~test14~~UsesGraph program~test14 test14 forunittest forunittest program~test14->forunittest kinds kinds program~test14->kinds module~fortime fortime program~test14->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test14~~CallsGraph program~test14 test14 check check program~test14->check proc~timer_start timer%timer_start program~test14->proc~timer_start proc~timer_stop timer%timer_stop program~test14->proc~timer_stop proc~timer_write timer%timer_write program~test14->proc~timer_write proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test14 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test14_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test14' ) end program test14","tags":"","loc":"program/test14.html"},{"title":"test26 – ForTime","text":"Uses fortime kinds forunittest program~~test26~~UsesGraph program~test26 test26 forunittest forunittest program~test26->forunittest kinds kinds program~test26->kinds module~fortime fortime program~test26->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test26~~CallsGraph program~test26 test26 check check program~test26->check proc~dtimer_start timer%dtimer_start program~test26->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test26->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test26->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test26 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test26_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test26' ) end program test26","tags":"","loc":"program/test26.html"},{"title":"test30 – ForTime","text":"Uses fortime kinds forunittest program~~test30~~UsesGraph program~test30 test30 forunittest forunittest program~test30->forunittest kinds kinds program~test30->kinds module~fortime fortime program~test30->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test30~~CallsGraph program~test30 test30 check check program~test30->check proc~dtimer_start timer%dtimer_start program~test30->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test30->proc~dtimer_stop proc~dtimer_write timer%dtimer_write program~test30->proc~dtimer_write proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test30 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test30_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test30' ) end program test30","tags":"","loc":"program/test30.html"},{"title":"test24 – ForTime","text":"Uses fortime kinds forunittest program~~test24~~UsesGraph program~test24 test24 forunittest forunittest program~test24->forunittest kinds kinds program~test24->kinds module~fortime fortime program~test24->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test24~~CallsGraph program~test24 test24 check check program~test24->check mpi_finalize mpi_finalize program~test24->mpi_finalize mpi_init mpi_init program~test24->mpi_init proc~mtimer_start timer%mtimer_start program~test24->proc~mtimer_start proc~mtimer_stop timer%mtimer_stop program~test24->proc~mtimer_stop proc~mtimer_write timer%mtimer_write program~test24->proc~mtimer_write proc~print_time print_time proc~mtimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 integer :: ierr Source Code program test24 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test24_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test24' ) #endif end program test24","tags":"","loc":"program/test24.html"},{"title":"example4 – ForTime","text":"Uses fortime program~~example4~~UsesGraph program~example4 example4 module~fortime fortime program~example4->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example4~~CallsGraph program~example4 example4 proc~ctimer_start timer%ctimer_start program~example4->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~example4->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~example4->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program example4 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . true ., color = 'yellow' ) ! nloops, message, print and color are optional. call t % ctimer_write ( 'example/example4_ctimes' ) ! Optionally, write the elapsed time to a file end program example4","tags":"","loc":"program/example4.html"},{"title":"test8 – ForTime","text":"Uses fortime kinds forunittest program~~test8~~UsesGraph program~test8 test8 forunittest forunittest program~test8->forunittest kinds kinds program~test8->kinds module~fortime fortime program~test8->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test8~~CallsGraph program~test8 test8 check check program~test8->check proc~otimer_start timer%otimer_start program~test8->proc~otimer_start proc~otimer_stop timer%otimer_stop program~test8->proc~otimer_stop proc~otimer_write timer%otimer_write program~test8->proc~otimer_write omp_get_wtime omp_get_wtime proc~otimer_start->omp_get_wtime proc~otimer_stop->omp_get_wtime proc~print_time print_time proc~otimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut integer :: nl integer :: nloops = 3 Source Code program test8 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' ) call t % otimer_write ( 'test/test8_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test8' ) #endif end program test8","tags":"","loc":"program/test8.html"},{"title":"example5 – ForTime","text":"Uses fortime program~~example5~~UsesGraph program~example5 example5 module~fortime fortime program~example5->module~fortime kinds kinds module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~example5~~CallsGraph program~example5 example5 proc~dtimer_start timer%dtimer_start program~example5->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~example5->proc~dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t Source Code program example5 use fortime implicit none type ( timer ) :: t call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () end program example5","tags":"","loc":"program/example5.html"},{"title":"test25 – ForTime","text":"Uses fortime kinds forunittest program~~test25~~UsesGraph program~test25 test25 forunittest forunittest program~test25->forunittest kinds kinds program~test25->kinds module~fortime fortime program~test25->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test25~~CallsGraph program~test25 test25 check check program~test25->check proc~dtimer_start timer%dtimer_start program~test25->proc~dtimer_start proc~dtimer_stop timer%dtimer_stop program~test25->proc~dtimer_stop proc~print_time print_time proc~dtimer_stop->proc~print_time proc~to_seconds to_seconds proc~dtimer_stop->proc~to_seconds colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test25 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test25' ) end program test25","tags":"","loc":"program/test25.html"},{"title":"test5 – ForTime","text":"Uses fortime kinds program~~test5~~UsesGraph program~test5 test5 kinds kinds program~test5->kinds module~fortime fortime program~test5->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test5~~CallsGraph program~test5 test5 proc~ctimer_start timer%ctimer_start program~test5->proc~ctimer_start proc~ctimer_stop timer%ctimer_stop program~test5->proc~ctimer_stop proc~ctimer_write timer%ctimer_write program~test5->proc~ctimer_write proc~print_time print_time proc~ctimer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t integer :: nl integer :: nloops = 3 Source Code program test5 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' ) call t % ctimer_write ( 'test/test5_ctimes' ) ! Optionally, write the elapsed time to a file end program test5","tags":"","loc":"program/test5.html"},{"title":"test1 – ForTime","text":"Uses fortime kinds forunittest program~~test1~~UsesGraph program~test1 test1 forunittest forunittest program~test1->forunittest kinds kinds program~test1->kinds module~fortime fortime program~test1->module~fortime module~fortime->kinds Help Graph Key Nodes of different colours represent the following: Graph Key Module Module Submodule Submodule Subroutine Subroutine Function Function Program Program This Page's Entity This Page's Entity Solid arrows point from a submodule to the (sub)module which it is\ndescended from. Dashed arrows point from a module or program unit to \nmodules which it uses. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Calls program~~test1~~CallsGraph program~test1 test1 check check program~test1->check proc~timer_start timer%timer_start program~test1->proc~timer_start proc~timer_stop timer%timer_stop program~test1->proc~timer_stop proc~print_time print_time proc~timer_stop->proc~print_time colorize colorize proc~print_time->colorize Help Graph Key Nodes of different colours represent the following: Graph Key Subroutine Subroutine Function Function Interface Interface Type Bound Procedure Type Bound Procedure Unknown Procedure Type Unknown Procedure Type Program Program This Page's Entity This Page's Entity Solid arrows point from a procedure to one which it calls. Dashed \narrows point from an interface to procedures which implement that interface.\nThis could include the module procedures in a generic interface or the\nimplementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Variables Type Attributes Name Initial type( timer ) :: t type(unit_test) :: ut Source Code program test1 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test1' ) end program test1","tags":"","loc":"program/test1.html"},{"title":"test23.f90 – ForTime","text":"This file depends on sourcefile~~test23.f90~~EfferentGraph sourcefile~test23.f90 test23.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test23.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test23 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test23_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test23' ) #endif end program test23","tags":"","loc":"sourcefile/test23.f90.html"},{"title":"test19.f90 – ForTime","text":"This file depends on sourcefile~~test19.f90~~EfferentGraph sourcefile~test19.f90 test19.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test19.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test19 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop ( print = . false .) call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test19' ) #endif end program test19","tags":"","loc":"sourcefile/test19.f90.html"},{"title":"test21.f90 – ForTime","text":"This file depends on sourcefile~~test21.f90~~EfferentGraph sourcefile~test21.f90 test21.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test21.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test21 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test21_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test21' ) #endif end program test21","tags":"","loc":"sourcefile/test21.f90.html"},{"title":"example2.f90 – ForTime","text":"This file depends on sourcefile~~example2.f90~~EfferentGraph sourcefile~example2.f90 example2.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example2.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example2 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true ., color = 'green' ) ! nloops, message, print and color are optional. call t % timer_write ( 'example/example2_etimes' ) ! Optionally, write the elapsed time to a file end program example2","tags":"","loc":"sourcefile/example2.f90.html"},{"title":"test22.f90 – ForTime","text":"This file depends on sourcefile~~test22.f90~~EfferentGraph sourcefile~test22.f90 test22.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test22.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test22 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop ( print = . false .) call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test22' ) #endif end program test22","tags":"","loc":"sourcefile/test22.f90.html"},{"title":"example1.f90 – ForTime","text":"This file depends on sourcefile~~example1.f90~~EfferentGraph sourcefile~example1.f90 example1.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example1.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example1 use fortime implicit none type ( timer ) :: t call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () end program example1","tags":"","loc":"sourcefile/example1.f90.html"},{"title":"test9.f90 – ForTime","text":"This file depends on sourcefile~~test9.f90~~EfferentGraph sourcefile~test9.f90 test9.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test9.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test9 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( message = 'OMP time:' ) call t % otimer_write ( 'test/test9_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test9' ) #endif end program test9","tags":"","loc":"sourcefile/test9.f90.html"},{"title":"test16.f90 – ForTime","text":"This file depends on sourcefile~~test16.f90~~EfferentGraph sourcefile~test16.f90 test16.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test16.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test16 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop ( print = . false .) end program test16","tags":"","loc":"sourcefile/test16.f90.html"},{"title":"test3.f90 – ForTime","text":"This file depends on sourcefile~~test3.f90~~EfferentGraph sourcefile~test3.f90 test3.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test3.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test3 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' ) call t % timer_write ( 'test/test3_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test3' ) end program test3","tags":"","loc":"sourcefile/test3.f90.html"},{"title":"test4.f90 – ForTime","text":"This file depends on sourcefile~~test4.f90~~EfferentGraph sourcefile~test4.f90 test4.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test4.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test4 use kinds use fortime implicit none type ( timer ) :: t ! CPU time call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program test4","tags":"","loc":"sourcefile/test4.f90.html"},{"title":"test2.f90 – ForTime","text":"This file depends on sourcefile~~test2.f90~~EfferentGraph sourcefile~test2.f90 test2.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test2.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test2 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % timer_write ( 'test/test2_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test2' ) end program test2","tags":"","loc":"sourcefile/test2.f90.html"},{"title":"example3.f90 – ForTime","text":"This file depends on sourcefile~~example3.f90~~EfferentGraph sourcefile~example3.f90 example3.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example3.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example3 use fortime implicit none type ( timer ) :: t call t % ctimer_start () call sleep ( 1 ) ! Perform operations here call t % ctimer_stop () end program example3","tags":"","loc":"sourcefile/example3.f90.html"},{"title":"test6.f90 – ForTime","text":"This file depends on sourcefile~~test6.f90~~EfferentGraph sourcefile~test6.f90 test6.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test6.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test6 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' ) call t % ctimer_write ( 'test/test6_ctimes' ) ! Optionally, write the elapsed time to a file end program test6","tags":"","loc":"sourcefile/test6.f90.html"},{"title":"test12.f90 – ForTime","text":"This file depends on sourcefile~~test12.f90~~EfferentGraph sourcefile~test12.f90 test12.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test12.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test12 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test12_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test12' ) #endif end program test12","tags":"","loc":"sourcefile/test12.f90.html"},{"title":"test20.f90 – ForTime","text":"This file depends on sourcefile~~test20.f90~~EfferentGraph sourcefile~test20.f90 test20.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test20.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test20 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' , print = . false .) call t % otimer_write ( 'test/test20_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test20' ) #endif end program test20","tags":"","loc":"sourcefile/test20.f90.html"},{"title":"test18.f90 – ForTime","text":"This file depends on sourcefile~~test18.f90~~EfferentGraph sourcefile~test18.f90 test18.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test18.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test18 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test18_ctimes' ) ! Optionally, write the elapsed time to a file end program test18","tags":"","loc":"sourcefile/test18.f90.html"},{"title":"test10.f90 – ForTime","text":"This file depends on sourcefile~~test10.f90~~EfferentGraph sourcefile~test10.f90 test10.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test10.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test10 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: ierr #if defined(USE_MPI) ! MPI time call mpi_init ( ierr ) call t % mtimer_start () call sleep ( 1 ) ! Perform operations here call t % mtimer_stop () call mpi_finalize ( ierr ) call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test10' ) #endif end program test10","tags":"","loc":"sourcefile/test10.f90.html"},{"title":"test15.f90 – ForTime","text":"This file depends on sourcefile~~test15.f90~~EfferentGraph sourcefile~test15.f90 test15.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test15.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test15 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test15_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test15' ) end program test15","tags":"","loc":"sourcefile/test15.f90.html"},{"title":"test29.f90 – ForTime","text":"This file depends on sourcefile~~test29.f90~~EfferentGraph sourcefile~test29.f90 test29.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test29.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test29 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test29_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test29' ) end program test29","tags":"","loc":"sourcefile/test29.f90.html"},{"title":"test7.f90 – ForTime","text":"This file depends on sourcefile~~test7.f90~~EfferentGraph sourcefile~test7.f90 test7.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test7.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test7 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut #if defined(USE_OMP) ! OMP time call t % otimer_start () call sleep ( 1 ) ! Perform operations here call t % otimer_stop () call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test7' ) #endif end program test7","tags":"","loc":"sourcefile/test7.f90.html"},{"title":"test11.f90 – ForTime","text":"This file depends on sourcefile~~test11.f90~~EfferentGraph sourcefile~test11.f90 test11.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test11.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test11 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( nloops = nloops , message = 'MPI time:' ) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test11_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test11' ) #endif end program test11","tags":"","loc":"sourcefile/test11.f90.html"},{"title":"example6.f90 – ForTime","text":"This file depends on sourcefile~~example6.f90~~EfferentGraph sourcefile~example6.f90 example6.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example6.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example6 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . true ., color = 'red' ) ! nloops, message, print and color are optional. call t % dtimer_write ( 'example/example6_etimes' ) ! Optionally, write the elapsed time to a file end program example6","tags":"","loc":"sourcefile/example6.f90.html"},{"title":"test27.f90 – ForTime","text":"This file depends on sourcefile~~test27.f90~~EfferentGraph sourcefile~test27.f90 test27.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test27.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test27 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test27_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test27' ) end program test27","tags":"","loc":"sourcefile/test27.f90.html"},{"title":"test13.f90 – ForTime","text":"This file depends on sourcefile~~test13.f90~~EfferentGraph sourcefile~test13.f90 test13.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test13.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test13 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop ( print = . false .) call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test13' ) end program test13","tags":"","loc":"sourcefile/test13.f90.html"},{"title":"test28.f90 – ForTime","text":"This file depends on sourcefile~~test28.f90~~EfferentGraph sourcefile~test28.f90 test28.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test28.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test28 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop ( print = . false .) call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test28' ) end program test28","tags":"","loc":"sourcefile/test28.f90.html"},{"title":"test17.f90 – ForTime","text":"This file depends on sourcefile~~test17.f90~~EfferentGraph sourcefile~test17.f90 test17.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test17.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test17 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . false .) call t % ctimer_write ( 'test/test17_ctimes' ) ! Optionally, write the elapsed time to a file end program test17","tags":"","loc":"sourcefile/test17.f90.html"},{"title":"test14.f90 – ForTime","text":"This file depends on sourcefile~~test14.f90~~EfferentGraph sourcefile~test14.f90 test14.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test14.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test14 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % timer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % timer_stop ( nloops = nloops , message = 'Elapsed time:' , print = . false .) call t % timer_write ( 'test/test14_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test14' ) end program test14","tags":"","loc":"sourcefile/test14.f90.html"},{"title":"test26.f90 – ForTime","text":"This file depends on sourcefile~~test26.f90~~EfferentGraph sourcefile~test26.f90 test26.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test26.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test26 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( nloops = nloops , message = 'Elapsed time:' ) call t % dtimer_write ( 'test/test26_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test26' ) end program test26","tags":"","loc":"sourcefile/test26.f90.html"},{"title":"test30.f90 – ForTime","text":"This file depends on sourcefile~~test30.f90~~EfferentGraph sourcefile~test30.f90 test30.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test30.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test30 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 ! Elapsed time with nloops call t % dtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % dtimer_stop ( message = 'Elapsed time:' , print = . false .) call t % dtimer_write ( 'test/test30_etimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % elapsed_dtime , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test30' ) end program test30","tags":"","loc":"sourcefile/test30.f90.html"},{"title":"test24.f90 – ForTime","text":"This file depends on sourcefile~~test24.f90~~EfferentGraph sourcefile~test24.f90 test24.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test24.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test24 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 integer :: ierr #if defined(USE_MPI) ! MPI time with nloops call mpi_init ( ierr ) call t % mtimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % mtimer_stop ( message = 'MPI time:' , print = . false .) call mpi_finalize ( ierr ) call t % mtimer_write ( 'test/test24_mtimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % mpi_time , expected = real ( nloops , rk ) * 1.0_rk , tol = 1.0e-1_rk , msg = 'test24' ) #endif end program test24","tags":"","loc":"sourcefile/test24.f90.html"},{"title":"example4.f90 – ForTime","text":"This file depends on sourcefile~~example4.f90~~EfferentGraph sourcefile~example4.f90 example4.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example4.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example4 use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' , print = . true ., color = 'yellow' ) ! nloops, message, print and color are optional. call t % ctimer_write ( 'example/example4_ctimes' ) ! Optionally, write the elapsed time to a file end program example4","tags":"","loc":"sourcefile/example4.f90.html"},{"title":"test8.f90 – ForTime","text":"This file depends on sourcefile~~test8.f90~~EfferentGraph sourcefile~test8.f90 test8.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test8.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test8 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut integer :: nl , nloops = 3 #if defined(USE_OMP) ! OMP time with nloops call t % otimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % otimer_stop ( nloops = nloops , message = 'OMP time:' ) call t % otimer_write ( 'test/test8_otimes' ) ! Optionally, write the elapsed time to a file call ut % check ( res = t % omp_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test8' ) #endif end program test8","tags":"","loc":"sourcefile/test8.f90.html"},{"title":"example5.f90 – ForTime","text":"This file depends on sourcefile~~example5.f90~~EfferentGraph sourcefile~example5.f90 example5.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~example5.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program example5 use fortime implicit none type ( timer ) :: t call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () end program example5","tags":"","loc":"sourcefile/example5.f90.html"},{"title":"fortime.f90 – ForTime","text":"Files dependent on this one sourcefile~~fortime.f90~~AfferentGraph sourcefile~fortime.f90 fortime.f90 sourcefile~example1.f90 example1.f90 sourcefile~example1.f90->sourcefile~fortime.f90 sourcefile~example2.f90 example2.f90 sourcefile~example2.f90->sourcefile~fortime.f90 sourcefile~example3.f90 example3.f90 sourcefile~example3.f90->sourcefile~fortime.f90 sourcefile~example4.f90 example4.f90 sourcefile~example4.f90->sourcefile~fortime.f90 sourcefile~example5.f90 example5.f90 sourcefile~example5.f90->sourcefile~fortime.f90 sourcefile~example6.f90 example6.f90 sourcefile~example6.f90->sourcefile~fortime.f90 sourcefile~test1.f90 test1.f90 sourcefile~test1.f90->sourcefile~fortime.f90 sourcefile~test10.f90 test10.f90 sourcefile~test10.f90->sourcefile~fortime.f90 sourcefile~test11.f90 test11.f90 sourcefile~test11.f90->sourcefile~fortime.f90 sourcefile~test12.f90 test12.f90 sourcefile~test12.f90->sourcefile~fortime.f90 sourcefile~test13.f90 test13.f90 sourcefile~test13.f90->sourcefile~fortime.f90 sourcefile~test14.f90 test14.f90 sourcefile~test14.f90->sourcefile~fortime.f90 sourcefile~test15.f90 test15.f90 sourcefile~test15.f90->sourcefile~fortime.f90 sourcefile~test16.f90 test16.f90 sourcefile~test16.f90->sourcefile~fortime.f90 sourcefile~test17.f90 test17.f90 sourcefile~test17.f90->sourcefile~fortime.f90 sourcefile~test18.f90 test18.f90 sourcefile~test18.f90->sourcefile~fortime.f90 sourcefile~test19.f90 test19.f90 sourcefile~test19.f90->sourcefile~fortime.f90 sourcefile~test2.f90 test2.f90 sourcefile~test2.f90->sourcefile~fortime.f90 sourcefile~test20.f90 test20.f90 sourcefile~test20.f90->sourcefile~fortime.f90 sourcefile~test21.f90 test21.f90 sourcefile~test21.f90->sourcefile~fortime.f90 sourcefile~test22.f90 test22.f90 sourcefile~test22.f90->sourcefile~fortime.f90 sourcefile~test23.f90 test23.f90 sourcefile~test23.f90->sourcefile~fortime.f90 sourcefile~test24.f90 test24.f90 sourcefile~test24.f90->sourcefile~fortime.f90 sourcefile~test25.f90 test25.f90 sourcefile~test25.f90->sourcefile~fortime.f90 sourcefile~test26.f90 test26.f90 sourcefile~test26.f90->sourcefile~fortime.f90 sourcefile~test27.f90 test27.f90 sourcefile~test27.f90->sourcefile~fortime.f90 sourcefile~test28.f90 test28.f90 sourcefile~test28.f90->sourcefile~fortime.f90 sourcefile~test29.f90 test29.f90 sourcefile~test29.f90->sourcefile~fortime.f90 sourcefile~test3.f90 test3.f90 sourcefile~test3.f90->sourcefile~fortime.f90 sourcefile~test30.f90 test30.f90 sourcefile~test30.f90->sourcefile~fortime.f90 sourcefile~test4.f90 test4.f90 sourcefile~test4.f90->sourcefile~fortime.f90 sourcefile~test5.f90 test5.f90 sourcefile~test5.f90->sourcefile~fortime.f90 sourcefile~test6.f90 test6.f90 sourcefile~test6.f90->sourcefile~fortime.f90 sourcefile~test7.f90 test7.f90 sourcefile~test7.f90->sourcefile~fortime.f90 sourcefile~test8.f90 test8.f90 sourcefile~test8.f90->sourcefile~fortime.f90 sourcefile~test9.f90 test9.f90 sourcefile~test9.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code !> This module provides a timer object for measuring elapsed time. !> It includes procedures for starting and stopping the timer, as well !> as calculating and printing the elapsed time in seconds. module fortime use kinds implicit none private public :: timer !=============================================================================== type :: timer integer , private :: clock_rate ! Processor clock rate integer , private :: clock_start ! Start time in processor ticks integer , private :: clock_end ! End time in processor ticks integer , private :: clock_elapsed ! Elapsed time in processor ticks real ( rk ) :: elapsed_time ! Elapsed time in seconds real ( rk ), private :: cpu_start ! Start CPU time real ( rk ), private :: cpu_end ! End CPU time real ( rk ), private :: cpu_elapsed ! Elapsed CPU time real ( rk ) :: cpu_time ! Elapsed time in seconds #if defined(USE_OMP) real ( rk ), private :: omp_start ! Start OMP time real ( rk ), private :: omp_end ! End OMP time real ( rk ), private :: omp_elapsed ! Elapsed OMP time real ( rk ) :: omp_time ! Elapsed time in seconds #endif #if defined(USE_MPI) real ( rk ), private :: mpi_start ! Start MPI time real ( rk ), private :: mpi_end ! End MPI time real ( rk ), private :: mpi_elapsed ! Elapsed MPI time real ( rk ) :: mpi_time ! Elapsed time in seconds #endif integer , dimension ( 8 ), private :: values_start ! Start date and time values integer , dimension ( 8 ), private :: values_end ! End date and time values integer , dimension ( 8 ), private :: values_elapsed ! Elapsed date and time values real ( rk ) :: elapsed_dtime ! Elapsed time in seconds contains procedure :: timer_start ! Procedure for starting the timer procedure :: timer_stop ! Procedure for stopping the timer procedure :: timer_write ! Procedure for writing elapsed time to a file procedure :: ctimer_start ! Procedure for starting the CPU timer procedure :: ctimer_stop ! Procedure for stopping the CPU timer procedure :: ctimer_write ! Procedure for writing elapsed CPU time to a file #if defined(USE_OMP) procedure :: otimer_start ! Procedure for starting the OMP timer procedure :: otimer_stop ! Procedure for stopping the OMP timer procedure :: otimer_write ! Procedure for writing elapsed OMP time to a file #endif #if defined(USE_MPI) procedure :: mtimer_start ! Procedure for starting the MPI timer procedure :: mtimer_stop ! Procedure for stopping the MPI timer procedure :: mtimer_write ! Procedure for writing elapsed MPI time to a file #endif procedure :: dtimer_start ! Procedure for starting the date_and_time timer procedure :: dtimer_stop ! Procedure for stopping the date_and_time timer procedure :: dtimer_write ! Procedure for writing elapsed date_and_time time to a file end type !=============================================================================== contains !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current processor clock value. !> This value is used to calculate the elapsed time later. impure subroutine timer_start ( this ) class ( timer ), intent ( inout ) :: this ! Get the processor clock rate call system_clock ( count_rate = this % clock_rate ) ! Start the timer call system_clock ( count = this % clock_start ) end subroutine timer_start !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the elapsed time. !> Optionally, it can print a message along with the elapsed time. impure subroutine timer_stop ( this , nloops , message , print , color ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color ! Stop the timer call system_clock ( count = this % clock_end ) ! Calculate the elapsed processor ticks this % clock_elapsed = this % clock_end - this % clock_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) if ( present ( nloops )) & this % elapsed_time = real ( this % clock_elapsed , kind = rk ) / real ( this % clock_rate , kind = rk ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_time , msg , color ) else call print_time ( this % elapsed_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine timer_stop !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the elapsed time to a file. impure subroutine timer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_time ! Close the file close ( nunit ) end subroutine timer_write !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current CPU time value. !> This value is used to calculate the CPU time later. impure subroutine ctimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call cpu_time ( this % cpu_start ) end subroutine ctimer_start !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the CPU time. !> Optionally, it can print a message along with the CPU time. impure subroutine ctimer_stop ( this , nloops , message , print , color ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color ! Stop the timer call cpu_time ( this % cpu_end ) ! Calculate the elapsed CPU time this % cpu_elapsed = this % cpu_end - this % cpu_start ! Convert CPU time to seconds if (. not . present ( nloops )) this % cpu_time = this % cpu_elapsed if ( present ( nloops )) this % cpu_time = this % cpu_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"CPU time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % cpu_time , msg , color ) else call print_time ( this % cpu_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine ctimer_stop !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the CPU time to a file. impure subroutine ctimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the CPU time to the file write ( nunit , '(g0)' ) this % cpu_time ! Close the file close ( nunit ) end subroutine ctimer_write !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current OMP time value. !> This value is used to calculate the OMP time later. #if defined(USE_OMP) impure subroutine otimer_start ( this ) use omp_lib class ( timer ), intent ( inout ) :: this ! Start the timer this % omp_start = omp_get_wtime () end subroutine otimer_start !=============================================================================== #endif #if defined(USE_OMP) !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the OMP time. !> Optionally, it can print a message along with the OMP time. impure subroutine otimer_stop ( this , nloops , message , print , color ) use omp_lib class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color ! Stop the timer this % omp_end = omp_get_wtime () ! Calculate the elapsed OMP time this % omp_elapsed = this % omp_end - this % omp_start ! Convert OMP time to seconds if (. not . present ( nloops )) this % omp_time = this % omp_elapsed if ( present ( nloops )) this % omp_time = this % omp_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"OMP time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % omp_time , msg , color ) else call print_time ( this % omp_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine otimer_stop !=============================================================================== #endif #if defined(USE_OMP) !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the OMP time to a file. impure subroutine otimer_write ( this , file_name ) use omp_lib class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the OMP time to the file write ( nunit , '(g0)' ) this % omp_time ! Close the file close ( nunit ) end subroutine otimer_write !=============================================================================== #endif #if defined(USE_MPI) !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current MPI time value. !> This value is used to calculate the MPI time later. impure subroutine mtimer_start ( this ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Start the timer this % mpi_start = mpi_wtime () end subroutine mtimer_start !=============================================================================== #endif #if defined(USE_MPI) !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the MPI time. !> Optionally, it can print a message along with the MPI time. impure subroutine mtimer_stop ( this , nloops , message , print , color ) ! include 'mpif.h' class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print character ( * ), intent ( in ), optional :: color interface function mpi_wtime () import rk real ( rk ) :: mpi_wtime end function mpi_wtime end interface ! Stop the timer this % mpi_end = mpi_wtime () ! Calculate the elapsed MPI time this % mpi_elapsed = this % mpi_end - this % mpi_start ! Convert MPI time to seconds if (. not . present ( nloops )) this % mpi_time = this % mpi_elapsed if ( present ( nloops )) this % mpi_time = this % mpi_elapsed / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"MPI time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % mpi_time , msg , color ) else call print_time ( this % mpi_time , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine mtimer_stop !=============================================================================== #endif #if defined(USE_MPI) !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the MPI time to a file. impure subroutine mtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the MPI time to the file write ( nunit , '(g0)' ) this % mpi_time ! Close the file close ( nunit ) end subroutine mtimer_write !=============================================================================== #endif !=============================================================================== !> author: Seyed Ali Ghasemi !> Starts the timer by recording the current processor clock value. !> This value is used to calculate the elapsed time later. impure subroutine dtimer_start ( this ) class ( timer ), intent ( inout ) :: this ! Start the timer call date_and_time ( values = this % values_start ) end subroutine dtimer_start !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Stops the timer and calculates the elapsed time. !> Optionally, it can print a message along with the elapsed time. impure subroutine dtimer_stop ( this , nloops , message , print , color ) class ( timer ), intent ( inout ) :: this integer , intent ( in ), optional :: nloops character ( * ), intent ( in ), optional :: message character (:), allocatable :: msg logical , intent ( in ), optional :: print real ( rk ) :: values_elapsed_sec character ( * ), intent ( in ), optional :: color ! Stop the timer call date_and_time ( values = this % values_end ) ! Calculate the elapsed processor ticks this % values_elapsed = this % values_end - this % values_start ! Convert processor ticks to seconds if (. not . present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) if ( present ( nloops )) & this % elapsed_dtime = to_seconds ( this % values_elapsed ) / real ( nloops , kind = rk ) ! Print the elapsed time if (. not . present ( message )) then msg = \"Elapsed time:\" else msg = message end if if ( present ( print )) then if ( print ) call print_time ( this % elapsed_dtime , msg , color ) else call print_time ( this % elapsed_dtime , msg , color ) end if ! Deallocate the message if ( allocated ( msg )) deallocate ( msg ) end subroutine dtimer_stop !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi !> Writes the elapsed time to a file. impure subroutine dtimer_write ( this , file_name ) class ( timer ), intent ( in ) :: this character ( * ), intent ( in ) :: file_name logical :: file_exists integer :: nunit ! Check if the file exists inquire ( file = file_name , exist = file_exists ) ! Open the file in appropriate mode if ( file_exists ) then open ( newunit = nunit , file = file_name , status = 'old' , action = 'write' , position = 'append' ) else open ( newunit = nunit , file = file_name , status = 'new' , action = 'write' ) end if ! Write the elapsed time to the file write ( nunit , '(g0)' ) this % elapsed_dtime ! Close the file close ( nunit ) end subroutine dtimer_write !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi pure function to_seconds ( values ) result ( seconds ) integer , dimension ( 8 ), intent ( in ) :: values real ( rk ) :: seconds seconds = real ( values ( 3 ), rk ) * 2 4.0_rk * 6 0.0_rk * 6 0.0_rk + & real ( values ( 5 ), rk ) * 6 0.0_rk * 6 0.0_rk + & real ( values ( 6 ), rk ) * 6 0.0_rk + & real ( values ( 7 ), rk ) + & real ( values ( 8 ), rk ) / 100 0.0_rk end function to_seconds !=============================================================================== !=============================================================================== !> author: Seyed Ali Ghasemi impure subroutine print_time ( time , message , color ) use face real ( rk ), intent ( in ) :: time character ( * ), intent ( in ) :: message character ( * ), intent ( in ), optional :: color if ( present ( color )) then print '(A, F16.9, A)' , colorize ( trim ( message ), color_fg = trim ( color )), time , colorize ( \" [s]\" , color_fg = trim ( color )) else print '(A, F16.9, A)' , colorize ( trim ( message ), color_fg = 'blue' ), time , colorize ( \" [s]\" , color_fg = 'blue' ) end if end subroutine print_time !=============================================================================== end module fortime","tags":"","loc":"sourcefile/fortime.f90.html"},{"title":"test25.f90 – ForTime","text":"This file depends on sourcefile~~test25.f90~~EfferentGraph sourcefile~test25.f90 test25.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test25.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test25 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % dtimer_start () call sleep ( 1 ) ! Perform operations here call t % dtimer_stop () call ut % check ( res = t % elapsed_dtime , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test25' ) end program test25","tags":"","loc":"sourcefile/test25.f90.html"},{"title":"test5.f90 – ForTime","text":"This file depends on sourcefile~~test5.f90~~EfferentGraph sourcefile~test5.f90 test5.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test5.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test5 use kinds use fortime implicit none type ( timer ) :: t integer :: nl , nloops = 3 ! CPU time with nloops call t % ctimer_start () do nl = 1 , nloops call sleep ( 1 ) ! Perform operations ntimes end do call t % ctimer_stop ( nloops = nloops , message = 'CPU time:' ) call t % ctimer_write ( 'test/test5_ctimes' ) ! Optionally, write the elapsed time to a file end program test5","tags":"","loc":"sourcefile/test5.f90.html"},{"title":"test1.f90 – ForTime","text":"This file depends on sourcefile~~test1.f90~~EfferentGraph sourcefile~test1.f90 test1.f90 sourcefile~fortime.f90 fortime.f90 sourcefile~test1.f90->sourcefile~fortime.f90 Help Graph Key Nodes of different colours represent the following: Graph Key Source File Source File This Page's Entity This Page's Entity Solid arrows point from a file to a file which it depends on. A file\nis dependent upon another if the latter must be compiled before the former\ncan be. Where possible, edges connecting nodes are\ngiven different colours to make them easier to distinguish in\nlarge graphs. Source Code program test1 use kinds use fortime use forunittest implicit none type ( timer ) :: t type ( unit_test ) :: ut ! Elapsed time call t % timer_start () call sleep ( 1 ) ! Perform operations here call t % timer_stop () call ut % check ( res = t % elapsed_time , expected = 1.0_rk , tol = 1.0e-1_rk , msg = 'test1' ) end program test1","tags":"","loc":"sourcefile/test1.f90.html"}]} \ No newline at end of file diff --git a/type/timer.html b/type/timer.html index 153e8af..4bdac7d 100644 --- a/type/timer.html +++ b/type/timer.html @@ -76,7 +76,7 @@

                                                                timer
                                                              • 39 statements + title="

                                                                100.0% of total for derived types.

                                                                Including implementation: 261 statements, 100.0% of total for derived types.">39 statements
                                                              • @@ -646,7 +646,7 @@

                                                                • - private impure subroutine timer_stop(this, nloops, message, print) + private impure subroutine timer_stop(this, nloops, message, print, color)

                                                                  Author
                                                                  Seyed Ali Ghasemi
                                                                  @@ -725,6 +725,21 @@

                                                                  Arguments

                                                                  print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -879,7 +894,7 @@

                                                                  • - private impure subroutine ctimer_stop(this, nloops, message, print) + private impure subroutine ctimer_stop(this, nloops, message, print, color)

                                                                    Author
                                                                    Seyed Ali Ghasemi
                                                                    @@ -958,6 +973,21 @@

                                                                    Arguments

                                                                    print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -1112,7 +1142,7 @@

                                                                    • - private impure subroutine otimer_stop(this, nloops, message, print) + private impure subroutine otimer_stop(this, nloops, message, print, color)

                                                                      Author
                                                                      Seyed Ali Ghasemi
                                                                      @@ -1191,6 +1221,21 @@

                                                                      Arguments

                                                                      print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -1345,7 +1390,7 @@

                                                                      • - private impure subroutine mtimer_stop(this, nloops, message, print) + private impure subroutine mtimer_stop(this, nloops, message, print, color)

                                                                        Author
                                                                        Seyed Ali Ghasemi
                                                                        @@ -1424,6 +1469,21 @@

                                                                        Arguments

                                                                        print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -1578,7 +1638,7 @@

                                                                        • - private impure subroutine dtimer_stop(this, nloops, message, print) + private impure subroutine dtimer_stop(this, nloops, message, print, color)

                                                                          Author
                                                                          Seyed Ali Ghasemi
                                                                          @@ -1657,6 +1717,21 @@

                                                                          Arguments

                                                                          print + + + + + + character(len=*), + +intent(in), + optional + + + :: + color + + @@ -1761,7 +1836,7 @@

                                                                          Arguments

                                                                          Documentation generated by FORD - on 2024-04-22T08:06:45.443687

                                                                          + on 2024-04-22T09:42:49.196740