Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Visual Studio fix: High CPU usage when you run a Visual C++ 2010 application built together with the "/openmp" option in Visual Studio 2010


View products that this article applies to.

Symptoms

Assume that you have a Visual C++ 2010 application that is developed in Microsoft Visual Studio 2010. The application uses the Open Multiprocessing (OpenMP) API to improve performance on a computer that has multiple processors. You build the application, and you use the /openmp compiler option. When you run the application, the application process might experience high CPU usage.

Note This issue does not occur in Microsoft Visual Studio 2008 or in Microsoft Visual Studio 2005.

↑ Back to the top


Cause

This issue occurs because the implementation of the OpenMP runtime (Vcomp100.dll) has a spin-wait loop in which the OpenMP threads look for work for a short time before they are yielded.

↑ Back to the top


Resolution

After you install the hotfix, you must create the OMP_WAIT_POLICY environment variable, and then set the value of the variable to PASSIVE.

Notes
  • If you set the value for OMP_WAIT_POLICY to ACTIVE, the OpenMP threads will spin-wait for a short time before blocking when the threads finish executing a workload.
  • If you set the value for OMP_WAIT_POLICY to PASSIVE, the OpenMP threads will immediately be blocked when the threads finish executing a workload.
  • The default value for OMP_WAIT_POLICY is ACTIVE.

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have Visual Studio 2010 Service Pack 1 (SP1) installed.

Restart requirement

You must restart the computer after you install the hotfix if the affected files are being used during the installation.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File nameFile versionFile sizeDateTimePlatform
atl100.dll10.0.40219.43615928014-Dec-20125:46x64
atl100.dll10.0.40219.43638609614-Dec-20126:07ia64
atl100.dll10.0.40219.43613880014-Dec-20126:35x86
mfc100.dll10.0.40219.436557982414-Dec-20125:46x64
mfc100.dll10.0.40219.436440068814-Dec-20126:35x86
mfc100chs.dll10.0.40219.4363691214-Dec-20125:46x64
mfc100chs.dll10.0.40219.4363691214-Dec-20126:35x86
mfc100cht.dll10.0.40219.4363693614-Dec-20125:46x64
mfc100cht.dll10.0.40219.4363691214-Dec-20126:35x86
mfc100d.dll10.0.40219.436914436814-Dec-20128:00x64
mfc100d.dll10.0.40219.436706412814-Dec-20128:30x86
mfc100deu.dll10.0.40219.4366507214-Dec-20125:46x64
mfc100deu.dll10.0.40219.4366509614-Dec-20126:35x86
mfc100enu.dll10.0.40219.4365588014-Dec-20125:46x64
mfc100enu.dll10.0.40219.4365588014-Dec-20126:35x86
mfc100esn.dll10.0.40219.4366456014-Dec-20125:46x64
mfc100esn.dll10.0.40219.4366456014-Dec-20126:35x86
mfc100fra.dll10.0.40219.4366509614-Dec-20125:46x64
mfc100fra.dll10.0.40219.4366507214-Dec-20126:35x86
mfc100ita.dll10.0.40219.4366302414-Dec-20125:46x64
mfc100ita.dll10.0.40219.4366304814-Dec-20126:35x86
mfc100jpn.dll10.0.40219.4364459214-Dec-20125:46x64
mfc100jpn.dll10.0.40219.4364459214-Dec-20126:35x86
mfc100kor.dll10.0.40219.4364408014-Dec-20125:46x64
mfc100kor.dll10.0.40219.4364410414-Dec-20126:35x86
mfc100rus.dll10.0.40219.4366148814-Dec-20125:46x64
mfc100rus.dll10.0.40219.4366151214-Dec-20126:35x86
mfc100u.dll10.0.40219.436560595214-Dec-20125:46x64
mfc100u.dll10.0.40219.436442577614-Dec-20126:35x86
mfc100ud.dll10.0.40219.436922065614-Dec-20128:00x64
mfc100ud.dll10.0.40219.436713273614-Dec-20128:30x86
mfcm100.dll10.0.40219.4369374414-Dec-20125:46x64
mfcm100.dll10.0.40219.4368249614-Dec-20126:35x86
mfcm100d.dll10.0.40219.43612036814-Dec-20128:00x64
mfcm100d.dll10.0.40219.43610451214-Dec-20128:30x86
mfcm100u.dll10.0.40219.4369374414-Dec-20125:46x64
mfcm100u.dll10.0.40219.4368249614-Dec-20126:35x86
mfcm100ud.dll10.0.40219.43612190414-Dec-20128:00x64
mfcm100ud.dll10.0.40219.43610605614-Dec-20128:30x86
mfcmifc80u.dll10.0.40219.4361387215-Dec-201216:06x86
msvcp100.dll10.0.40219.43660881614-Dec-20125:46x64
msvcp100.dll10.0.40219.43696723214-Dec-20126:07ia64
msvcp100.dll10.0.40219.43642193614-Dec-20126:35x86
msvcp100d.dll10.0.40219.436197995214-Dec-20127:34ia64
msvcp100d.dll10.0.40219.436101534414-Dec-20128:06x64
msvcp100d.dll10.0.40219.43674449614-Dec-20128:36x86
msvcr100_clr0400.dll10.0.40219.43683001614-Dec-20125:46x64
msvcr100_clr0400.dll10.0.40219.436150022414-Dec-20126:07ia64
msvcr100_clr0400.dll10.0.40219.43677419214-Dec-20126:35x86
msvcr100d_clr0400.dll10.0.40219.436376478414-Dec-20127:34ia64
msvcr100d_clr0400.dll10.0.40219.436187396814-Dec-20128:06x64
msvcr100d_clr0400.dll10.0.40219.436150635214-Dec-20128:36x86
vcomp100.dll10.0.40219.4365894414-Dec-20125:46x64
vcomp100.dll10.0.40219.43614444814-Dec-20126:07ia64
vcomp100.dll10.0.40219.4365228814-Dec-20126:35x86
vcomp100d.dll10.0.40219.43631851214-Dec-20127:29ia64
vcomp100d.dll10.0.40219.43610861614-Dec-20127:54x64
vcomp100d.dll10.0.40219.4368964814-Dec-20128:24x86
vcomp100ui.dll10.0.40219.4361029615-Dec-201216:06x86
vcomp100ui.dll10.0.40219.4361031215-Dec-201216:06x86
vcomp100ui.dll10.0.40219.4361080815-Dec-201216:06x86
vcomp100ui.dll10.0.40219.4361082415-Dec-201216:06x86
vcomp100ui.dll10.0.40219.4361183215-Dec-201216:06x86
vcomp100ui.dll10.0.40219.4361234415-Dec-201216:06x86
vcomp100ui.dll10.0.40219.4361236015-Dec-201216:06ia64
vcredist_ia64.exe10.0.40219.436304330414-Dec-201210:00x86
vcredist_x64.exe10.0.40219.4361029628814-Dec-20129:57x86
vcredist_x86.exe10.0.40219.436899427214-Dec-201210:03x86

↑ Back to the top


More Information

For more information about the OpenMP API in Visual Studio 2010, go to the following MSDN website:For more information about OpenMP in Visual C++, go to the following MSDN website:

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbqfe, kbhotfixserver, kbfix, kbsurveynew, kbexpertiseadvanced, kbhotfixdev, kb

↑ Back to the top

Article Info
Article ID : 2686593
Revision : 1
Created on : 1/7/2017
Published on : 1/8/2013
Exists online : False
Views : 311