From 65b121ffb2685ec6de8a9b754e73b281fff9e165 Mon Sep 17 00:00:00 2001 From: pschultzendorff Date: Tue, 28 Jan 2025 10:29:07 +0000 Subject: [PATCH] BUG: Fix keep-output command line argument in profiling script --- src/porepy/applications/profiling/run_profiling.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/porepy/applications/profiling/run_profiling.py b/src/porepy/applications/profiling/run_profiling.py index 4e256a81e..e5f1b11cb 100644 --- a/src/porepy/applications/profiling/run_profiling.py +++ b/src/porepy/applications/profiling/run_profiling.py @@ -198,7 +198,7 @@ def run_model_with_tracer(args, model) -> None: refinement. - min_duration (int): Minimum duration in microseconds for a function to be recorded by VizTracer. - - keep_output (bool): Whether to keep the output file after viewing it. + - clear_output (bool): Whether to clear the output file after viewing it. model: The model to be run and profiled. Raises: @@ -249,7 +249,7 @@ def run_model_with_tracer(args, model) -> None: results_path = pathlib.Path(__file__).parent / save_file tracer.save(str(results_path)) subprocess.run(["vizviewer", "--port", "9002", results_path]) - if not args.keep_output: + if args.clear_output: results_path.unlink() @@ -288,10 +288,10 @@ def run_model_with_tracer(args, model) -> None: + " named after the chosen physics, geometry, and grid refinement.", ) parser.add_argument( - "--keep_output", + "--clear_output", action="store_true", - default=True, - help="Keep viztracer output after running.", + help="Clear viztracer output after running. By default, the log files are" + + " kept.", ) parser.add_argument( "--min_duration",