A multi thread compiler.

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7736
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

A multi thread compiler.

Post by Isaac »

I'm buying an AMD 64 4000 dual core chip. It will be overclocked to 2.6ghz. I need this for my 3d renderings but i would like take advantage of my dual core setup when i complie cpp code. Know any cpp compilers that can use an mpc
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

What OS are you going to be running?
User avatar
Iceman
DBB Habitual Type Killer
DBB Habitual Type Killer
Posts: 4929
Joined: Thu Apr 20, 2000 2:01 am
Location: Huntsville, AL. USA
Contact:

Post by Iceman »

Visual C++ version 6 can be hacked to do so. There is a hack for VCSpawn.exe that will enable it to do multi-threaded compilation. I don't remember where I got it from so either google it or PM me for it.
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

Iceman wrote:Visual C++ version 6 can be hacked to do so. There is a hack for VCSpawn.exe that will enable it to do multi-threaded compilation. I don't remember where I got it from so either google it or PM me for it.
Multi-threading as in compling one object on multiple processors, or just compiling multiple objects on mutliple procs?
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Multithreading != Multiple Processors (almost but not quite). VC++'s COM threading model might prevent it from running on multiple processors (I'm pretty sure that's the MFC default, and VC++ <= 6 is an MFC app) regardless of whether it can run multithreaded.

Besides, wouldn't compiling the same object file in multiple threads be infeasible (constantly having to put symbol trees, etc. in spinlocks)? I can see multiple objects on multiple processors causing deadlock as well, but there would be ways around that. The conflicts would be far less frequent than compiling the same object file over multiple processors.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7736
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Post by Isaac »

DCrazy wrote:What OS are you going to be running?
win xp pro 64
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

My thinking also is that compilers would be one of the few things that would not benefit from multiple processors or multiple threads for an individual program, hence the odd way I phrased the question.

Because, the obvious benefit with SMP wrt to compiling is the ability to execute more than one compile instance and have the load shared between the processors.

And does Xp64 have a good set of drivers yet? I'd stick with Xp Pro personally for now.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7736
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Post by Isaac »

Iceman wrote:Visual C++ version 6 can be hacked to do so. There is a hack for VCSpawn.exe that will enable it to do multi-threaded compilation. I don't remember where I got it from so either google it or PM me for it.
I'd like to avoid Visual Cpp if i could, but i KNOW a hack isnt the answer to this problem. You know there are plenty of people who compile huge tasks everyday on opterons or cpu racks.... unless hacking your compiler is the norm in the computer programing world.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7736
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Post by Isaac »

DCrazy wrote:Multithreading != Multiple Processors (almost but not quite). VC++'s COM threading model might prevent it from running on multiple processors (I'm pretty sure that's the MFC default, and VC++ <= 6 is an MFC app) regardless of whether it can run multithreaded.

Besides, wouldn't compiling the same object file in multiple threads be infeasible (constantly having to put symbol trees, etc. in spinlocks)? I can see multiple objects on multiple processors causing deadlock as well, but there would be ways around that. The conflicts would be far less frequent than compiling the same object file over multiple processors.
oohhh aahhh
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

you'd need a compile spawner(gnu make, nmake and the ilk) thats smart enough to spawn multiple instances of the compiler in order to take advantage of it.

VC pretty much does not do that by default. But you asked for multi-threaded compilers, which isn't the same thing.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Well, Isaac, that's pretty much what I was saying. Same object file across multiple threads/processors gives no benefit. I just think that because of the dependencies that object files have on each others' compilation, you won't see much of a performance gain by compiling separately in a complex application.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7736
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Post by Isaac »

DCrazy wrote:Well, Isaac, that's pretty much what I was saying. Same object file across multiple threads/processors gives no benefit. I just think that because of the dependencies that object files have on each others' compilation, you won't see much of a performance gain by compiling separately in a complex application.
It sounds like i should just compile the reguar way, right? It would be too hard to do this on windowsxp pro.
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Ain't gonna break anything if code takes a long time to compile. At least the pain isn't ongoing when it's done - and, not to mention, the project needs to be pretty big to make it noticeably slow anyway (and even then only on the first compile unless the dependency relationships resemble spaghetti).
User avatar
SirWinner
DBB Fleet Admiral
DBB Fleet Admiral
Posts: 2700
Joined: Thu Nov 05, 1998 12:01 pm
Location: Oklahoma City, Oklahoma, United States of America
Contact:

Post by SirWinner »

Dual Processors are nice... But unless your Operating System and the programs that you are using are using BOTH processors... It isn't going to do you much good.

We had a network server many years ago that used Dual Processors and a Novell Netware Version that was optimized for Multiple Processors... It was a very very nice server environment.

:oops:
Post Reply