GLBasic forum

Main forum => GLBasic - en => Topic started by: mentalthink on 2012-Aug-29

Title: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: mentalthink on 2012-Aug-29
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
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: mentalthink on 2012-Aug-29
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.
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: MrTAToad on 2012-Aug-29
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 :)
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: mentalthink on 2012-Aug-29
Thanks MR-t, will be nice this you comment.
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: MrTAToad on 2012-Aug-29
No problem!
Title: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: Kitty Hello on 2012-Sep-01
Does the gcc support multi-core compiling?
I might start a new trhread for each input file...
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: MrTAToad on 2012-Sep-01
It looks like it doesn't - multi-core processing would be handled by the "make" system :(
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: fuzzy70 on 2012-Sep-01
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
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: MrTAToad on 2012-Sep-02
Heh  :P
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: mentalthink on 2012-Sep-02
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...
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: bigsofty on 2012-Sep-02
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.
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: MrTAToad on 2012-Sep-03
The problem is that projects would need to call  the appropriate make for the platform which means GPC would need changing...
Title: Re: Gcc-Compiler and using all the Cores of the CPU?¿
Post by: bigsofty on 2012-Sep-03
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.