-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
build: Improve consistency of parallelism flags among make->python dependencies #20065
Comments
@rvagg commented:
|
I noticed three different methods for calling (1) Called with the (2) Called with (3) Called without The if options.J:
# inherit JOBS from environment if provided. some virtualised systems
# tends to exaggerate the number of available cpus/cores.
cores = os.environ.get('JOBS')
options.j = int(cores) if cores is not None else multiprocessing.cpu_count()
These appear to be more or less the same except that So I have two key questions: |
Yeah, I think it could be normalised. Maybe we go with |
make
can run multiple jobs in parallel by using theMAKEFLAGS
env var or the-j
flag (e.g.make -j4
).test.py
runs in parallel through use of theJOBS
env var or the-J
or-j
flags.When
test.py
is called frommake
it uses a few different mechanisms to pass the parallelism factor which makes the build hard to reason about.We should make the usage within
Makefile
more consistent so that it is easier to ensure that the build is working as fast as possible.See also: #19919 (comment)
The text was updated successfully, but these errors were encountered: