Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Steven_L_Intel1
Employee
106 Views

Slow compile

Moved from Fortran forum
0 Kudos
6 Replies
rayjj
Beginner
106 Views

Hi,

I'm not sure if this should be on a separate thread since I am dealing with a C file (not fortran).

I am a developer of Ghostscript and am evaluating the 'icl' compiler, using it to build Ghostscript. One of the files is a generated C file that contains data (only data) for the PostScript fonts and CMap Resources needed for PDF. This
generated file takes almost two hours to compile (114 minutes) on my 2GHz Core 2 Duo laptop with 2Gb RAM and uses 1.3Gb of RAM (according to the XP Windows task monitor).

On the same machine, under Cygwin 'gcc' compiles it in 1m43s and MSVC 8 (VS 2005) compiles it in 15.8 seconds !!!

Admittedly this file is somewhat unusual in that it is entirely data initializers using hex values to initialize arrays of uint32_t. The file contains 823,336 lines (73Mb) and initializes 362 arrays that contain a total of 26Mb (the object file size).

The compiler command line I use is:

icl /c /DGX_COLOR_INDEX_TYPE="unsigned __int64" @.objccf32.tr /GF /Od /Ob2 /Za /Zm1100 -I.obj -I.base -Fo.objgsromfs1.obj .objgsromfs1.c

The C file is available and I can attach it if desired. It compresses using Winzip to 35Mb. Please let me know if you need it, or if I should try it with different compiler options.

Best Regards,
Ray Johnston
Artifex Software Inc.
__________________________________________________________________________________
Quoting - jeffrey_t_b
I have a library with about 40 files, and it takes forever for each file to compile, while other compilers (including CVF) seemed to take only a couple of seconds. (I am running VS.NET 2003, Win 2000, on a Dell Precision with 3.2 GHz and 2 GB of RAM. C++ files compile fine. This occurs with the latest build, IVF 9.0.019, too.) The compiled code seems to work correctly, fortunately.

For example, one of the files is a 200 line subroutine, coded in fortran 77. There are no include files or anything like that. It takes about eight seconds to compile!

Has anyone else run into this problem? Am I configuring something wrong?

Message Edited by jeffrey_t_b on 07-08-2005 11:21 AM


rayjj
Beginner
106 Views

Good, it didn't quote myself. I wasn't sure how to add follow on comments to a previous post in this forum...

I tested (on the same 2GHz Core 2 Duo laptop w/ 2GB) a file that (only) had 234K lines (21Mb) by leaving the CJK CIDFonts out of Ghostscript's Resource/CIDFont directory. This reduces the .obj size from 26Mb to 7.5Mb and reduces the compile time down from 114 minutes to 5m35s. The memory usage also reduces from 1.3Gb down to 435Kb max.

This is still pretty bad since MSVC 2005 (MSVC 8) can compile this is 4.6 seconds on the same machine and even running gcc on Cygwin does it in 29s.

Note that I've tried /bigobj and it doesn't seem to make any difference.
Dale_S_Intel
Employee
106 Views

If you could provide a compilable test case I'd be interested in investigating the problem. You can either attach it to a post here or submit it via premier.intel.com.

Thanks!

Dale

rayjj
Beginner
106 Views

Hi Dale,

I know it is not your fault, but your website is _REALLY_ frustrating when it comes to submitting a file for review!!!

I have (attempted) to add a file (.zip) of a generated file "gsromfs1.c" that is the smaller (5 minute) case of the slow compile time. Let me know if you want the one that takes 114 minutes ;-)

I have also uploaded this file to http://casper.ghostscript.com/~ray/intel_compiler/

Since this is part of the open source Ghostscript development sources you can also regenerate this from the Ghostscript sources available from (8.70 is the latest): http://ghostscript.com/releases/

The file will be generated by 'mkromfs.exe' in the obj directory assuming a default build using:
nmake -f psimsvc32.mak COMP=icl

Please feel free to contact me at ray.johnston@artifex.com with any questions.

Best Regards,
Ray Johnston
Director of Engineering
Artifex Software Inc.
____________________________________________________________________________________





Quoting - Dale Schouten (Intel)
If you could provide a compilable test case I'd be interested in investigating the problem. You can either attach it to a post here or submit it via premier.intel.com.

Thanks!

Dale


Dale_S_Intel
Employee
106 Views

Thanks Ray. I was not able to compile that file because it is missing at least one include file. I'll look at the website you mentioned and see if I can build it without too much trouble, but I might need a .i file or some other information.

Dale

Dale_S_Intel
Employee
106 Views

Thanks Ray. I was not able to compile that file because it is missing at least one include file. I'll look at the website you mentioned and see if I can build it without too much trouble, but I might need a .i file or some other information.

Dale


I think I've reproduced the problem. We seem to take a long time compiling very large static initialized arrays. I'll file an issue on this and let you know when I have more information.

Dale

Reply