This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Polyhedron Benchmark Tests - TEST_FPU.F90


I just compiled a version of the above (http://www.polyhedron.co.uk/), after
eliminating code that exposed two bugs:

(A) This causes a segmentation fault before execution starts
REAL(RK8) :: pool(101,101,1000), pool3(1001,1001) ! random numbers to invert
EQUIVALENCE (pool,pool3)               ! use same pool numbers for test 3,4

(B) Constructs such as
index((/j,n+1-m/))     = index((/n+1-m,j/))
cause:
pb04/win/f90/test_fpu.f90:106: internal compiler error: in
gfc_conv_ss_descriptor, at fortran/trans-array.c:1261

whilst:
imax = MAXLOC(ABS( (/ (b(j+i-1,i),i=1,n-j+1) /) ))
produces
TEST_FPU.f90:165: fatal error: gfc_todo: Not Implemented: Unable to find
scalarization loop specifier

The above will be the subject of  PRs to be posted some time this weekend,
after checking with CVS version and the existing PRs.

The workarounds are quite easy andthe following comparison is quite
interesting:
All run from the Cygwin window/Windows2000/PentiumIV 2.4GHz
************************CYGWIN/gfortran 20050131****************************
$ gfc -O2 TEST_FPU.f90
$ ./a
  Benchmark running, hopefully as only ACTIVE task
Test1 - Gauss 2000 (101x101) inverts 38.8 sec  Err= 0.000000000000002
Test2 - Crout 2000 (101x101) inverts  9.4 sec  Err= 0.000000000000000
Test3 - Crout  2 (1001x1001) inverts 11.5 sec  Err= 0.000000000000002
Test4 - Lapack 2 (1001x1001) inverts  8.4 sec  Err= 0.000000000000358
                             total = 68.1 sec
************************CYGWIN/g95
20050208**********************************
$ g95 -O2 TEST_FPU.f90
$ ./a
  Benchmark running, hopefully as only ACTIVE task
Test1 - Gauss 2000 (101x101) inverts 49.3 sec  Err= 0.000000000000003
Test2 - Crout 2000 (101x101) inverts 24.5 sec  Err= 0.000000000000001
Test3 - Crout  2 (1001x1001) inverts 14.4 sec  Err= 0.000000000000002
Test4 - Lapack 2 (1001x1001) inverts 16.9 sec  Err= 0.000000000000245
                             total =105.1 sec
************************Windows/gfc
20050208*********************************
$ d:/gfc/bin/gfortran -O2 TEST_FPU.f90
$ ./a
  Benchmark running, hopefully as only ACTIVE task
Test1 - Gauss 2000 (101x101) inverts 20.0 sec  Err= 0.000000000000002
Test2 - Crout 2000 (101x101) inverts  8.0 sec  Err= 0.000000000000000
Test3 - Crout  2 (1001x1001) inverts 12.0 sec  Err= 0.000000000000002
Test4 - Lapack 2 (1001x1001) inverts  8.0 sec  Err= 0.000000000000358
                             total = 48.0 sec
************************Windows/DF5.0
rev-D**********************************
> C:\df>f90 /FAST test_fpu.f90 /LINK /STACK:8000000
$ c:/df/test_fpu
  Benchmark running, hopefully as only ACTIVE task
Test1 - Gauss 2000 (101x101) inverts  5.6 sec  Err= 0.000000000000003
Test2 - Crout 2000 (101x101) inverts  6.0 sec  Err= 0.000000000000003
Test3 - Crout  2 (1001x1001) inverts 11.1 sec  Err= 0.000000000000042
Test4 - Lapack 2 (1001x1001) inverts  8.0 sec  Err= 0.000000000000583
                             total = 30.6 sec

Thus, the Windows version of gfortran is competitive with Digital, except
for test1.  I will attempt to identify the source of the factor 3 in time
for Test1.  Typical times of ~19.5-23.8 sec are reported for WIndows on a
3.06GHz PIV by Polyhedron for Intel/VisualDF/LF95.  FTN95 is 39.3s

The Windows version of g95 now comes bundled with its own cygwin1.dll, so I
did not dare screw up my existing Cygwin installation.  Although a lot
slower on this version of TEST_FPU.F90, it should be said that g95 compiles
it out of the box.  The execution time is about the same for either version
of TEST_FPU.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]