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

Fatal compilation error: Out of memory asking for 54091784

Karthikeya_J_Intel
1,042 Views

I was trying to compile exiting project with Intel® C++ Compiler XE 12.1.5.344 [IA-32] in visual studio 2005 in windows XP operating system. Earlier we were able to compile easily with vs2005 compiler and were using it for long time. With intel compiler, I was able to compile successfully in "debug" mode but not in "release" mode. Even in debug mode with "O2" optimization, it is not compiling. It gave me the following "out of memory" error.1>Compiling with Intel® C++ Compiler XE 12.1.5.344 [IA-32]... (Intel C++ Environment)1>.cpp1>Fatal compilation error: Out of memory asking for 54091784.1>icl: error #10298: problem during post processing of parallel object compilation1>Fatal compilation error: Out of memory asking for 54091784.1>icl: error #10298: problem during post processing of parallel object compilationFor release mode, I got the following error.1>Compiling with Intel® C++ Compiler XE 12.1.5.344 [IA-32]... (Intel C++ Environment)1>T.cpp1>Fatal compilation error: Out of memory asking for 2097160.1>icl: error #10298: problem during post processing of parallel object compilationI can easily notice increase in PF usage in windows task manager. My compiler command line options in debug mode :c /O2  /D "_SECURE_SCL" /D "_SECURE_SCL_THROWS" /D "TPAD_XL_VER_3_2_3" /D "IMT_ATF_TOS" /D "IMT_CONSOLE_HTML" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_WIN32_WINNT=0x0501"  /D "_WINDLL" /D "_MBCS" /EHsc /MDd /GS /fp:fast /Fo"Debug\\b\\I386/" /W3 /nologo /Zi /MP1Command line options in release mode:/c /O2 /D "_SECURE_SCL" /D "_SECURE_SCL_THROWS" /D "TPAD_XL_VER_3_2_3" /D "IMT_ATF_TOS" /D "IMT_CONSOLE_HTML" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_WIN32_WINNT=0x0501"  /D "_WINDLL" /D "_MBCS" /EHsc /MD /GS /fp:fast /Fo"Release\\a\\I386/" /W3 /nologo /Zi /MP1

0 Kudos
4 Replies
TimP
Honored Contributor III
1,042 Views
You may be running out of memory as a result of using parallel compilation option on 32-bit system.  Besides trying with that option removed,  I would ask if you use /3GB boot switch, and why you don't go to 64-bit OS if your application is at all large.
0 Kudos
Karthikeya_J_Intel
1,042 Views
Thanks for the quick reply. 
I tired removing parallel compilation option and introduced /3GB switch. Even then compiling in debug model with O2 optimization is not successful. This time it asked for  120393736 bytes.
Error obtained is
1>------ Rebuild All started: Project: ,  Configuration: Debug Win32 ------
1>Compiling with Intel® C++ Compiler XE 12.1.5.344 [IA-32]... (Intel C++ Environment)
1>.cpp
1>Fatal compilation error: Out of memory asking for 120393736.
1>compilation aborted for .cpp (code 1)
Upgrading to 64-bit OS is not possible for us right now.
Project has single autogenerated .h and .cpp. .Cpp has total 6300 lines and this project linked with various dlls. Is there any other workaround?
0 Kudos
TimP
Honored Contributor III
1,042 Views
Disabling interprocedural optimization (/Qip-) or splitting the source file should reduce memory and time consumption during compile.  There are several options documented along that line (/Qinline-max-.....).
0 Kudos
SergeyKostrov
Valued Contributor II
1,042 Views
>>...Project has single autogenerated .h and .cpp. .Cpp has total 6300 lines and this project linked with various dlls... 6300 code lines in the cpp file is not a big number. However, it is not clear how many lines are in autogenerated header file. >>Is there any other workaround? A root cause of the problem is not known and I really don't know what workarounds could be suggested when nothing is clear. I would do the following: - Comment everything and it applies to ALL h and cpp files in the project. Your main cpp file should look like: [ Main.cpp ] #include "AutoGenetated.h" void main( void ) { /* ...Your functionality */ } Your autogenerated header file should look like: [ AutoGenerated.h ] //...some declarations 1... //...some declarations 2... //...some declarations 3... //...etc... - For Debug configuration disable all optimizations - Undefine ALL defines - Re-Build the project - If the error is not displayed this is your Reference Build for the Debug configuration - Start restoring state of all components you've affected one at a time with mandatory Re-Building the project.
0 Kudos
Reply