From 9e67a362990e36b285d92c9492ee26e2f528baa3 Mon Sep 17 00:00:00 2001 From: YUUU23 Date: Fri, 12 Jul 2024 20:00:52 +0000 Subject: [PATCH] update flag description, variable name, more specific respose --- compiler/cli.py | 2 +- compiler/pash_compilation_server.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/cli.py b/compiler/cli.py index 36b8baf6f..bfab6c988 100644 --- a/compiler/cli.py +++ b/compiler/cli.py @@ -62,7 +62,7 @@ def add_pash_args(self): ) self.add_argument( "--assert_all_regions_parallelizable", - help="assert that the compiler succeeded with all regions being parallelizable and no general error occuring (used to make tests more robust)", + help="assert that the compiler succeeded with all regions being parallelizable and no general error occuring (used to make tests more robust); more strict than --assert_compiler_success flag", action="store_true", ) self.add_argument( diff --git a/compiler/pash_compilation_server.py b/compiler/pash_compilation_server.py index d53e2af2a..203701e3a 100644 --- a/compiler/pash_compilation_server.py +++ b/compiler/pash_compilation_server.py @@ -253,7 +253,7 @@ def compile_and_add(self, compiled_script_file, var_file, input_ir_file): process_id = self.get_next_id() run_parallel = False compile_success = False - all_region_parallelizable = True + current_region_parallelizable = True variable_reading_start_time = datetime.now() # Read any shell variables files if present @@ -278,7 +278,7 @@ def compile_and_add(self, compiled_script_file, var_file, input_ir_file): ) except NotAllRegionParallelizableError: ast_or_ir = None - all_region_parallelizable = False + current_region_parallelizable = False daemon_compile_end_time = datetime.now() @@ -334,9 +334,9 @@ def compile_and_add(self, compiled_script_file, var_file, input_ir_file): response = server_util.success_response( f"{process_id} {compiled_script_file} {var_file} {input_ir_file}" ) - elif not all_region_parallelizable: - # send specified message to say not all regions are parallelizable instead of general exception caught - response = server_util.error_response(f"{process_id} not all regions are parallelizable; failed to compile") + elif not current_region_parallelizable: + # send specified message to say current region is not parallelizable instead of general exception caught + response = server_util.error_response(f"{process_id} current region is not parallelizable; failed to compile") self.unsafe_running = True else: response = server_util.error_response(f"{process_id} failed to compile") @@ -349,7 +349,7 @@ def compile_and_add(self, compiled_script_file, var_file, input_ir_file): ## nothing will run in this case also if (not compile_success and config.pash_args.assert_all_regions_parallelizable): pass - elif (not compile_success and all_region_parallelizable and config.pash_args.assert_compiler_success): + elif (not compile_success and current_region_parallelizable and config.pash_args.assert_compiler_success): pass else: self.running_procs += 1