Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4e67930
Change orch to handle commands that try to access the network on fron…
gliargovas Jun 21, 2023
2e5b1c1
Add test scripts for network access
gliargovas Jun 21, 2023
57a5f00
Fetch new riker and try changes
gliargovas Jun 21, 2023
2cfcad2
Don't move non-zero ec commands to stopped
gliargovas Jun 21, 2023
e718953
Use most recent Riker branch
gliargovas Jun 21, 2023
70efdd2
Remove old committed from step_forward()
gliargovas Jun 26, 2023
b9a3d5f
Remove frontier reference from rerun_stopped()
gliargovas Jul 5, 2023
1a2afcb
Check for all node predecessors
gliargovas Jul 5, 2023
357d999
Move rerun_stopped() to schedule_work()
gliargovas Jul 5, 2023
cb0144f
Remove redundant stopped frontier cmd check
gliargovas Jul 5, 2023
4eb08a3
Schedule commands one at a time instead of altogether
gliargovas Jul 5, 2023
714a362
Remove redundant scheduling functions
gliargovas Jul 5, 2023
183f98c
Separate internal and external functions of step_forward() and remove…
gliargovas Jul 8, 2023
54d6679
Remove redundant frontier references
gliargovas Jul 8, 2023
c2f47b1
Run every command in overlay (even frontier)
gliargovas Jul 8, 2023
375ea2f
Change frontier flag to speculate flag
gliargovas Jul 8, 2023
5430e1a
Kill and restart nodes still running on commit
gliargovas Jul 8, 2023
acf0d70
Kill child processes too
gliargovas Aug 14, 2023
24777a9
Ignore trace messages previously killed
gliargovas Aug 14, 2023
71dedcf
Ignore repetition checks
gliargovas Aug 14, 2023
7db13c1
Add single command test for CI debugging
gliargovas Aug 14, 2023
7653a61
Update install_deps_ubuntu20.sh
ezrizhu Aug 14, 2023
c00b10f
Use a sandbox for Riker db files instead of main workspace
gliargovas Aug 14, 2023
58f01f5
Fix issue that caused incorrect ec return
gliargovas Aug 15, 2023
68ff11b
Run tests in home dir of CI
gliargovas Aug 15, 2023
0ca2ae1
Add proc kill attempt timeout
gliargovas Aug 15, 2023
0ff2cb0
Update test workflow
gliargovas Aug 15, 2023
3a96e20
Move process handling to util
gliargovas Aug 15, 2023
435eaab
Fix bug on process killing
gliargovas Aug 15, 2023
a58f63c
Adjust test timings for faster CI and cleanup test dir
gliargovas Aug 15, 2023
27f46c8
Get rid of redundant frontier refs
gliargovas Aug 15, 2023
8254e06
Merge pull request #52 from binpash/ericzty-patch-1
ezrizhu Aug 16, 2023
d165cfd
Revert "Get rid of redundant frontier refs"
gliargovas Aug 16, 2023
1dd2da2
Add logs for debugging test_network_access_2
gliargovas Aug 16, 2023
2d8fdae
Add node for proc killing
gliargovas Aug 21, 2023
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
16 changes: 8 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ on:
- test/**
- scripts/**
workflow_dispatch:

# Jobs section
jobs:
PaSh-Spec-Tests:
Expand All @@ -32,20 +31,21 @@ jobs:
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Running Correctness Tests
run: |
cd ..
cp -r dynamic-parallelizer ~
cd ~/dynamic-parallelizer
sudo touch /.githubenv
# install the system deps and pash the environment
sudo -E bash scripts/install_deps_ubuntu20.sh
export PASH_TOP="$PWD/deps/pash"
export PATH=$PATH:$PASH_TOP
file ./deps/riker/debug/bin/rkr
uname -a
# run all the tests
export DEBUG=100
bash ./test/test_orch.sh
export PASH_TOP="$PWD/deps/pash"
export PATH=$PATH:$PASH_TOP
file ~/dynamic-parallelizer/deps/riker/debug/bin/rkr
bash ~/dynamic-parallelizer/test/test_orch.sh
# get the timer
timer=$(LANG=en_us_88591; date)
echo "VERSION<<EOF" >> $GITHUB_ENV
Expand Down Expand Up @@ -74,4 +74,4 @@ jobs:
- name: Exit Code
run: |
# check if everything executed without errors
cd test && bash exit_code.sh
cd ~/dynamic-parallelizer/test && bash exit_code.sh
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "deps/riker"]
path = deps/riker
url = https://github.com/angelhof/riker.git
branch = dyn-par-investigation
branch = eric-custom-db-store
[submodule "deps/pash"]
path = deps/pash
url = https://github.com/binpash/pash.git
Expand Down
2 changes: 2 additions & 0 deletions parallel-orch/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ def log_root(msg, *args, **kwargs):
SOCKET_BUF_SIZE = 8192

SCHEDULER_SOCKET = os.getenv("PASH_SPEC_SCHEDULER_SOCKET")

MAX_KILL_ATTEMPTS = 10 # Define a maximum number of kill attempts for each process in the partial program order
28 changes: 13 additions & 15 deletions parallel-orch/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,37 @@

# This module executes a sequence of commands
# and traces them with Riker.
# Commands [1:N] are run inside an overlay sandbox.
# All commands are run inside an overlay sandbox.

def async_run_and_trace_command_return_trace(command, node_id, sandbox_mode=False):
def async_run_and_trace_command_return_trace(command, node_id, speculate_mode=False):
trace_file = util.ptempfile()
## KK 2023-04-24: @giorgo Is there a reason you used tempfile.NamedTemporaryFile and not util.ptempfile()?
stdout_file = tempfile.NamedTemporaryFile(dir=config.PASH_SPEC_TMP_PREFIX)
stdout_file = util.ptempfile()
stderr_file = tempfile.NamedTemporaryFile(dir=config.PASH_SPEC_TMP_PREFIX)
stderr_file = util.ptempfile()
variable_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: Output variable file for: {node_id} is: {variable_file}')
process = async_run_and_trace_command(command, trace_file, node_id, stdout_file, stderr_file, variable_file, sandbox_mode)
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, variable_file, speculate_mode)
return process, trace_file, stdout_file, stderr_file, variable_file

def async_run_and_trace_command_return_trace_in_sandbox(command, node_id):
process, trace_file, stdout_file, stderr_file, variable_file = async_run_and_trace_command_return_trace(command, node_id, sandbox_mode=True)
def async_run_and_trace_command_return_trace_in_sandbox_speculate(command, node_id):
process, trace_file, stdout_file, stderr_file, variable_file = async_run_and_trace_command_return_trace(command, node_id, speculate_mode=True)
return process, trace_file, stdout_file, stderr_file, variable_file

def async_run_and_trace_command(command, trace_file, node_id, stdout_file, stderr_file, variable_file, sandbox_mode=False):
def async_run_and_trace_command_return_trace_in_sandbox(command, trace_file, node_id, stdout_file, stderr_file, variable_file, 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, variable_file]
if sandbox_mode:
# print(" -- Sandbox mode")
args.append("sandbox")
if speculate_mode:
args.append("speculate")
else:
# print(" -- Standard mode")
args.append("standard")
args.append(str(node_id))
# Save output to temporary files to not saturate the memory
logging.debug(args)
process = subprocess.Popen(args, stdout=None, stderr=None)

# For debugging
# process = subprocess.Popen(args)
return process
Expand All @@ -54,8 +53,7 @@ def read_trace(sandbox_dir, trace_file):
if sandbox_dir == "":
path = trace_file
else:
path = f"{sandbox_dir}upperdir/{trace_file}"

path = f"{sandbox_dir}/upperdir/{trace_file}"
logging.debug(f'Reading trace from: {path}')
with open(path) as f:
return f.readlines()
Loading