Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!fu-berlin.de!uni-berlin.de!p5087c1b7.dip0.t-ipconnect.DE!not-for-mail From: Jan C. =?iso-8859-1?Q?Vorbr=FCggen?= Newsgroups: comp.lang.fortran Subject: Re: F90 performace problem on SGI (vs f77) Date: Tue, 17 Sep 2002 14:07:08 +0200 Organization: MediaSec Technologies GmbH Lines: 75 Message-ID: <3D871AEC.644D4149@mediasec.de> References: <3D8690AE.9E30EF8C@telus.net> NNTP-Posting-Host: p5087c1b7.dip0.t-ipconnect.de (80.135.193.183) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1032264436 3377139 80.135.193.183 (16 [125976]) X-Mailer: Mozilla 4.78 [de] (Windows NT 5.0; U) X-Accept-Language: de Attached you'll find a little test program. Compiling the two files seperately /fast and linking them with CVF 6.6A, I get the following results: Loop count:10 6.960000 for array operation 6.760000 for loop Loop count:20 13.62000 for array operation 13.50900 for loop Loop count:30 20.46000 for array operation 20.25900 for loop Loop count:30 20.40000 for array operation 20.36900 for loop So there's a ~2% difference between the two. If I leave out the call to do_nothing, the run time is always 0.0, as expected 8-|. Jan program test implicit none real(8) q1(2100,2100), q2(2000,2000) integer start, stop, rate integer i, j, c, count write (*, "(A)", advance="no") "Loop count:" read (*, *) count call system_clock (count_rate = rate) call random (q2) call system_clock (count = start) do c = 1, count q1(51:2050, 51:2050) = q2 call do_nothing (q1) enddo call system_clock (count = stop) write (*, *) FLOAT(stop-start)/FLOAT(rate), " for array operation" call system_clock (count = start) do c = 1, count do j = 1,2000 do i=1,2000 q1 (i+50, j+50) = q2 (i, j) enddo enddo call do_nothing (q1) enddo call system_clock (count = stop) write (*, *) FLOAT(stop-start)/FLOAT(rate), " for loop" end program test ! ! must be in seperate file and compiled seperately.... ! subroutine do_nothing (x) real(8) x(*) return end