
        Notes on compiling the Perfect Club benchmarks with SUIF
        --------------------------------------------------------

The version numbers of the Perfect Club programs we use are as follows:

APS.f:     *       1X,'$Revision: 1.9 $ $Author: kipp $'/)
CSS.f:     *       1X,'$Revision: 1.7 $ $Author: kipp $'/)
LGS.f:     *       1X,'$Revision: 1.13 $ $Author: kipp $'/)
LWS.f:     *       1X,'$Revision: 1.8 $ $Author: kipp $'/)
MTS.f:     *       1X,'$Revision: 1.8 $ $Author: lpointer $'/)
NAS.f:     *       1X,'$Revision: 1.12 $ $Author: lpointer $'/)
OCS.f:     *       1X,'$Revision: 1.8 $ $Author: kipp $'/)
SDS.f:     *       1X,'$Revision: 1.8 $ $Author: kipp $'/)
SMS.f:     *       1X,'$Revision: 1.9 $ $Author: lpointer $'/)
SRS.f:     *       1X,'$Revision: 1.13 $ $Author: lpointer $'/)
TFS.f:     *       1X,'$Revision: 1.6 $ $Author: kipp $'/)
TIS.f:     *       1X,'$Revision: 1.5 $ $Author: kipp $'/)
WSS.f:     *       1X,'$Revision: 1.9 $ $Author: kipp $'/)

Three of these programs (MTS, NAS, and WSS) contain bugs that should
be fixed.  If they are not fixed the programs might run correctly
under some circumstances and under some compilers, but under some
circumstances with the SUIF compiler these bugs are known to cause
problems.


******  MTS.f ******

MTS has a bug in the subroutine PROFYL.  The local variables DT, MANY,
TAB1, TAB2, TAB3, TAB4, TAB5, and TAB6 are read in only the first time
this subroutine is called, but they are all used on every call, so
they should be listed in a SAVE statement, as is IS1ST.  We've added
these to the SAVE statement for IS1ST.

Here is a patch to fix the bug:

*** MTS.f	Wed Apr 27 13:45:45 1994
--- MTS.f.fixed	Wed May 25 02:39:24 1994
***************
*** 2300,2306 ****
        DOUBLE PRECISION TAB4(1500),TAB5(1500),TAB6(1500)
        DOUBLE PRECISION TIME,Z,R,VZ,VR,AZ,AR
        DOUBLE PRECISION DT,DTF,DELT,F0,F1,F2,A,B
!       SAVE IS1ST
  C
        DATA IS1ST /1/
  C
--- 2300,2306 ----
        DOUBLE PRECISION TAB4(1500),TAB5(1500),TAB6(1500)
        DOUBLE PRECISION TIME,Z,R,VZ,VR,AZ,AR
        DOUBLE PRECISION DT,DTF,DELT,F0,F1,F2,A,B
!       SAVE IS1ST, DT, MANY, TAB1, TAB2, TAB3, TAB4, TAB5, TAB6
  C
        DATA IS1ST /1/
  C


******  NAS.f ******

NAS has two bugs that have caused us problems.

The first is a type bug: in the subroutine CNVERT, parameters NT1 and
NT2 don't have type declarations so they are given integer type, but
in WATER where CNVERT is called, it is called with NT1 and NT2 as type
CHARACTER*4.  We've given NT1 and NT2 CHARACTER*4 declarations in
CNVERT.

The other bug is that in the subroutine RESTAR, the variable NSP is
not in a SAVE statement.  Since this variable is first used in this
subroutine at line 2793, before it is ever set, this is clearly an
error.  We've added NSP to the SAVE statement for this subroutine and
that gives the proper behavior.

Here is a patch to fix the bugs:

*** NAS.f	Wed Apr 27 13:45:46 1994
--- NAS.f.fixed	Wed May 25 02:42:23 1994
***************
*** 1469,1475 ****
  C
        SUBROUTINE CNVERT(NEU,NLU,NT1,NT2)
        IMPLICIT DOUBLE PRECISION (A-H,O-Z)
!       CHARACTER*4  EU(3),LU(2),NEU,NLU
        SAVE EU, LU
        LOGICAL KOLLL,KOLLE
        DIMENSION AC(5),BC(5),AD(5),BD(5)
--- 1469,1475 ----
  C
        SUBROUTINE CNVERT(NEU,NLU,NT1,NT2)
        IMPLICIT DOUBLE PRECISION (A-H,O-Z)
!       CHARACTER*4  EU(3),LU(2),NEU,NLU,NT1,NT2
        SAVE EU, LU
        LOGICAL KOLLL,KOLLE
        DIMENSION AC(5),BC(5),AD(5),BD(5)
***************
*** 2714,2720 ****
        CHARACTER*4 INTEGR,TYPE,INTE,GRATOR
        LOGICAL INPUT,ICHECK
        DIMENSION INTEGR(3),TYPE(3)
!       SAVE INTEGR, TYPE
        DIMENSION OTTRAN(3),OTROT(3)
        LOGICAL        MC,MD,LRES,LSAVE,LSPA,INMC,LTS,NOTR,LGR,LWW
       X              ,LWC1,LWA1,LWCN,LWAN,LWC1A1,LQ2PC,LCA,LWWW,LLF,LPC
--- 2714,2720 ----
        CHARACTER*4 INTEGR,TYPE,INTE,GRATOR
        LOGICAL INPUT,ICHECK
        DIMENSION INTEGR(3),TYPE(3)
!       SAVE INTEGR, TYPE, NSP
        DIMENSION OTTRAN(3),OTROT(3)
        LOGICAL        MC,MD,LRES,LSAVE,LSPA,INMC,LTS,NOTR,LGR,LWW
       X              ,LWC1,LWA1,LWCN,LWAN,LWC1A1,LQ2PC,LCA,LWWW,LLF,LPC


******  WSS.f ******

There are two fixes that we use.

The first is for a bug.  In the subroutine SATVAP, the values of the
variables LAST, TLAST, and LM must live across calls to SATVAP;
otherwise they will be used uninitialized on some calls during the
benchmark test run.  Hence these three variables must be included in a
SAVE statement.  We added a SAVE statement to fix this bug.

The second fix is optional, to make the program validate on a machine
with 32 bit real arithmetic.  Without modification, the code will run,
but the results will not be close enough to the expected values, so
the program will say the result is invalid.  This is because the test
was intended for machines with more precision.  When running on
machines where ``REAL'' is 32 bits, some of the arithmetic in the
subroutine SETSIG doesn't give precise enough results.  We declared
the local variables RK and RK1 as DOUBLE PRECISION and that is enough
to give a valid result for the whole program.

Here is a patch to fix these two things:

*** WSS.f	Wed Apr 27 13:46:01 1994
--- WSS.f.fixed	Thu Jun  9 23:49:12 1994
***************
*** 3134,3139 ****
--- 3134,3140 ----
        DATA E3/.611/,T3/273.16/
        DATA AI/.0985921/,BI/22.488695/,AL/5.006501/,BL/19.839233/
        DATA ICALL /0/
+       SAVE LAST, TLAST, LM
  C
  C     ********  THE FLWG TWO CARDS MAKE ICE SAME AS WATER***************
        AI=AL
***************
*** 3279,3284 ****
--- 3280,3286 ----
        SUBROUTINE SETSIG (CI, SI, DEL, SL, CL, RPI)
        DIMENSION CI( 13 ), SI( 13 ),
       1 DEL( 12 ), SL( 12 ), CL( 12 ), RPI( 11 )
+       DOUBLE PRECISION RK, RK1
  C     PRINT 98
        WRITE(6,98)
  98    FORMAT (1H0, 'BEGIN SETSIG')
