Skip to content

Commit

Permalink
Add test for perf graph live print formatting and multiapps interacti…
Browse files Browse the repository at this point in the history
  • Loading branch information
GiudGiud committed Mar 16, 2023
1 parent 9ac1659 commit 06936cd
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 5 deletions.
19 changes: 17 additions & 2 deletions test/tests/utils/perf_graph_live_print/perf_graph_live_print.i
Expand Up @@ -34,7 +34,9 @@

[Problem]
type = SlowProblem
seconds_to_sleep = 8
seconds_to_sleep = 3
print_during_section = false
nest_inside_section = false
[]

[Executioner]
Expand All @@ -44,6 +46,19 @@
petsc_options_value = 'hypre boomeramg'
[]

[MultiApps]
active = ''
[subapp]
type = FullSolveMultiApp
input_files = 'perf_graph_live_print.i'
cli_args = "MultiApps/active=''"
[]
[]

[Outputs]
perf_graph_live_time_limit = 1
[]
[console]
type = Console
fit_mode = 80
[]
[]
61 changes: 58 additions & 3 deletions test/tests/utils/perf_graph_live_print/tests
@@ -1,11 +1,66 @@
[Tests]
[./test]
[time_test]
type = RunApp
input = perf_graph_live_print.i
expect_out = "Testing Slowness"

issues = '#15444'
design = 'utils/PerfGraph.md'
requirement = 'The system shall allow for timing sections of code and having automated print-outs when they take too long or use too much memory'
[../]
requirement = 'The system shall allow for timing sections of code and having automated print-outs when they take too long'
[]

[nested_sections]
type = RunApp
input = perf_graph_live_print.i
cli_args = 'Problem/nest_inside_section=true'
# Checks the size of the printout as well, 62 characters after the text then a bracket
expect_out = "Testing Nested Slowness( |\.){62}\["

issues = '#15444'
design = 'utils/PerfGraphLivePrint.md'
requirement = 'The system shall allow for nested timing sections of code and having automated print-outs when they take too long'
[]
[section_interrupted_by_regular_print]
# this test does not address the warnings 'direct to Moose::out' issue #23750
type = RunApp
input = perf_graph_live_print.i
cli_args = 'Problem/print_during_section=true'
expect_out = "Timed section just started, printing something though\n(Currently|Still) Executing"

issues = '#23746'
design = 'utils/PerfGraphLivePrint.md'
requirement = 'The system shall be able to print the automatic print-out of a timed section when an external print happened'
[]

[multiapps]
type = RunApp
input = perf_graph_live_print.i
cli_args = "MultiApps/active='subapp' --color off"
expect_out = "subapp0: Testing Slowness( |\.){64}\["

issues = '#19114'
design = 'utils/PerfGraphLivePrint.md'
requirement = 'The system shall allow for automatic print-outs of timing sections within multiapps'
[]
[multiapps_and_nested]
type = RunApp
input = perf_graph_live_print.i
cli_args = "MultiApps/active='subapp' MultiApps/subapp/cli_args=Problem/nest_inside_section=true --color off"
expect_out = "subapp0: Testing Nested Slowness( |\.){55}\["

issues = '#19114'
design = 'utils/PerfGraphLivePrint.md'
requirement = 'The system shall allow for automatic print-outs of nested timing sections within multiapps'
[]

[nested_multiapps]
type = RunApp
input = perf_graph_live_print.i
cli_args = "MultiApps/active='subapp' MultiApps/subapp/cli_args='MultiApps/active=subapp' --color off"
expect_out = "subapp0_subapp0: Testing Slowness(\.| ){56}\["

issues = '#19114'
design = 'utils/PerfGraphLivePrint.md'
requirement = 'The system shall allow for automatic print-outs of timing sections within nested multiapps'
[]
[]

0 comments on commit 06936cd

Please sign in to comment.