Friedrich Hertweck produced the following results for DVF:
Digital Visual Fortran 95 in Intel PC:
f77 loop, contiguous array, sum =32850.339844 time = 3.180000
f77 loop, stride 2x2 array, sum =32850.339844 time = 5.170000
f90 loop, contiguous array, sum =32850.339844 time = 6.530001
f90 loop, stride 2x2 array, sum =32850.339844 time = 8.460001
f90 SUM(stride 2x2 array), sum =32850.343750 time = 8.240000 <----????
and
Anthony Stone produced the following results for Sun's WorkShop 6 beta:
f77 loop, contiguous array, sum =32761.333984 time = 12.625000
f77 loop, stride 2x2 array, sum =32761.333984 time = 13.437500
f90 loop, contiguous array, sum =32761.333984 time = 18.906250
f90 loop, stride 2x2 array, sum =32761.333984 time = 19.656250
f90 SUM(stride 2x2 array), sum =32761.248047 time = 1.531250 <----????
Do the respective vendors have any comment on why the SUM intrinsic
should produce results different from the loop method?
Date sent: Thu, 1 Jun 2000 14:23:45 +0100 (BST)
Subject: Re: What do compilers do about assumed-shape dummy arguments?
From: Anthony Stone <[log in to unmask]>
To: Friedrich Hertweck <[log in to unmask]>
Copies to: Van Snyder <[log in to unmask]>, [log in to unmask]
Send reply to: Anthony Stone <[log in to unmask]>
>
> At 11:45 on 1 June, Friedrich Hertweck wrote:
>
> > Below is a program that does a very simple thing: add the values of
> > an array and return it. There are four versions of subroutines to
> > do this:
> > [etc.]
>
> Here are results for Sun's WorkShop 6 beta:
>
> f77 loop, contiguous array, sum =32761.333984 time = 12.625000
> f77 loop, stride 2x2 array, sum =32761.333984 time = 13.437500
> f90 loop, contiguous array, sum =32761.333984 time = 18.906250
> f90 loop, stride 2x2 array, sum =32761.333984 time = 19.656250
> f90 SUM(stride 2x2 array), sum =32761.248047 time = 1.531250
>
> A striking time difference in the last case -- but a significant
> difference in the sum. Repeating the calculation in double precision
> gives the following:
>
> f77 loop, contiguous array, sum =32761.333984 time = 16.750000
> f77 loop, stride 2x2 array, sum =32761.333984 time = 17.218750
> f90 loop, contiguous array, sum =32761.333984 time = 23.656250
> f90 loop, stride 2x2 array, sum =32761.333984 time = 24.218750
> f90 SUM(stride 2x2 array), sum =32761.248047 time = 3.656250
>
> So it isn't a rounding error problem, and the program isn't using
> different values each time it is run, it would seem.
>
> --
> Anthony Stone http://fandango.ch.cam.ac.uk/
> University Chemical Laboratory, Email: [log in to unmask]
> Lensfield Road, Phone: +44 1223 336375
> Cambridge CB2 1EW Fax: +44 1223 336362
Regards,
David.
----------------------------------------------------------
David Vowles
Research Officer
Department of Electrical and Electronic Engineering
The University of Adelaide
Australia 5005
Voice: +61 8 8303 5416
Fax: +61 8 8303 4360
Email: [log in to unmask]
Home Page: http://www.eleceng.adelaide.edu.au/Personal/dvowles/home.html
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|