Gcc-Compiler and using all the Cores of the CPU?¿

Previous topic - Next topic

mentalthink

Hi my code, it´s beggin to take a bit of time to compile... my question it´s from the box of Compiling options... I can tell to the Gcc-Compiler to use all my Cores of my CPU--- I read something and tells something like put -pipe... in fact I don´t hvae any error when I put it... but now I don´t have a multiCore machine for working now  :rant: :rant:, and it´s possible to set the numbers of cores to use 2,3 or 4... or 12 who have an Opteron =D

mentalthink

Hi Ocean sorry too much time ... my English :rant: :rant:

I want say , when you press the button for compile whit GLbasic, I can use all the cores of the CPU, for not wait too much time... I don´t sure if this can do...

It´s simple, if I have a 4 Cores CPU, I can pass some paremeter to the Compiler and the gain time for generarte a .exe

PS: Not it´s nothing of use more CPU´s whit a program I write... I know in the forum have a couple of trhead Speaking about this.

MrTAToad

This site lists the GCC compiler options : http://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html

However, the most likely routine for improved compiler performance would be for Gernot to updated to the latest version :)

mentalthink

Thanks MR-t, will be nice this you comment.


Kitty Hello

Does the gcc support multi-core compiling?
I might start a new trhread for each input file...

MrTAToad

It looks like it doesn't - multi-core processing would be handled by the "make" system :(

fuzzy70

Quote from: MrTAToad on 2012-Sep-01
It looks like it doesn't - multi-core processing would be handled by the "make" system :(

Yep, -j switch on make, not seen any GCC option for that I am aware of.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)


mentalthink

HI a take a look to Mr-T info, and I don´t show nothing... but I read something whit -j... sorry but I don´t arrives to all this things... Perhaps it´s too much complex do it or make instances running can be worst in some cases... how told ocean this will be nice have a option to choose...

bigsofty

Any native multi core support would be very appreciated, the CPU is actually the bottleneck in my game, GFX take up only about 10% of the game loop.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

MrTAToad

The problem is that projects would need to call  the appropriate make for the platform which means GPC would need changing...

bigsofty

Ah, I see, I did not understand  the question, I assumed  that there was some sort of gcc parallelisation flag for running different source files concurrently, oh well.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)