Skip to content

Commit

Permalink
fix race bug when saving graph for distribution
Browse files Browse the repository at this point in the history
Signed-off-by: Tammam Mustafa <tammammusatafa@gmail.com>
  • Loading branch information
tammam1998 committed Apr 20, 2022
1 parent 276d55b commit fc8e38b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/pash_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pickle
import traceback
from datetime import datetime
from uuid import uuid4

import config
from ir import *
Expand Down Expand Up @@ -116,7 +117,7 @@ def compile_optimize_output_script(ir_filename, compiled_script_file, args, comp
## which should be translated to a parallel script.
if(isinstance(optimized_ast_or_ir, IR)):
if args.distributed_exec:
ir_filename = os.path.join(config.PASH_TMP_PREFIX, 'distributed_exec_ir.pkl')
ir_filename = os.path.join(config.PASH_TMP_PREFIX, f'{str(uuid4())[:8]}_distributed_exec_ir.pkl')
script_to_execute = f"$PASH_TOP/compiler/dspash/remote_exec_graph.sh {ir_filename}\n"
## This might not be needed anymore (since the output script is output anyway)
## TODO: This is probably useless, remove
Expand Down

0 comments on commit fc8e38b

Please sign in to comment.