modulefdoc_progress
Progress in the terminal: a live bar for each stage of the run, leaving a line with its time, and warnings that do not get mixed up with the bar. When standard output is not a terminal there are no bars or colours, just a line for each stage.
Stages run in parallel loops. Any thread can count, and only the first draws. Nothing here calls a
function returning a deferred-length string (see example/slen_race.f90).
Uses
Graphs
Uses
Used by
Variables
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| BAR_WIDTH | integer | privateparameter | 30 | |
| colour | logical | private | .false. | true to use colours |
| done | integer | private | 0 | how many are finished |
| drawn | logical | private | .false. | true if a bar is on the screen |
| EMPTY | character(len=*) | privateparameter | achar(226)//achar(148)//achar(128) |
|
| enabled | logical | private | .false. | true to report progress |
| ESC | character(len=*) | privateparameter | achar(27) | |
| FULL | character(len=*) | privateparameter | achar(226)//achar(148)//achar(129) |
|
| label | character(len=LABEL_WIDTH) | private | '' | the current stage |
| LABEL_WIDTH | integer | privateparameter | 24 | |
| last_draw | integer(kind=int64) | private | 0 | when the bar was last drawn |
| live | logical | private | .false. | true if standard output is a terminal |
| rate | integer(kind=int64) | private | 1000 | clock ticks in a second |
| REDRAW_MILLISECONDS | integer(kind=int64) | privateparameter | 40 | |
| run_start | integer(kind=int64) | private | 0 | when the run started |
| stage_start | integer(kind=int64) | private | 0 | when the stage started |
| total | integer | private | 0 | how many steps the stage has |
Interfaces
c_isattybind(C)private
C isatty.
Subroutines
bar_textpure
The bar for steps of size steps, width characters wide, with its filled and empty parts.
progress_start
Start stage name, of steps steps, or of unknown length if that is 0.
progress_tick
Count a step, or steps of them. This can be called from any thread.
warn
Write warning message to standard error, keeping the bar intact. This can be called from any
thread.