Skip to content

Commit be9a1af

Browse files
authored
Merge pull request #3479 from MicrosoftDocs/master
4/2/2021 AM Publish
2 parents 82a0d23 + 760dc1a commit be9a1af

File tree

4 files changed

+55
-20
lines changed

4 files changed

+55
-20
lines changed

docs/build/reference/openmp-enable-openmp-2-0-support.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,57 @@
11
---
22
description: "Learn more about: /openmp (Enable OpenMP Support)"
33
title: "/openmp (Enable OpenMP Support)"
4-
ms.date: "04/15/2019"
5-
f1_keywords: ["/openmp", "VC.Project.VCCLCompilerTool.OpenMP"]
6-
helpviewer_keywords: ["/openmp compiler option [C++]", "-openmp compiler option [C++]"]
7-
ms.assetid: 9082b175-18d3-4378-86a7-c0eb95664e13
4+
ms.date: 04/01/2021
5+
f1_keywords: ["/openmp", "/openmp:experimental", "/openmp:llvm", "VC.Project.VCCLCompilerTool.OpenMP"]
6+
helpviewer_keywords: ["/openmp compiler option [C++]", "/openmp:experimental compiler option [C++]", "/openmp:llvm compiler option [C++]", "-openmp compiler option [C++]"]
87
---
9-
# /openmp (Enable OpenMP Support)
8+
# `/openmp` (Enable OpenMP Support)
109

1110
Causes the compiler to process [`#pragma omp`](../../preprocessor/omp.md) directives in support of OpenMP.
1211

1312
## Syntax
1413

1514
::: moniker range=">= msvc-160"
1615

17-
> **/openmp**\[**:**__experimental__]
16+
> **`/openmp`**\
17+
> **`/openmp:experimental`**\
18+
> **`/openmp:llvm`**
1819
1920
::: moniker-end
2021

2122
::: moniker range="<= msvc-150"
2223

23-
> **/openmp**
24+
> **`/openmp`**
2425
2526
::: moniker-end
2627

2728
## Remarks
2829

29-
`#pragma omp` is used to specify [Directives](../../parallel/openmp/reference/openmp-directives.md) and [Clauses](../../parallel/openmp/reference/openmp-clauses.md). If **/openmp** isn't specified in a compilation, the compiler ignores OpenMP clauses and directives. [OpenMP Function](../../parallel/openmp/reference/openmp-functions.md) calls are processed by the compiler even if **/openmp** isn't specified.
30+
`#pragma omp` is used to specify [Directives](../../parallel/openmp/reference/openmp-directives.md) and [Clauses](../../parallel/openmp/reference/openmp-clauses.md). If **`/openmp`** isn't specified in a compilation, the compiler ignores OpenMP clauses and directives. [OpenMP Function](../../parallel/openmp/reference/openmp-functions.md) calls are processed by the compiler even if **`/openmp`** isn't specified.
3031

3132
::: moniker range=">= msvc-160"
3233

33-
The C++ compiler currently supports the OpenMP 2.0 standard. However, Visual Studio 2019 also now offers SIMD functionality. To use SIMD, compile by using the **/openmp:experimental** option. This option enables both the usual OpenMP features, and additional OpenMP SIMD features not available when using the **/openmp** switch.
34+
The C++ compiler currently supports the OpenMP 2.0 standard. However, Visual Studio 2019 also now offers SIMD functionality. To use SIMD, compile by using the **`/openmp:experimental`** option. This option enables both the usual OpenMP features, and OpenMP SIMD features not available when using the **`/openmp`** switch.
35+
36+
Starting in Visual Studio 2019 version 16.9, you can use the experimental **`/openmp:llvm`** option instead of **`/openmp`** to target the LLVM OpenMP runtime. Support currently isn't available for production code, since the required libomp DLLs aren't redistributable. The option supports the same OpenMP 2.0 directives as **`/openmp`**. And, it supports all the SIMD directives supported by the **`/openmp:experimental`** option. It also supports unsigned integer indices in parallel for loops according to the OpenMP 3.0 standard. For more information, see [Improved OpenMP Support for C++ in Visual Studio](https://devblogs.microsoft.com/cppblog/improved-openmp-support-for-cpp-in-visual-studio/).
37+
38+
Currently, the **`/openmp:llvm`** option only works on the x64 architecture. The option isn't compatible with **`/clr`** or **`/ZW`**.
3439

3540
::: moniker-end
3641

37-
Applications compiled by using both **/openmp** and **/clr** can only be run in a single application domain process. Multiple application domains aren't supported. That is, when the module constructor (`.cctor`) is run, it detects if the process is compiled using **/openmp**, and if the app is loaded into a non-default runtime. For more information, see [appdomain](../../cpp/appdomain.md), [/clr (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md), and [Initialization of Mixed Assemblies](../../dotnet/initialization-of-mixed-assemblies.md).
42+
Applications compiled by using both **`/openmp`** and **`/clr`** can only be run in a single application domain process. Multiple application domains aren't supported. That is, when the module constructor (`.cctor`) is run, it detects if the process is compiled using **`/openmp`**, and if the app is loaded into a non-default runtime. For more information, see [`appdomain`](../../cpp/appdomain.md), [`/clr` (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md), and [Initialization of Mixed Assemblies](../../dotnet/initialization-of-mixed-assemblies.md).
3843

39-
If you attempt to load an app compiled using both **/openmp** and **/clr** into a non-default application domain, a <xref:System.TypeInitializationException> exception is thrown outside the debugger, and a `OpenMPWithMultipleAppdomainsException` exception is thrown in the debugger.
44+
If you attempt to load an app compiled using both **`/openmp`** and **`/clr*`* into a non-default application domain, a <xref:System.TypeInitializationException> exception is thrown outside the debugger, and a `OpenMPWithMultipleAppdomainsException` exception is thrown in the debugger.
4045

4146
These exceptions can also be raised in the following situations:
4247

43-
- If your application is compiled using **/clr** but not **/openmp**, and is loaded into a non-default application domain, where the process includes an app compiled using **/openmp**.
48+
- If your application is compiled using **`/clr`** but not **`/openmp`**, and is loaded into a non-default application domain, where the process includes an app compiled using **`/openmp`**.
4449

45-
- If you pass your **/clr** app to a utility, such as [regasm.exe](/dotnet/framework/tools/regasm-exe-assembly-registration-tool), which loads its target assemblies into a non-default application domain.
50+
- If you pass your **`/clr`** app to a utility, such as [regasm.exe](/dotnet/framework/tools/regasm-exe-assembly-registration-tool), which loads its target assemblies into a non-default application domain.
4651

4752
The common language runtime's code access security doesn't work in OpenMP regions. If you apply a CLR code access security attribute outside a parallel region, it won't be in effect in the parallel region.
4853

49-
Microsoft doesn't recommend that you write **/openmp** apps that allow partially trusted callers. Don't use <xref:System.Security.AllowPartiallyTrustedCallersAttribute>, or any CLR code access security attributes.
54+
Microsoft doesn't recommend that you write **`/openmp`** apps that allow partially trusted callers. Don't use <xref:System.Security.AllowPartiallyTrustedCallersAttribute>, or any CLR code access security attributes.
5055

5156
### To set this compiler option in the Visual Studio development environment
5257

@@ -64,9 +69,9 @@ Microsoft doesn't recommend that you write **/openmp** apps that allow partially
6469

6570
The following sample shows some of the effects of thread pool startup versus using the thread pool after it has started. Assuming an x64, single core, dual processor, the thread pool takes about 16 ms to start up. After that, there's little extra cost for the thread pool.
6671

67-
When you compile using **/openmp**, the second call to test2 never runs any longer than if you compile using **/openmp-**, as there's no thread pool startup. At a million iterations, the **/openmp** version is faster than the **/openmp-** version for the second call to test2. At 25 iterations, both **/openmp-** and **/openmp** versions register less than the clock granularity.
72+
When you compile using **`/openmp`**, the second call to test2 never runs any longer than if you compile using **`/openmp-`**, as there's no thread pool startup. At a million iterations, the **`/openmp`** version is faster than the **`/openmp-`** version for the second call to test2. At 25 iterations, both **`/openmp-`** and **`/openmp`** versions register less than the clock granularity.
6873

69-
If you have only one loop in your application and it runs in less than 15 ms (adjusted for the approximate overhead on your machine), **/openmp** may not be appropriate. If it's higher, you may want to consider using **/openmp**.
74+
If you have only one loop in your application and it runs in less than 15 ms (adjusted for the approximate overhead on your machine), **`/openmp`** may not be appropriate. If it's higher, you may want to consider using **`/openmp`**.
7075

7176
```cpp
7277
// cpp_compiler_options_openmp.cpp
@@ -114,6 +119,6 @@ int main(int argc, char* argv[]) {
114119
115120
## See also
116121
117-
[MSVC Compiler Options](compiler-options.md) \
118-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md) \
122+
[MSVC compiler options](compiler-options.md) \
123+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md) \
119124
[OpenMP in MSVC](../../parallel/openmp/openmp-in-visual-cpp.md)

docs/error-messages/compiler-errors-1/compiler-fatal-errors-c999-through-c1999.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The articles in this section of the documentation explain a subset of the error
8282
|[Fatal error C1087](fatal-error-c1087.md)|cannot tell *type* file: '*file*': *message*|
8383
|[Fatal error C1088](fatal-error-c1088.md)|cannot flush *type* file: '*file*': *message*|
8484
|[Fatal error C1089](fatal-error-c1089.md)|cannot truncate *type* file: '*file*': *message*|
85-
|Fatal error C1090|PDB API call failed, error code '*code*': '*message*'|
85+
|[Fatal error C1090](fatal-error-c1090.md)|PDB API call failed, error code '*code*': '*message*'|
8686
|[Fatal error C1091](fatal-error-c1091.md)|compiler limit: string exceeds *number* bytes in length|
8787
|[Fatal error C1092](../../error-messages/compiler-errors-1/fatal-error-c1092.md)|Edit and Continue does not support changes to data types; build required|
8888
|[Fatal error C1093](../../error-messages/compiler-errors-1/fatal-error-c1093.md)|API call '*function*' failed '*HRESULT*' : '*description*'|
@@ -100,7 +100,7 @@ The articles in this section of the documentation explain a subset of the error
100100
|[Fatal error C1109](fatal-error-c1109.md)|unable to find '*symbol*' in DLL '*file*'|
101101
|Fatal error C1110|too many nested template/generic definitions|
102102
|Fatal error C1111|too many template/generic parameters|
103-
|Fatal error C1112|compiler limit: `'number`' too many macro arguments, only *number* allowed|
103+
|Fatal error C1112|compiler limit: '*number*' too many macro arguments, only *number* allowed|
104104
|[Fatal error C1113](../../error-messages/compiler-errors-1/fatal-error-c1113.md)|#using failed on '*file*'|
105105
|Fatal error C1114|'*file*': WinRT does not support #using of a managed assembly|
106106
|[Fatal error C1120](../../error-messages/compiler-errors-1/fatal-error-c1120.md)|call to GetProcAddress failed for '*function*'|
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
description: "Learn more about: Fatal Error C1090 PDB API call failed"
3+
title: "Fatal Error C1090"
4+
ms.date: 04/01/2021
5+
f1_keywords: ["C1090"]
6+
helpviewer_keywords: ["C1090"]
7+
---
8+
# Fatal Error C1090
9+
10+
> PDB API call failed, error code '*error-number*': *message*
11+
12+
An error occurred in processing a PDB file.
13+
14+
Error C1090 is a catch-all for uncommon compiler PDB file errors that aren't reported separately. We only have generic advice for resolving this issue:
15+
16+
- Do a clean operation in your build directories, and then do a full build of your solution.
17+
18+
- Reboot your computer, or check for stray or unresponsive mspdbsrv.exe processes and kill them in TaskManager.
19+
20+
- Turn off antivirus checks in your project directories.
21+
22+
- Use the [`/Zf`](../../build/reference/zf.md) compiler option if using [`/MP`](../../build/reference/mp-build-with-multiple-processes.md) with MSBuild or another parallel build process.
23+
24+
- Try building by using the 64-bit hosted toolset.
25+
26+
For more troubleshooting or workaround information, search for this error on [Developer Community](https://aka.ms/vsfeedback/browsecpp) or [Stack Overflow](https://stackoverflow.com/search?q=C1090).
27+
28+
You can also report the issue on Developer Community. For more information, see [How to report a problem with the Microsoft C++ toolset](../../overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md).

docs/error-messages/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@
203203
href: compiler-errors-1/fatal-error-c1088.md
204204
- name: fatal error C1089
205205
href: compiler-errors-1/fatal-error-c1089.md
206+
- name: fatal error C1090
207+
href: compiler-errors-1/fatal-error-c1090.md
206208
- name: fatal error C1091
207209
href: compiler-errors-1/fatal-error-c1091.md
208210
- name: fatal error C1092

0 commit comments

Comments
 (0)