Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Long compilation time for recursive data structure access

$
0
0

Hi Steve,

I am seeing very long compilation times, both debug and release, for routines where I am accessing recursive data structures in a certain way.

I have a Type like this:

      Type XYPlot
        SEQUENCE
        Integer(4)                    :: LYR, IA, IB, IG, X, Y, LEVEL
        Character(80)                 :: NAME
        Character(1)                  :: COORD
        Character(7)                  :: CDUMMY
        Type(XYPlot), POINTER         :: Local(:)  ! -- Recursive for MsGMC
      End Type

So it contains a Pointer array of the same data type (this is what I mean by recursive).

which has not been a problem, but, I recently added some references like this (with MicroPlots being of Type XYPlot):

            DO LEV = 0, LEVEL(NCURVE_TOT)
               IF (LEV .EQ. 0) THEN
                  IASEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%IA
                  IBSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%IB
                  IGSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%IG
               ELSEIF (LEV .EQ. 1) THEN
                  IASEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%IA
                  IBSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%IB
                  IGSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%IG
               ELSEIF (LEV .EQ. 2) THEN
                  IASEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%IA
                  IBSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%IB
                  IGSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%IG
               ELSEIF (LEV .EQ. 3) THEN
                  IASEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%IA
                  IBSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%IB
                  IGSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%IG
               ELSEIF (LEV .EQ. 4) THEN
                  IASEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%IA
                  IBSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%IB
                  IGSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%IG
               ELSEIF (LEV .EQ. 5) THEN
                  IASEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%IA
                  IBSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%IB
                  IGSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%IG
               ELSEIF (LEV .EQ. 6) THEN
                  IASEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%IA
                  IBSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%IB
                  IGSEL(LEV, NCURVE_TOT) = MacDeckIn%MicroPlots(I)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%Local(1)%IG
               ELSE 
                  WRITE(NIO, *) 'TOO MANY LEVELS'
                  STOP
               ENDIF

And it now takes a very long time to compile this routine.

Can you please tell me why this might be and if there is a setting that I can change to speed up the compilation?  The subroutine is now taking approx. 30 min to compile, whereas, previously is was 1 second.

I am using Intel Visual Fortran Composer XE 2011.

Thanks much,

---Brett


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>