Skip to content

Commit

Permalink
update flag description, variable name, more specific respose
Browse files Browse the repository at this point in the history
Signed-off-by: YUUU23 <[email protected]>
  • Loading branch information
YUUU23 committed Jul 12, 2024
1 parent 94c63ac commit 536bd8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion compiler/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
12 changes: 6 additions & 6 deletions compiler/pash_compilation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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")
Expand All @@ -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
Expand Down

0 comments on commit 536bd8e

Please sign in to comment.