Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29257 Discussions

PUBLIC statements slows down compiler (v12.1.1 and 12.1.2)

Olsen__Oystein
Beginner
389 Views
Hi,

I have a problem with the last two updates to the intel fortran compiler. The time it takes to compile a program has increased dramatically (in some cases with a factor of ~100). Version 12.1.0 works fine.

I have attached an archive where this effect can been seen. The archive consists of a build directory and a source directory. The build directory contains a makefile.

Execute:

make
time make body

in the build directory. The first step take a minute or so. The second step demonstrates the problem. The code is stripped down to a bare minimum. It takes ~30 times longer to compile it with 12.1.2 than to compile it with 12.1.0.

This problem goes away when I comment out most of the PUBLIC statements in the file

src/libs/hsmath/hsarray/hsarray.f90

within the archive. I have described in that file which PUBLIC statements that can be commented out. These PUBLIC statements are never used in this example, but they slow down the compiler. This is of course not an option with the full code.

This problem is not seen when the first step uses 12.1.0 and the last step uses 12.1.1 or 12.1.2.

I am a bit surprised that the last step compiles at all, since it ( src/libs/hsspace/hsbody/hsbody.f90 ) uses a derived type defined in another module without any USE statements.

I have tried this on openSUSE 11.4 and 12.1.


Best regards,

ystein
0 Kudos
2 Replies
Steven_L_Intel1
Employee
389 Views
What kind of build times are you seeing - in absolute times, please. When I try building with 12.1.2, hsarray does take about 20-30 seconds to compile but everything else compiles quickly.

The issue with hsbody is interesting and I'll look more closely into that.
0 Kudos
Steven_L_Intel1
Employee
389 Views
Thanks for the additional sources. I think I can now reproduce what you are seeing, so let me play with this a bit.
0 Kudos
Reply