为什么Visual Studio无法在多个内核上运行? CPU 25% [英] Why can't Visual Studio run on more than one core? CPU at 25%

查看:141
本文介绍了为什么Visual Studio无法在多个内核上运行? CPU 25%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行带有噩梦般的MS测试框架的Visual Studio 2008.麻烦的是它正在将我的CPU发送到100%(四核上是25%).

I'm running Visual Studio 2008 with the stuff-of-nightmares awful MS test framework. Trouble is that it's sending my CPU to 100% (well 25% on a quad-core).

我的问题是为什么Visual Studio无法在多个内核上运行? M $当然必须在线程上有足够的处理能力才能使它起作用.

My question is why can't Visual Studio run on more than one core? Surely M$ must have a sufficient handle on threading to get this to work.

推荐答案

我在所有4个CPU上都运行了VS2008.只需设置此环境变量/项目标志即可.

I have VS2008 running on all 4 CPUs. Just set this environment variable / project flag.

/MP

(可以在"C/C ++设置"的高级"中设置.在项目设置中)

(It can be set in C/C++ Settings, Advanced. In project settings)

MP标志还可以接受数字,例如/MP2,这意味着它将仅在2个内核上运行.将其保留为/MP意味着它将在最大数量的内核上运行.

The MP flag can also accept a number, e.g. /MP2 which means it will only run on 2 cores. Leaving it as just /MP means it will run on the maximum amount of cores.

Edit2:MP标志可能仅适用于编译器.

The MP flag is probably for the compiler only.

这篇关于为什么Visual Studio无法在多个内核上运行? CPU 25%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆