Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:Are you saying that this job consists of single a C (or C++) source file, so it is not possible to parallelise the processes necessary to compile it? (I've not idea of gcc's capabilities there.)On 28/03/2025 22:33, Keith Thompson wrote:I haven't done any measurements, but I don't know what's unclear.bart <bc@freeuk.com> writes:>On 28/03/2025 20:41, Scott Lurndal wrote:[...]"-j96" is an option to GNU make, not to the compiler. It mightThe gnu compiler is not multithreaded. The single thread was>
compute bound for 13 minutes and 46 seconds.
So what was that -j96 about?
invoke
gcc multiple times in parallel, but each invocation of gcc will still be
single-threaded.
So, is there just once instance of gcc at work during those 13
minutes, or multiple?
>
In other words, would it take longer than 13:40 mins without it, or
does it help? If -j96 makes no difference, then why specify it?
If a single thread was compute bound for 13:46, using "-j96"
won't make that single thread run any faster, but it can enable
"make" to do other things while that single thread is running.
It's also common to use "-j" without an argument, to run as many
jobs simultaneously as possible, or "-j$(nproc)" to run as many
parallel jobs as the number of processing units available (if you
have the "nproc" command; it's part of GNU coreutils).
I can imagine "-j" causing problems if dependencies are expressed
incorrectly, but I haven't run into such a problem myself.
Les messages affichés proviennent d'usenet.