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

Prevent excessive parallel jobs during compilation #4004

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

njzjz
Copy link
Contributor

@njzjz njzjz commented Nov 15, 2023

Checklist before submitting

  • Did you read the contributor guide?
  • Did you update the docs?
  • Did you write any tests to validate this change?
  • Did you update the CHANGELOG, if this change affects users?

Description

The number of job slots should be fewer than the number of available logical CPUs in the system.

Review process to land

  1. All tests and other checks must succeed.
  2. At least one member of the technical steering committee must review and approve.
  3. If any member of the technical steering committee requests changes, they must be addressed.

The number of job slots should be fewer than the number of available logical CPUs in the system.

Signed-off-by: Jinzhe Zeng <[email protected]>
Copy link

github-actions bot commented Nov 16, 2023

Unit Test Results

0 files   -    977  0 suites   - 977   0s ⏱️ - 12h 33m 42s
0 tests  -    887  0 ✅  -    771  0 💤  -   116  0 ❌ ±0 
0 runs   - 21 895  0 ✅  - 15 531  0 💤  - 6 364  0 ❌ ±0 

Results for commit 9421a0a. ± Comparison against base commit 7e4d993.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 16, 2023

Unit Test Results (with flaky tests)

0 files   -  1 117  0 suites   - 1 117   0s ⏱️ - 13h 19m 59s
0 tests  -    887  0 ✅  -    771  0 💤  -   116  0 ❌ ±0 
0 runs   - 25 255  0 ✅  - 17 399  0 💤  - 7 856  0 ❌ ±0 

Results for commit 9421a0a. ± Comparison against base commit 7e4d993.

♻️ This comment has been updated with latest results.

setup.py Outdated
@@ -115,7 +115,7 @@ def build_extensions(self):
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(config.upper(), build_dir),
'-DPYTHON_EXECUTABLE:FILEPATH=' + sys.executable]

make_args = ['-j8'] if not os.environ.get('MAKEFLAGS') else []
make_args = ['-j' + str(min(8, len(os.sched_getaffinity(0))))] if not os.environ.get('MAKEFLAGS') else []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like sched_getaffinity is only available on some UNIX platforms. What is the return value of it when not available?

Copy link
Contributor Author

@njzjz njzjz Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. The method doesn't exist on other platforms, per python/cpython#81781. I'll fix that.

@njzjz njzjz marked this pull request as draft January 5, 2024 16:54
Signed-off-by: Jinzhe Zeng <[email protected]>
@njzjz njzjz marked this pull request as ready for review January 5, 2024 19:11
Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants