SUBROUTINE S7 ( A, NUMBUFS, MYFIRST, MYLAST, ISEED ) c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Generate my PE's chunk of the pseudo-random A stream for Benchmark #7 c c Parameters: c Provided by calling routine: c NUMBUFS = Total number of buffers of the A stream to generate c MYFIRST = first buffer in my PE's chunk c MYLAST = last buffer in my PE's chunk c ISEED = Seed for random number generator c c Returned by this routine: c A = Array holding the data c c If NUMBUFS = 1, returns the data in array A. c If NUMBUFS > 1, writes the data to the file. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc #include "bench7.h" c IMPLICIT INTEGER (A-Z) c INTEGER (kind=8) A(*) INTEGER (kind=8) PAT1010, PAT0101 INTEGER (kind=8) MYF, MYL c MIS = -ISEED c c Generate a buffer-full at a time and write to disk c DO 100 BUFNUM = MYFIRST, MYLAST c CALL GET_MY_BDATA64(BUFNUM, 1,1, BUFSIZE, 1, MIS, A, MYF,MYL) c c Artificially insert several regions that produce c 600-long patterns in the B and C streams and thence c 500-long runs of zeros in E-stream c PAT1010 = Z'AAAAAAAAAAAAAAAA' PAT0101 = Z'5555555555555555' c DO 20 I = 0, 20 A( I + 68750 ) = PAT1010 A( I + 78776 ) = PAT0101 A( I + 137500 ) = 0 A( I + 157552 ) = -1 20 CONTINUE c c Create a zero region overlapping end of buff i and start of buff i+1, i>=0 c Region at end of buffer is not long enough without beginning of next buffer c So no trouble checking results: we get 5 regions in each buffer except c the last one, which has 4 regions I1 = 4 I2 = 6 DO I = 0, I1-1 A(BUFSIZE-I) = 0 ENDDO IF (BUFNUM .GT. 1) THEN DO I = 1, I2 A(I) = 0 ENDDO ENDIF c IF (NUMBUFS .GT. 1) THEN CALL WRTMP(1, A, BUFSIZE) CALL SYNTMP(1) ENDIF c 100 CONTINUE c RETURN END