Skip to content
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

The install.sh script uses all CPU cores, even if that fails due to running out of RAM #77

Closed
jafingerhut opened this issue Feb 19, 2025 · 2 comments

Comments

@jafingerhut
Copy link
Contributor

This PR was merged earlier: #38

It still works to calculate a number of parallel jobs, as a function of the amount of RAM detected on the system, so that the available memory is not exceeded. However, while those changes have been tested to work when you use this command to install open-p4studio:

./p4studio/p4studio profile apply ./p4studio/profiles/testing.yaml

they appear NOT to be used when you install open-p4studio using this other command, which is one of the two ways to install open-p4studio currently recommended in the top-level README:

./install.sh

I believe this is because in the Python code for the p4studio program, the code for handling the --jobs N option is present when you do p4studio profile ... commands, but it is not used when running a command p4studio interactive, which is what the install.sh script runs: https://github.com/p4lang/open-p4studio/blob/main/install.sh#L23

As far as I know, it should not be too difficult to make the code that calculates a number of parallel jobs from the amount of RAM, be executed regardless of whether you do p4studio apply ... or p4studio interactive.

jafingerhut added a commit to jafingerhut/open-p4studio that referenced this issue Feb 19, 2025
…active'

Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
@jafingerhut
Copy link
Contributor Author

Fixed by merging this PR: #78

@fruffy
Copy link
Contributor

fruffy commented Feb 20, 2025

Fixed by merging this PR: #78

You can link an issue to a PR, then the issue is closed automatically when the PR is merged:
https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue

And Github associates the issue with the PR, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants