Getting the Visual Studio 2010 CTP to use more than one hardware thread: using Hyper-V and other options

Last week, we blogged about the Visual Studio 2010 CTP which includes the Concurrency Runtime, the Parallel Pattern Library and the Asynchronous Agents Library which is available as a Virtual PC image.  As the Parallel Extensions to .NET team blogged yesterday, this is unfortunate because VPC images only have a single core and this isn't great for building parallel applications.

There's a couple of options to try out the CTP and the projects built with it on something other than a single-threaded VPC image.  Note that none of these are officially tested or supported so things may not work as expected.

One option which is straightforward for most C++ projects is to statically link in the Runtime Libraries in your applications and move them to another computer with more than a single CPU to test them. 

To do this open the solution explorer pane and right click on your C++ project and select properties. Under the C/C++ ->Code Generation property page under Runtime Library select "Multi-threaded (/MT)" for release builds and "Multi-threaded Debug (/MTd)" for debug builds.  Also note that if you're using MFC in your application on the General Property Page you'll need to change the "Use of MFC" setting to something other than "Use MFC in a Shared DLL."

Another option is to convert the Virtual PC image to a Hyper-V image which will allow you to see up to 4 hardware threads if they are available on your system. Grant Holliday has a guide on his blog for doing this.

An advantage to statically linking your application is you can run it at full speed outside of the VPC and install is straightforward; conversely an advantage to converting your VPC image to a Hyper-V image is that you can try the Parallel Debugger windows in the Visual Studio debugger.

As I said neither of these options is supported, but I do hope that they can help you make it easier to explore the Concurrency Runtime, Parallel Pattern Library and Asynchronous Agents Library.



Comments (5)
  1. My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. SlickEdit Versioning Toolbox is a Visual Studio extension that gives version control like functionality on your local workstation.

  2. Dan says:

    I following the walkthrough to  parallelize the call to isprime using parallel_for, after build it successful. I copy it out to my XP OS with VS2008 to see the effect. It cannot run and showed "This application has failed to start because MSVCR100D.dll was not found. Re-installing the application may fix this problem."  

    How can I solve it and see the result?

    Thanks in advance!

  3. Rick says:


    please make sure that have static linking enabled on your build.  To do this right click on your project and select properties.  Then under C/C++ select Code Generation and in the ‘Runtime Library’ library and change the option from ‘Multi-Threaded Debug DLL’ to ‘Multi-threaded Debug.’  You will also want to do this for the release configuration (but set it to ‘Multi-threaded’)

  4. Dan says:

    Thank Rick for the great feedback. It works now. I’m sorry I don’t get the point in your article before.

    I see so many new tools of Debug and Profile for Parallel. But as you know, I only have XP OS, it seems cannot use Hyper-V, so I cannot see those excellent features except in videos. So if there’re other ways to help me. Thanks!

Comments are closed.

Skip to main content