-
Notifications
You must be signed in to change notification settings - Fork 1
Py parallel #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Py parallel #5
Conversation
iandardik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is much cleaner! I was not able to get the code working on my my machine though. For example, I saw the following error:
Benchmark 3: ex-quorum-leader-election-6
Creating an empty no_invs.cfg file in the destination directory.
Parallel command found an errorLog file .log does not exist in .
Run time: 0.54s
I suspect this is due to the hardcoded path that you have that refers to the file structure on your own machine (see my comment below).
recomp-verify.py
Outdated
| script_content = f"""#!/usr/bin/env bash | ||
| echo "Running {script_name}" | ||
| echo "Spec file is: {spec}" | ||
| echo "CFG file is: {cfg}" | ||
| echo "Original directory is: {orig_dir}" | ||
| # Navigate to the target directory | ||
| cd "./{subdir}" || {{ | ||
| echo "Failed to cd into the target directory." >&2 | ||
| exit 1 | ||
| }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please hide the creation of the script behind a function. for example:
create_script(script_name, spec, cfg, ...):
return f"""#!/usr/bin/env bash
...
recomp-verify.py
Outdated
| }} | ||
| # Run the verification script with the {flag} option | ||
| python3 "/Users/eddie/Research/REU/recomp-verify/recomp-verify.py" \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix this hard-coded path
| verify_multi_process(spec, cfg, verbose) | ||
| else: | ||
| verify_single_process(spec, cfg, cust, naive, verbose) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this whitespace back in for readability :)
recomp-verify.py
Outdated
| # print(f"Decomp command exited with return code: {ret.returncode}") | ||
| # print(f"Decomp output: {ret.stdout}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clean up this commented-out code
iandardik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During my testing, I found two things:
- The output still does not match the original output. Please get rid of all the debugging prints when you check in your code next time (or hide them behind a --verbose flag as we talked about).
- There are cases where your new script is significantly slower than the original script. For example, ex-quorum-leader-election-6 should take 5 seconds (see Fig 6 in the paper) but your version is taking 25-35 seconds. I looked into this a bit and I think the reason why is that your tool does not use TLC for the monolithic strategy in parallel mode. I left a comment around where you should make the fix.
| }} | ||
| # Run the verification script with the {flag} option | ||
| python3 "{os.path.join(root_dir, 'recomp-verify.py')}" \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the script type is "mono" this should be a call to TLC, not the python script
Resolved comments from previous PR (such as putting debugging code under verbose flag and getting rid of debgugging comments).
followed everything from previous PR comments except for the stdout, stderr = process.communicate() line (I need this to receive the winning strategy). Also general note about this python version. It seems to be slower for programs that check smaller amounts of states but faster in ones like two_phase_commit_7 (on my machine because the original is TO). Hope you also see this pattern!