Lahey & Intel compilation size/speed issues

From: Rich Townsend (rhdt_at_barVOIDtol.udel.edu)
Date: 07/29/04


Date: Wed, 28 Jul 2004 23:33:15 -0400

Dear all,

Below is a code snippet shared by many of my memory reallocation routines:

     array_new(:i_a(1),:i_a(2),:i_a(3),:i_a(4)) = array(:i_a(1),:i_a(2),:i_a(3),:i_a(4))
     array_new(:i_a(1),:i_a(2),:i_a(3),i_c(4):) = array(:i_a(1),:i_a(2),:i_a(3),i_b(4):)
     array_new(:i_a(1),:i_a(2),i_c(3):,:i_a(4)) = array(:i_a(1),:i_a(2),i_b(3):,:i_a(4))
     array_new(:i_a(1),:i_a(2),i_c(3):,i_c(4):) = array(:i_a(1),:i_a(2),i_b(3):,i_b(4):)
     array_new(:i_a(1),i_c(2):,:i_a(3),:i_a(4)) = array(:i_a(1),i_b(2):,:i_a(3),:i_a(4))
     array_new(:i_a(1),i_c(2):,:i_a(3),i_c(4):) = array(:i_a(1),i_b(2):,:i_a(3),i_b(4):)
     array_new(:i_a(1),i_c(2):,i_c(3):,:i_a(4)) = array(:i_a(1),i_b(2):,i_b(3):,:i_a(4))
     array_new(:i_a(1),i_c(2):,i_c(3):,i_c(4):) = array(:i_a(1),i_b(2):,i_b(3):,i_b(4):)
     array_new(i_c(1):,:i_a(2),:i_a(3),:i_a(4)) = array(i_b(1):,:i_a(2),:i_a(3),:i_a(4))
     array_new(i_c(1):,:i_a(2),:i_a(3),i_c(4):) = array(i_b(1):,:i_a(2),:i_a(3),i_b(4):)
     array_new(i_c(1):,:i_a(2),i_c(3):,:i_a(4)) = array(i_b(1):,:i_a(2),i_b(3):,:i_a(4))
     array_new(i_c(1):,:i_a(2),i_c(3):,i_c(4):) = array(i_b(1):,:i_a(2),i_b(3):,i_b(4):)
     array_new(i_c(1):,i_c(2):,:i_a(3),:i_a(4)) = array(i_b(1):,i_b(2):,:i_a(3),:i_a(4))
     array_new(i_c(1):,i_c(2):,:i_a(3),i_c(4):) = array(i_b(1):,i_b(2):,:i_a(3),i_b(4):)
     array_new(i_c(1):,i_c(2):,i_c(3):,:i_a(4)) = array(i_b(1):,i_b(2):,i_b(3):,:i_a(4))
     array_new(i_c(1):,i_c(2):,i_c(3):,i_c(4):) = array(i_b(1):,i_b(2):,i_b(3):,i_b(4):)

(this code is used in the part of the routines where date is copied from the old array
to the new one).

When compiling this code (or, more accurately, a large number of routines containing this
code verbatim), I'm finding that the two compilers I'm using (Lahey Express 6.20 and Intel
8.0, both for Linux) are using huge amounts of memory (up to 1Gb) to compile, and --
with the furious swapping which ensues -- taking large amounts of time. In fact, the
Intel compiler eventually bombs out with what I presume to be an out-of-memory error.

What is it about the code above which gives the compilers so much difficulty? All I
see is 16 4-deep nested do loops, nothing incredibly fancy. Is there any way I can
rewrite these expressions to make the compiler burden simpler -- and, perhaps, the
resulting object code rather leaner?

cheers,

Rich

-- 
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware
[ Delete VOID for valid email address ]


Relevant Pages

  • Re: QC Report "Integer Code Optimization: ESP Based Stack Access"
    ... Dennis wrote in: ... details of compilers under Win32, *but*, I could have swore that EBP ... stack access was required (at least for routines exposed to Windows, ...
    (borland.public.delphi.language.basm)
  • Re: pros and cons of user-defined types
    ... that to a single structure with sensible names can ... make it clearer what that routine is doing. ... Calling those routines with the entire structure as a single argument ... back when F95 compilers were pretty new, ...
    (comp.lang.fortran)
  • Re: Lahey & Intel compilation size/speed issues
    ... Does Lahey LF95 ... -|(this code is used in the part of the routines where date is copied from the old array ... -|What is it about the code above which gives the compilers so much difficulty? ... Penn State Information Technology Services ...
    (comp.lang.fortran)
  • Re: Lahey & Intel compilation size/speed issues
    ... Herman D. Knoble wrote: ... > -|(this code is used in the part of the routines where date is copied from the old array ... agresssive opts, on both compilers, gives more-manageable behaviour. ...
    (comp.lang.fortran)
  • Re: icc C++ problems on Debian 2.4.27-1-686-smp
    ... I didn't use the netCDF .deb but rather downloaded the latest from ... when I do the same Intel compiler installation. ... The same is true if 'icpc' is used instead of 'icc'. ... but it's a question about the Intel compilers. ...
    (Debian-User)