Someone asked about -O optimisation on the Nag compiler so I tried
HP-UX 10, Nag f90 2.2, default optimisation
f77 loop, contiguous array, sum =32745.447266 time = 515.000000
f77 loop, stride 2x2 array, sum =32745.447266 time = 588.000000
f90 loop, contiguous array, sum =32745.447266 time = 1070.000000
f90 loop, stride 2x2 array, sum =32745.447266 time = 1078.000000
f90 SUM(contiguous array), sum =32745.447266 time = 230.000000
f90 SUM(stride 2x2 array), sum =32745.447266 time = 237.000000
HP-UX 10, Nag f90 2.2, -O
f77 loop, contiguous array, sum =32713.726562 time = 49.000000
f77 loop, stride 2x2 array, sum =32713.726562 time = 55.000000
f90 loop, contiguous array, sum =32713.726562 time = 49.000000
f90 loop, stride 2x2 array, sum =32713.726562 time = 54.000000
f90 SUM(contiguous array), sum =32713.726562 time = 45.000000
f90 SUM(stride 2x2 array), sum =32713.726562 time = 52.000000
A great speed up, possibly affected bu variable load, but notice how
different the sums are! 4th digit differences on a 32 bit machine! The T3E
is 64 bit and identical at 11th digit.
John
--
John Bray, Numerical Weather Prediction Tel: +44 (0) 1344 854035
Room 337 [log in to unmask]
The Met. Office http://www.met-office.gov.uk
London Road, Bracknell, RG12 2SZ, UK http://www.jrbray.org.uk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|