# visual studio 2005 multithreaded build?

## Recommended Posts

I have a dual proc machine, and I have to switch over to the vs2005 vcproj build system for a project I'm on. Is it possible to get the build to use both procs? Right now I only see one cl.exe process in the task manager, and cpu utilization is only at 50%

##### Share on other sites
There is no automatic threading, ever. You must specifically write threaded code that spawns more threads past the first one.

The "multithreaded" library versions of visual studio are "thread-safe" versions of the library, versions where there are no global variables that are not protected against multiple threads screwing them up at the same time ...

so you must you a "multithread-safe" version of the library if you want your multithreaded code to work correctly. But still you write the code to do it yourself. Such code works exactly the same no matter what library you use, it just might have unintended (BAD) side-effects if used with in a non-threadsafe library.

##### Share on other sites
Xai, he's talking about the compiler itself, not the produced code. To my knowledge, the included compiler does not take advantage (or at least full advantage) of multiple processors. I know there are commerical compilers that can do multi processor or multicomputer builds.

##### Share on other sites
In VS2005: Tools -> Options -> Projects and Solutions -> Build and Run and set "maximum number of parallel projects builds" to a higher number.

It will only compile projects in parallel when they have no dependencies. Be aware that the console output will mess log info lines from the different projects at the same time, that's why on the very left of each line there's an identification number.

Y.

##### Share on other sites
Quote:
 Original post by YsaneyaIn VS2005: Tools -> Options -> Projects and Solutions -> Build and Run and set "maximum number of parallel projects builds" to a higher number.It will only compile projects in parallel when they have no dependencies. Be aware that the console output will mess log info lines from the different projects at the same time, that's why on the very left of each line there's an identification number.Y.

Does that actually work? I've experimented with it, and didn't seem to have any effect. (Also, the VS team is claiming that Orcas will enable parallel builds, so what does this option in 2005 actually do?)

##### Share on other sites
Quote:
 Original post by YsaneyaIn VS2005: Tools -> Options -> Projects and Solutions -> Build and Run and set "maximum number of parallel projects builds" to a higher number.It will only compile projects in parallel when they have no dependencies. Be aware that the console output will mess log info lines from the different projects at the same time, that's why on the very left of each line there's an identification number.Y.

Does this compile multiple projects at the same time? I think what the OP wants is to compile several files from the same project at the same time. I use Linux at the moment, and I always build projects with 'make -j3'. This causes three files to compile at the same time, which halves the compilation time if you have a dualcore CPU. Surely VS2005 have something similar?

##### Share on other sites

Thanks for the replies,

Unfortunately increasing the maximum number of parallel project builds doesn't help me too much since most of the build time is spent on the largest library, that all the other projects depend on.

Quote:
 I use Linux at the moment, and I always build projects with 'make -j3'.

The last project I worked on had something like this. I was hoping there was an equivalent in vs2005.

You need a plugin for 2005 for parallel builds. Incredibuild is the only one I know of (but it costs $$); the extra advantage there is that it'll distribute your build across many networked clients. Basically, you have your whole dev-team install it and you'll use everyone's idle CPU time to build your stuff. It rocks -me #### Share this post ##### Link to post ##### Share on other sites Quote:  Original post by PalidineYou need a plugin for 2005 for parallel builds. Incredibuild is the only one I know of (but it costs$$); the extra advantage there is that it'll distribute your build across many networked clients. Basically, you have your whole dev-team install it and you'll use everyone's idle CPU time to build your stuff. It rocks-me

Seconded!

Incredibuild allows me to build the current project I am working on in about 5-10 minutes, using about 40 other CPU's to help with compiling. Instead of about 20-30 minutes with just my machine.

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627658
• Total Posts
2978474

• 10
• 12
• 22
• 13
• 33