Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

/MP option not working with oneAPI classic compiler and VS2019

Roger_Hollamby
Beginner
4,260 Views

We are in the process of upgrading our builds to use the oneAPI classic C++ compiler in Visual Studio 2019.

Some of our projects have a large number of source files so we have in the past used the /MP option to compile multiple source files in parallel.

This option seems to have disappeared in VS2019 if we select the  "Intel C++ Compiler 2021".  If I manually added the option to the command line then I get an error about an unrecognised option.



If I start a "Intel oneAPI command prompt for VS2019" session and run the command

icl -help

then I see

Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_000000
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.

....

...

...

 

and eventually in the list of options under "Miscellaneous" I see

 

/MP[<n>] create multiple processes that can be used to compile large numbers
of source files at the same time
/MP-force
Use with /MP<n> to force the given <n> processes to be created

 

so it looks like the options exist but are not accessible when building using VS2019.

 

 

 

 

 

Labels (1)
0 Kudos
12 Replies
ShivaniK_Intel
Moderator
4,222 Views

Hi,


We are working on it and will get back to you soon.


Thanks & Regards

Shivani


0 Kudos
ShivaniK_Intel
Moderator
4,118 Views

Hi,



As you have mentioned that you have selected "Intel C++ Compiler 2021" in Visual Studio 2019.


Could you please confirm whether you are referring to icl or icx compiler?


Please let us know which compiler is being used to compile your project from the output window. 


You can increase MSBuild project build output verbosity following the below path and check the compiler used in output from the build window.


Tools-->options-->Projects and Solutions-->Build and Run


icl is a classic Intel C/C++ Compiler, whereas icx is Intel nextgen compiler based on Clang /LLVM technology plus Intel proprietary optimizations and code generation.


If you are using icx compiler then/MP option is not available for windows. Please refer to the below link for more details


https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/miscellaneous-options/multiple-processes.html


Thanks & Regards

Shivani







0 Kudos
ShivaniK_Intel
Moderator
4,020 Views

Hi,


As we didn't hear back from you, could you please provide the details that have been asked in my previous post?


Thanks & Regards

Shivani


0 Kudos
Jana1
Beginner
3,981 Views

Hi Shivani,

it hasn't been my post, but I've got the same problem using icx (2021.4) on Windows.

Clang brings the following warning:

  clang-cl: : warning : argument unused during compilation: '-MP'

and just one process is being used during compilation.

This is quite annoying because it makes my compilations about 20 times slower compared to icc.

For my projects currrently it is a no go to switch to icx due to that.

Do you have any plans to implement the /MP or multiple-processes switch within the next future?

Thanks and best regards

Andreas Rost

 

0 Kudos
AndrewC
New Contributor III
3,914 Views

I think there is some confusion here when using Intel  OneAPI compilers in Visual Studio 2019

  • When using the "Classic" Intel Compilers ( showing as Intel C++ Compiler 19.2) /MP is available and visible in the options
  • When using the "new" Intel LLVM (Clang) icx/icpx compiler ( showing as Intel C++ Compiler 2021) /MP is NOT available
  • The reason /MP is not available is that the LLVM compiler is given all the files on the command line in one single call to icx/icpx. The compiler itself is expected to do whatever multi threading is needed.
  • The problem with the above is that it's unexpected and , for example, also breaks Incredibuild which expects separate compiler invocation for each source file so it can distribute the build.
  • I think there should be an option to call the compiler separately for each source file.
0 Kudos
Jana1
Beginner
3,889 Views

Hi Andrew,

I don't mind which way Intel chooses, but the current situation prohibits using the new clang compiler with Visual Studio on Windows due to the exorbitant build times compared to the classic compiler - at least for our projects.

Thanks

Andreas

0 Kudos
AndrewC
New Contributor III
3,831 Views

I have a solution for you. Use Incredibuild. They provided a simple solution for me ( a custom ib_profile file).

Immediately the build using Intel LLVM was accelerated as if I was using /MP and of course distributed over our grid of machines. Honestly, if build times are an issue then using Incredibuild is a huge ROI.

If you do not want to pay for Incredibuild , then I think the "free" edition of Incredibuild (which will only use your local machine) would work for you.

I am attaching a sample IB profile you can use. The file should be named <projectname>.ib_profile.xml and needs to be placed in the same folder as  <projectname>.sln

0 Kudos
ShivaniK_Intel
Moderator
3,843 Views

Hi,


>>>Do you have any plans to implement the /MP or multiple-processes switch within the next future?


Sorry for the inconvenience. Unfortunately, Intel LLVM (Clang) icx/icpx compiler does not support /MP or multiple-processes switch within the next future release.

 

 Thanks & Regards

 Shivani


0 Kudos
Subarnarek_G_Intel
3,627 Views

We are trying to reevaluate this /MP option or find out an alternative to this. I will update you shortly on the status of the same.


0 Kudos
Subarnarek_G_Intel
3,530 Views

The Compiler development team acknowledges that this is a feature which will make a big difference in terms of productivity on the customer side. Supporting this feature in the compiler demands significant design/engineering effort and rigorous testing/validation. Our engineers have already started the high level analysis on which compiler infrastructural components will be impacted. Our initial rough estimate is 6 – 8 months from concept to readiness for public consumption (subject to change).


0 Kudos
Subarnarek_G_Intel
2,546 Views

We are closing this Forum thread as of now! Customers will be informed as soon as this feature comes out!


0 Kudos
Subarnarek_G_Intel
2,546 Views

This issue has been resolved and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only


0 Kudos
Reply