I have been using ICC to compile a program I wrote for my research (nothing impressive just a lot of floating point calculations) and I can compile it just fine using:
g++ -O3 mixingModel.cpp configFile.cpp -o mixingModel
or
icc -O3 -ipo -static mixingModel.cpp configFile.cpp -o mixingModel
However, as soon as I add -static the compiler just hangs. This issue first crept up when I wanted to use -fast and the compiler just sat there compiling away forever. The process that is running is called mcpcom and it takes 99% of my cpu (so its one thread) and hardly any memory. I have let it sit there for over 30 minutes before (usual compile time without -fast is under one minutes).
I then went ahead and wrote a small hello world program in c++ and tried compiling it with the -fast flag and it again showed the same MO. Sat there with 99% cpu used and the process called is mcpcom.
Note: I am compiling on 64bit Linux with ICC version 11.1 20100806
Thank you,
Patrick
This is likely due to icc's inter-procedural optimization. It considers all object files, which can be a lot when doing static linking. So I recommend to drop -ipo
. Apparently, this is an old problem.