Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
09960a1
handling basic cases
SleepyMug Oct 27, 2023
c189d27
changes to support clone and chdir
SleepyMug Oct 29, 2023
e7bb52b
correct realtime pipe behavior
SleepyMug Oct 29, 2023
1cb1041
basic integration
Nov 11, 2023
8e439b6
more test cases
Nov 11, 2023
379d616
catch exit code
Nov 12, 2023
9e921e5
Fix bug in scheduler state updating
gliargovas Nov 15, 2023
43c9175
support for eager dependency resolving
SleepyMug Dec 13, 2023
258e818
fix wrong commit
SleepyMug Dec 13, 2023
413df3e
fix parsing when partial line exists in the trace
SleepyMug Dec 13, 2023
23fe3f5
fix readline behavior
SleepyMug Dec 13, 2023
88aedee
Start the refatoring. Implement basic structures and operations
gliargovas Jan 9, 2024
c82cf3b
Progress the refactor
gliargovas Jan 11, 2024
6b3140a
basic sequential execution
SleepyMug Jan 12, 2024
91901e7
Cleanup and implement transitions triggered by Wait
gliargovas Jan 13, 2024
7b1741f
simple speculation enabled
SleepyMug Jan 14, 2024
0737b2f
Env check and cleanup
gliargovas Jan 14, 2024
47d32dc
Fix env checking and add exec instanse wait msg matching
gliargovas Jan 16, 2024
8052352
Update script to receive exec id from scheduler
gliargovas Jan 16, 2024
19b6a19
adding eager killing, WIP
SleepyMug Jan 21, 2024
f96b816
fixing reset following node on env change
SleepyMug Jan 21, 2024
e299874
merge and fix eager fs dep killing
SleepyMug Jan 21, 2024
ff736f7
Create HSProg class and ConcreteNode class.
SleepyMug Feb 5, 2024
9151f34
minimal working loop
SleepyMug Feb 6, 2024
87c68f5
Add ignore vars in env resolution
gliargovas Feb 6, 2024
3e76190
Reset current node on env conflict
gliargovas Feb 6, 2024
bf3c212
fix empty first bb
SleepyMug Feb 6, 2024
5116a34
fix the break and unsafe command for now
SleepyMug Feb 6, 2024
9bd4c8b
cleanup
SleepyMug Feb 6, 2024
1420721
Merge branch 'main' into new-scheduler-benchmark-infra
gliargovas Feb 9, 2024
8f7a62b
Adjust benchmark infra to the new scheduler logs
gliargovas Feb 9, 2024
a111858
Print node id when logging node state
gliargovas Feb 9, 2024
c6e3df0
Add custom workdir definition functionality
gliargovas Feb 9, 2024
fadd382
Fix config
gliargovas Feb 11, 2024
a98b956
Fix benchmarks to work properly
gliargovas Feb 11, 2024
0450d5d
make strace spawn shell such that it traces the redirection
SleepyMug Feb 11, 2024
5be2a6c
adding getxattr, lgetxattr, and faccessat2 into tracing
SleepyMug Feb 12, 2024
6f2266f
Use most recent try branch
gliargovas Feb 17, 2024
1172d7f
Remove Riker dependency
gliargovas Feb 17, 2024
d0851fd
Update config to also setup try
gliargovas Feb 17, 2024
c569b83
Make CI use Python 3.11
gliargovas Feb 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Running Correctness Tests
run: |
cd ..
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
scripts/vars.sh
*__pycache__*
.DS_Store
*~
\#*\#
.\#*
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "deps/riker"]
path = deps/riker
url = https://github.com/angelhof/riker.git
branch = eric-custom-db-store
[submodule "deps/pash"]
path = deps/pash
url = https://github.com/binpash/pash.git
Expand Down
1 change: 0 additions & 1 deletion deps/riker
Submodule riker deleted from f3bee7
2 changes: 1 addition & 1 deletion deps/try
28 changes: 15 additions & 13 deletions parallel-orch/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,33 @@
# and traces them with Riker.
# All commands are run inside an overlay sandbox.

def async_run_and_trace_command_return_trace(command, node_id, latest_env_file, speculate_mode=False):
def async_run_and_trace_command_return_trace(command, concrete_node_id, execution_id, pre_execution_env_file, speculate_mode=False):
trace_file = util.ptempfile()
stdout_file = util.ptempfile()
stderr_file = util.ptempfile()
post_execution_env_file = util.ptempfile()
logging.debug(f'Scheduler: Stdout file for: {node_id} is: {stdout_file}')
logging.debug(f'Scheduler: Stderr file for: {node_id} is: {stderr_file}')
logging.debug(f'Scheduler: Trace file for: {node_id}: {trace_file}')
process = async_run_and_trace_command_return_trace_in_sandbox(command, trace_file, node_id, stdout_file, stderr_file, latest_env_file, post_execution_env_file, speculate_mode)
return process, trace_file, stdout_file, stderr_file, post_execution_env_file
sandbox_dir, tmp_dir = util.create_sandbox()
logging.debug(f'Scheduler: Stdout file for: {concrete_node_id} is: {stdout_file}')
logging.debug(f'Scheduler: Stderr file for: {concrete_node_id} is: {stderr_file}')
logging.debug(f'Scheduler: Trace file for: {concrete_node_id}: {trace_file}')
process = async_run_and_trace_command_return_trace_in_sandbox(command, execution_id, trace_file, concrete_node_id, stdout_file, stderr_file, pre_execution_env_file, post_execution_env_file, sandbox_dir, tmp_dir, speculate_mode)
return process, trace_file, stdout_file, stderr_file, pre_execution_env_file, post_execution_env_file, sandbox_dir

def async_run_and_trace_command_return_trace_in_sandbox_speculate(command, node_id, latest_env_file):
process, trace_file, stdout_file, stderr_file, post_execution_env_file = async_run_and_trace_command_return_trace(command, node_id, latest_env_file, speculate_mode=True)
return process, trace_file, stdout_file, stderr_file, post_execution_env_file
def async_run_and_trace_command_return_trace_in_sandbox_speculate(command, execution_id, concrete_node_id, pre_execution_env_file):
process, trace_file, stdout_file, stderr_file, post_execution_env_file, sandbox_dir = async_run_and_trace_command_return_trace(command, execution_id, concrete_node_id, pre_execution_env_file, speculate_mode=True)
return process, trace_file, stdout_file, stderr_file, post_execution_env_file, sandbox_dir

def async_run_and_trace_command_return_trace_in_sandbox(command, trace_file, node_id, stdout_file, stderr_file, latest_env_file, post_execution_env_file, speculate_mode=False):
def async_run_and_trace_command_return_trace_in_sandbox(command, execution_id, trace_file, concrete_node_id, stdout_file, stderr_file, pre_execution_env_file, post_execution_env_file, sandbox_dir, tmp_dir, speculate_mode=False):
## Call Riker to execute the command
run_script = f'{config.PASH_SPEC_TOP}/parallel-orch/run_command.sh'
args = ["/bin/bash", run_script, command, trace_file, stdout_file, latest_env_file]
args = ["/bin/bash", run_script, command, trace_file, stdout_file, pre_execution_env_file, sandbox_dir, tmp_dir]
if speculate_mode:
args.append("speculate")
else:
args.append("standard")
args.append(str(node_id))
args.append(str(concrete_node_id))
args.append(post_execution_env_file)
args.append(str(execution_id))
# Save output to temporary files to not saturate the memory
logging.debug(args)
process = subprocess.Popen(args, stdout=None, stderr=None)
Expand All @@ -56,7 +58,7 @@ def read_trace(sandbox_dir, trace_file):
path = f"{sandbox_dir}/upperdir/{trace_file}"
logging.debug(f'Reading trace from: {path}')
with open(path) as f:
return f.readlines()
return f.read().split('\n')[:-1]

def read_env_file(env_file, sandbox_dir=None):
if sandbox_dir is None:
Expand Down
Loading