- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to compile my MFC project in Microsoft Visual Studio 2019. Intel Parallel studio 2020 is used (Compiler 19.1).
I am getting error - unable to obtain mapped memory (see pch_diag.txt) in all configurations(x86/x64/Release/Debug).
Known workaround (compiler key /Qoption,cpp,--pch_control=60000000 ) isn't work.
- Tags:
- visual studio
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry,
Thank you for posting in Intel C++ compiler forum. Could you share us with the following details to reproduce the issue from our end.
1. Details about the application
2. Error log and
3. Steps to reproduce
Regards
Gopika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gopika,
Thanks for your attention. The attachment includes files with compiler's logs and an archived test project. An error appears during building. All settings are default.
Cordially yours,
Dmitry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry
Thank you for sharing the details. We tried building the MFC_Intel_test.cpp from our end. It built successfully. We were unable to reproduce the issue. After reading the thread :- https://community.intel.com/t5/Intel-C-Compiler/error-unable-to-obtain-mapped-memory-see-pch-diag-txt/td-p/1075920
The error is due to an implementation restriction in the Intel precompiled headers. When the Intel compiler restores precompiled headers (the /Yu option) it needs to obtain a big chunk of memory at a particular address. If that chunk of memory is being used by a different process then you will see that message.
We’ve seen that you already tried a workaround and it didn’t work :
(compiler key /Qoption,cpp,--pch_control=60000000 )
Please try removing the precompiled headers and try again.
We’re forwarding this issue to the concerned internal team who can help you out.
Regards
Gopika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What Visual Studio 2019 version are you using? And what IPSXE2020 Update version?
Can you see how pch.cpp was compiled? then create a preprocess file for us to investigate?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Microsoft Visual Studio Professional 2019 Version 16.6.5
Intel® C++ Compiler – extension version 19.1.0.16, Package ID: w_comp_lib_2020.2.254
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1>------ Build started: Project: MFC_Intel_test, Configuration: Release x64 ------
1>pch.cpp
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\d3d9types.h(182): error : unable to obtain mapped memory (see pch_diag.txt)
1> D3DLIGHT_SPOT = 2,
1> ^
1>
1>compilation aborted for pch.cpp (code 4)
1>Done building project "MFC_Intel_test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you upgrade the compiler to IPSXE2020 Update 4 to see if it solves your issue? if not, can you give us pch.i file?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. I'm starting to download trial version of to IPSXE2020 Update 4 rigth now. Please expect results on Monday (may be).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem still exists.
Intel® C++ Compiler – extension version 19.1.0.16, Package ID: w_comp_lib_2020.4.311.
Zipped ipch file is attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or better to download and use the C++ Compiler Classic in https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the attached file? is it a preprocess file of pch.cpp? I can't compile the file you attached.
Just to make sure, is this a compiler version you have:
C:\Programs Files (x86)\IntelSWTools> icl
Intel(R) C++ Intel (R) 64 Compiler for applications running on Intel(R), Version 19.1.3.311 Build 20201010_000000
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Viet_H_Intel wrote:
...if not, can you give us pch.i file?
...What is the attached file? is it a preprocess file of pch.cpp? I can't compile the file you attached.
It depends what you mean by "pch.i file". I can't find it in MSVS project structure.
I had sent *.iphc file.
This is the only one that looks like a "pch.i file" from your request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From your output.txt, you have a compilation aborted for pch.cpp, but we couldn't reproduce it with your zip file.
Can you look into your buildlog to see how pch.cpp was compiled? then replace /C with /E, run it from the command line and send us the output. That is the preprocess file of pch.cpp?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Requested files is attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Normally I should be able to compile from the preprocess file, but I got so many errors with your attached file.
C:\temp>icl test.cpp /C /w
test.cpp(1744): error: expected an expression
{
^
test.cpp(1744): error: expected a ">"
{
^
test.cpp(2437): error #1292: unknown attribute "no_init_all"
typedef struct __declspec(align(16)) __declspec(no_init_all) _CONTEXT {
^
....
I've attached your Output_with_E_key.txt (after clean up), can you try to see if you can compile from the command line?
What are the compiler options you use?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't use command line compilation. I'm interested in integration Intel's compiler in my MSVC projects for AI. I had add test.cpp in my project and had compiled only that file.
1>------ Build started: Project: MFC_Intel_test, Configuration: Release x64 ------
1>pch.cpp
1>compilation aborted for pch.cpp (code -1073741571)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Platforms\x64\PlatformToolsets\Intel C++ Compiler 19.1\Toolset.targets(198,5): error MSB6006: "icl.exe" exited with code -1073741571.
1>Done building project "MFC_Intel_test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Keys for compilation were default:
/Yu"pch.h" /GS /W3 /Gy /Zc:wchar_t /Zi /O2 /Fd"x64\Release\vc142.pdb" /Zc:inline /fp:precise /D "_WINDOWS" /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /D "_AFXDLL" /Qipo /Zc:forScope /Oi /MD /FC /Fa"x64\Release\" /EHsc /nologo /Fo"x64\Release\" /Qprof-dir "x64\Release\" /Fp"x64\Release\MFC_Intel_test.pch"
If you provide to me some scripts for command line compilation, i will run them with my pleasure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From VS:
Project->Properties->C/C++->All Options.
On the right panel, Edit "Additional Options with /E", scroll down and select "Yes /P" for Preprocess to a File. Click Apply and OK
Build->Clean Solution, Build->Compile
You should see a same_source_file_name.i file under project_name/Release folder.
Please provide us that .i file.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately I can't find any *.i files in project structure. May by your mean *.log file? I had attached zipped project after making all yours advises.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, that test.log is the one I wanted.
However, I couldn't reproduce the error that you saw with VS and command line using your test.cpp (test.log)
icl test.cpp /c /w /GS /Gy /Zc:wchar_t /Zi /O2 /Zc:inline /fp:precise /Qipo /Zc:forScope /Oi /MD /FC
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.3.311 Build 20201010_000000
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
test.cpp
dir test.*
Volume in drive C is IntelBuild
Volume Serial Number is 3604-F065
11/23/2020 04:25 AM 8,912,411 test.cpp
11/23/2020 04:58 AM 14,261,215 test.obj
Can you: Start->Intel Parallel Studio XE 2020 -> Compiler 19.1 for Intel64 to open a command Window and run:
>icl test.cpp /c /w /GS /Gy /Zc:wchar_t /Zi /O2 /Zc:inline /fp:precise /Qipo /Zc:forScope /Oi /MD /FC
test.cpp is attached.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler's output was:
E:\Dima\_Progs\_Test\MFC_Intel_test>icl test.cpp /c /w /GS /Gy /Zc:wchar_t /Zi /
O2 /Zc:inline /fp:precise /Qipo /Zc:forScope /Oi /MD /FC
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.3.311 Build 20201010_000000
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
test.cpp
E:\Dima\_Progs\_Test\MFC_Intel_test>
May be *.obj file will be interested. I had attached it.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page