Fortran vs. C for numerical work (SUMMARY)

Tony Warnock ttw at lanl.gov
Fri Nov 30 07:44:53 AEST 1990



    In one of the smaller problems that I had to run, I found that I
    needed two large arrays declared as follows:
 
    COMPLEX a(3,3,4,12,12,12,32), b(3,4,12,12,12,32)
 
    These are BIG suckers for a small (CRAY-1) machine. Actually the
    first array was dimensioned as a(3,2,4,12,12,12,32) using a
    standard trick of the underlying physics.
 
    It was necessary to access the arrays letting each of the last
    four dimensions be the innermost loop. (I used more programming
    tricks to eliminate memory-bank conflicts.) Every few hundred
    steps, some of the a's and b's were treated specaially as single
    3x3 (realized as 3x2) and 4x3 complex matrices. There is not much
    room left over for the pointer arrays to get at these matrices.



More information about the Comp.lang.c mailing list