- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using MSVC 2005 standard with the intel 11.0 c++ compiler and I'm noticing that it doesn't seem to be using multiple cores / threads for compilation. Forgive me if this is a nub question to ask but ... is there a way I can speed up my compilation time by using more than one of the cores on my quad core cpu?
I'm compiling a single large library which takes up to 28-30 minutes to compile.
I have a Intel Core2 Quad [x86 Family 6 Model 15 Stepping 11 GenuineIntel ~2400 Mhz]
I've been searching around on the internet but most hits are for compiling multithreaded applications with the Intel compiler rather than enabling multithreading in the compiler itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using MSVC 2005 standard with the intel 11.0 c++ compiler and I'm noticing that it doesn't seem to be using multiple cores / threads for compilation. Forgive me if this is a nub question to ask but ... is there a way I can speed up my compilation time by using more than one of the cores on my quad core cpu?
I'm compiling a single large library which takes up to 28-30 minutes to compile.
I have a Intel Core2 Quad [x86 Family 6 Model 15 Stepping 11 GenuineIntel ~2400 Mhz]
I've been searching around on the internet but most hits are for compiling multithreaded applications with the Intel compiler rather than enabling multithreading in the compiler itself.
Hi Jamie,
Simply add "/MP" flag as part of the compilr command-line argument, and it would compile multi-core. Please note that this is also documented in the Intel C++ Compiler documentation (simply search for it).
Please also note Intel probably picked this "/MP" keyword because Visual Studio (starting from 2005 onward) also uses the keyword to parallelize its compilation.
Hope this helps,
S.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On VS 2005 IDE Look in
Tools | Options | Projects and Solutions | Build and Run
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using MSVC 2005 standard with the intel 11.0 c++ compiler and I'm noticing that it doesn't seem to be using multiple cores / threads for compilation. Forgive me if this is a nub question to ask but ... is there a way I can speed up my compilation time by using more than one of the cores on my quad core cpu?
I'm compiling a single large library which takes up to 28-30 minutes to compile.
I have a Intel Core2 Quad [x86 Family 6 Model 15 Stepping 11 GenuineIntel ~2400 Mhz]
I've been searching around on the internet but most hits are for compiling multithreaded applications with the Intel compiler rather than enabling multithreading in the compiler itself.
Hi Jamie,
Simply add "/MP" flag as part of the compilr command-line argument, and it would compile multi-core. Please note that this is also documented in the Intel C++ Compiler documentation (simply search for it).
Please also note Intel probably picked this "/MP" keyword because Visual Studio (starting from 2005 onward) also uses the keyword to parallelize its compilation.
Hope this helps,
S.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using MSVC 2005 standard with the intel 11.0 c++ compiler and I'm noticing that it doesn't seem to be using multiple cores / threads for compilation. Forgive me if this is a nub question to ask but ... is there a way I can speed up my compilation time by using more than one of the cores on my quad core cpu?
I'm compiling a single large library which takes up to 28-30 minutes to compile.
I have a Intel Core2 Quad [x86 Family 6 Model 15 Stepping 11 GenuineIntel ~2400 Mhz]
I've been searching around on the internet but most hits are for compiling multithreaded applications with the Intel compiler rather than enabling multithreading in the compiler itself.
Another point to consider is are you using
#pragma once
in your include files (where including only once is desired).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jamie,
Simply add "/MP" flag as part of the compilr command-line argument, and it would compile multi-core. Please note that this is also documented in the Intel C++ Compiler documentation (simply search for it).
Please also note Intel probably picked this "/MP" keyword because Visual Studio (starting from 2005 onward) also uses the keyword to parallelize its compilation.
Hope this helps,
S.
Thanks for that! Your solution seems to have sorted it out as I can now get up to 100% CPU utilisation when compiling. It's not readily apparent that it is now using multiple as all the threads are started from a single icl.exe so you end up with
[cpp]1> SourceFile1.cppinstead of the expected
1> SourceFile2.cpp
1> SourceFile3.cpp
1> SourceFile4.cpp[/cpp]
[cpp]1> SourceFile1.cpp
2> SourceFile2.cpp
3> SourceFile3.cpp
1> SourceFile4.cpp[/cpp]
if you had N = 3 separate compilations going at once. But you can see via the task manager than there are multiple mcpcom.exe processes running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On VS 2005 IDE Look in
Tools | Options | Projects and Solutions | Build and Run
Jim Dempsey
That [max number of parallel project builds] was already set to 4, but had no effect on the intel compiler... solution was to add /MP to all projects that I want to compile multithreaded.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page