SUBROUTINE R7(L,LB,NZ,CSET,WSET,CRUN,WRUN,NN,START,LENGTH,IER, $ OVER) c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c This is an output routine for Benchmark 7. c c This will need to be modified to contain the particular c configuration information requested. c c Parameters: c Provided by calling routine: c L = Actual bit stream length of A c LB = Length of E stream c NZ = Number of zeros required c CSET = CPU time required to generate the data c WSET = Wallclock time required to generate the data c CRUN = CPU time required to do the benchmark c WRUN = Wallclock time required to do the benchmark C NN = The number of solutions found c START = An array of starting locations for each solution c LENGTH = An array of lengths for each solution c IER = Error flag array c IER(1) = Error code c IER(2) = Value related to error code c OVER = Flag indicating whether array overflow was c detected c OVER = 0 array size OK c OVER = 1 array too small c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c IMPLICIT INTEGER (A-Z) c DIMENSION START(1), LENGTH(1), IER(2) REAL CSET,WSET,CRUN,WRUN CHARACTER(LEN=9) DATECHAR C--CVS variable declaration TYPE CVS sequence character( 160 ) string integer stringend END TYPE CVS C--CVS initilaize variables TYPE( CVS ),save :: CVS_INFO = $ CVS("BMARKGRP $Date: 2005/01/10 20:45:00 $ $Revision: 1.2 $" // $ "$RCSfile: r7.f,v $ $Name: rel_5 $", 0) c PRINT 5 5 FORMAT('Benchmark #7 -- Bit Twiddle',/) c CALL DATE_AND_TIME(DATECHAR) PRINT 7, DATECHAR 7 FORMAT('Date: ',A10,/) c PRINT 15,L,NZ 15 FORMAT( 'Length of bit stream A = ',I15,//, $ 'Length of zero sequence required = ',I6,/) c PRINT 25, CSET,WSET 25 FORMAT('Time for set up: ',/, $ 'time: Setup CPU = ',F12.4,' seconds',/, $ 'time: Setup Wall_Clock = ',F12.4,' seconds',/) c PRINT 30,CRUN,WRUN 30 FORMAT('Time to run: ',/, $ 'time: Run CPU = ',F12.4,' seconds',/, $ 'time: Run Wall_Clock = ',F12.4,' seconds',/) c c No errors IF (IER(1) .EQ. 0) THEN PRINT 33, NN 33 FORMAT('Correctly found ',I5,' occurrences',/) ENDIF c c Incorrect number of solutions found IF (IER(1) .EQ. 1) THEN PRINT 35, IER(2), NN 35 FORMAT(' Incorrect number of solutions found',/, $ ' Expected ',I5,/,' Found ',I5,//) ENDIF c c Errors in solutions found IF (IER(1) .EQ. 2) THEN PRINT 36, IER(2), NN 36 FORMAT(/, I3,' of the ', I3,' solutions are incorrect ',/) ENDIF c c If less than twenty solutions, print out all solutions IF(NN .LE. 20) THEN IF(NN .NE. 0) THEN PRINT 37 37 FORMAT(/,'Starting Position',2X,'Number of Zeros') DO 40, I = 1,NN PRINT 39,START(I),LENGTH(I) 39 FORMAT('data: 'I15,11X,I6) 40 CONTINUE ENDIF c c Otherwise, print out first five, middle ten, and last five positions ELSE PRINT 42 42 FORMAT(/, 'First 5, Middle 10, and Last 5 Solutions') PRINT 37 DO 45, I = 1,5 PRINT 39,START(I),LENGTH(I) 45 CONTINUE PRINT 47 47 FORMAT(/) DO 50, I = NN/2 - 5, NN/2 + 4 PRINT 39,START(I),LENGTH(I) 50 CONTINUE PRINT 47 DO 55, I = NN - 4, NN PRINT 39,START(I),LENGTH(I) 55 CONTINUE ENDIF c PRINT 58, LB 58 FORMAT(/,'Length of E stream = ',I15,//) c c RETURN c c Check for array overflow. NOTE: If OVER = 1 then the size c of arrays START and LENGTH in M7 must be increased and the c test for array overflow in P7 must be changed accordingly. c IF (OVER .EQ. 1) THEN PRINT 60, NN 60 FORMAT(/,'***** WARNING: Array too small *****',/, $ ' Number of zero stretches found: ',I8,/, $ ' Only first 1000 were recorded',/) ENDIF RETURN c c Some/all solutions are incorrect IF (IER(1) .EQ. 2) THEN PRINT 65, NN,IER(2) 65 FORMAT(' Number of solutions found: ',I5,/, $ ' Number of solutions with errors: ',I5,//) ENDIF c RETURN END