News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Compile multiple files at a time in parallel

Started by korDen, October 22, 2008, 01:25:35 PM

Previous topic - Next topic

korDen

Does C::B support running multiple compilation processes in parallel, similar to Gentoo MAKEOPTS flag? With my current settings, C::B compiles on file at a time and this is suboptimal nowadays. Compiling multiple files in parallel would decrease compilation time up to 2 times for dual core and up to 4 time for quad core processors. I think it is a nice feature to have. Thank you

MortenMacFly

Quote from: korDen on October 22, 2008, 01:25:35 PM
Does C::B support running multiple compilation processes in parallel,
Yes: Settings -> Compiler and Debugger -> [select your compiler] -> Tab "Other settings" -> Choose "number of processes..."

The question is whether the compiler framework supports it. I once tried with VC6 and it produced very strange errors utiul I realised it was a problem with the multiple processes.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

thomas

I use MinGW/gcc with 5 compile processes on a quadcore, which works just fine and is the sweet spot for my system. This leaves about 10-12% of idle CPU time, because writing out object files starts making the build process I/O bound.

What does not work, funnily, is compiling makefiles with -j 5, although make has been supporting this for much, much longer and should be much, much more mature than Code::Blocks. However, make regularly messes up with several processes, whenever it has to prepare a file that's used later.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

MortenMacFly

Quote from: thomas on October 22, 2008, 02:59:16 PM
I use MinGW/gcc with 5 compile processes on a quadcore
Braggart! :lol:
...you know how to make other devs jealous, right?! :cry:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

thomas

How jealous will Yiannis be if I tell him my TV runs on Linux...
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mandrav

Be patient!
This bug will be fixed soon...