PDA

View Full Version : [LF] MATMUL-Performance


Lahey Support
08-15-2003, 01:33 AM
Dear forum members,

testing the new Fortran90/95 feature MATMUL (with LF90 4.5 and LF95
5.6f,
OS: WIN9X and WIN2000, with and without optimizing) i have found that
the use of MATMUL causes the programs to run remarkable more slowly.

For example, inside a subroutine (often called from a big main prgram)
with the following subset of declarations

REAL(8) :: A(2,2),B(2,2)
REAL(8) :: X(2),Y(2),Z(2)

i have changed the following code

Z(1)=A(1,1)*X(1)+A(1,2)*X(2)-B(1,1)*Y(1)-B(1,2)*Y(2)
Z(2)=A(2,1)*X(1)+A(2,2)*X(2)-B(2,1)*Y(1)-B(2,2)*Y(2)

to the equivalent code

Z=MATMUL(A,X)-MATMUL(B,Y)

The results from the MATMUL-code are exactly the same as from the
explicit code before, but the execution grows with MATMUL by a factor >
6.

In an other test with the same (matrix- and vector-dimensions, the
execution time with MATMUL-code was growing by a factor 3.

Has anyone analogous experiences with other f90/f95 compilers?
Will the MUTMUL-Performance grow by greater matrix- and
vector-dimensions?
How actual are the popular benchmarks in respect to the new Fortran90/95
features?

MfG
W. Schmidt


----------------------------------------------------------
To unsubscribe, send to [address removed] the following
as the first and only line of the message body:
unsubscribe fortran
----------------------------------------------------------