Re: Autodetect processing units with -j

2025-06-27 Thread Collin Funk
Paul Smith writes: > But I agree with, and others have requested that, parallelism being > limited in some way by available _memory_ and not just available CPU: > this seems very reasonable. The fly in the ointment is that, even > moreso than CPU, memory is not allocated up-front and by the time

Re: Autodetect processing units with -j

2025-06-27 Thread Paul Smith
On Fri, 2025-06-27 at 10:18 -0700, Collin Funk wrote: > If one wants to add a default value because they know it will always > work with their system they can easily add this to their ~/.profile: > >     export GNUMAKEFLAGS="$((2 * `nproc`))" > > Assuming this is the value they want (and 'nproc'

Re: Autodetect processing units with -j

2025-06-27 Thread Collin Funk
Paul Smith writes: > On Fri, 2025-06-27 at 14:31 +0200, wrotycz wrote: >> > Of course none of this is very relevant to the issue under >> > discussion. >> >> I'm lost now. > > What I'm trying to say is that the exact number of jobs used as a > default is not really that important. I have no pro

Re: Re: Autodetect processing units with -j

2025-06-27 Thread Paul Smith
On Fri, 2025-06-27 at 18:41 +0200, wrotycz wrote: > > The other is that it's difficult to set a generic value for "-j" > > (say in a MAKEFLAGS environment variable, or even in the makefile > > itself) that works across a variety of systems with different CPU > > counts. > > What is MAKEFLAGS? As f

Re: Re: Autodetect processing units with -j

2025-06-27 Thread wrotycz
The other is that it's difficult to set a generic value for "-j" (say in a MAKEFLAGS environment variable, or even in the makefile itself) that works across a variety of systems with different CPU counts. What is MAKEFLAGS? As far as I understand it is command line in form of environmental

Re: Re: Autodetect -j (what is MAKEFLAGS?)

2025-06-27 Thread wrotycz
> The other is that it's difficult to set a generic value for "-j" (say > in a MAKEFLAGS environment variable, or even in the makefile itself) > that works across a variety of systems with different CPU counts. What is MAKEFLAGS? As far as I understand it is command line in form of environm

Re: Could --debug get an option to trace variable assignments and expansions?

2025-06-27 Thread Britton Kerin
On Fri, Jun 27, 2025 at 4:23 AM Paul Smith wrote: > > On Fri, 2025-06-27 at 04:09 -0800, Britton Kerin wrote: > > The many answers here show the appetite for finding out about > > variables: > > https://stackoverflow.com/questions/16467718/how-to-print-out-a- > > variable-in-makefile > > > > A

Re: Re: Autodetect processing units with -j

2025-06-27 Thread Paul Smith
On Fri, 2025-06-27 at 14:31 +0200, wrotycz wrote: > > Of course none of this is very relevant to the issue under > > discussion. > > I'm lost now. What I'm trying to say is that the exact number of jobs used as a default is not really that important. I have no problem saying that the default num

Re: Re: Autodetect processing units with -j

2025-06-27 Thread wrotycz
I don't see any need to be aggressive in your response. You're right, it came out clumsily.  I can  get -j almost 2x the number of CPU threads before builds start slowing down,  Maybe that 2*nproc is not that bad estimate, if it comes out I experiments.  (b) there's a lot of latency of

Re: Could --debug get an option to trace variable assignments and expansions?

2025-06-27 Thread Paul Smith
On Fri, 2025-06-27 at 04:09 -0800, Britton Kerin wrote: > The many answers here show the appetite for finding out about > variables: >     https://stackoverflow.com/questions/16467718/how-to-print-out-a- > variable-in-makefile > > A variety of different approaches are represented there, but none o

Could --debug get an option to trace variable assignments and expansions?

2025-06-27 Thread Britton Kerin
As far as I know there's no generally satisfying way to ask Make to "tell me everything about this variable" (I'd be fine with filtering trace output for all variables). For example I mostly like this trick rule: echo-%: ; @echo '$($*)' but it could be misleading if variables have been used