March 19 2018 9:09:20.962 AM WTIME_TEST FORTRAN90 version. Test the WTIME library. TEST01 Time the FORTRAN90 RANDOM_NUMBER routine: call random_number ( x(1:n) ) Data vectors will be of minimum size 1024 Data vectors will be of maximum size 1048576 Number of repetitions of the operation: 5 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 1024 0.001000 0.000000 0.000000 0.000000 0.000000 2048 0.000000 0.000000 0.000000 0.000000 0.000000 4096 0.000000 0.001000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.000000 0.000000 0.000000 16384 0.000000 0.000000 0.000000 0.000000 0.000000 32768 0.000000 0.000000 0.000000 0.001000 0.001000 65536 0.001000 0.001000 0.001000 0.000000 0.000000 131072 0.002000 0.001000 0.002000 0.002000 0.002000 262144 0.003000 0.003000 0.003000 0.003000 0.003000 524288 0.006000 0.006000 0.005000 0.005000 0.006000 1048576 0.011000 0.012000 0.012000 0.012000 0.011000 TEST02 Time vectorized operations: y(1:n) = x(1:n) y(1:n) = PI * x(1:n) ) y(1:n) = sqrt ( x(1:n) ) y(1:n) = exp ( x(1:n) ) Data vectors will be of minimum size 4096 Data vectors will be of maximum size 4194304 Number of repetitions of the operation: 5 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.001000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.000000 0.000000 0.000000 16384 0.000000 0.000000 0.000000 0.000000 0.000000 32768 0.000000 0.000000 0.000000 0.000000 0.000000 65536 0.000000 0.000000 0.000000 0.000000 0.001000 131072 0.000000 0.000000 0.001000 0.000000 0.000000 262144 0.001000 0.000000 0.001000 0.000000 0.000000 524288 0.000000 0.000000 0.001000 0.000000 0.000000 1048576 0.001000 0.001000 0.001000 0.001000 0.001000 2097152 0.003000 0.002000 0.002000 0.003000 0.002000 4194304 0.005000 0.005000 0.005000 0.005000 0.004000 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.001000 0.000000 0.000000 16384 0.000000 0.000000 0.000000 0.000000 0.000000 32768 0.000000 0.000000 0.000000 0.000000 0.000000 65536 0.000000 0.000000 0.000000 0.000000 0.000000 131072 0.000000 0.001000 0.001000 0.000000 0.000000 262144 0.001000 0.000000 0.001000 0.000000 0.001000 524288 0.000000 0.001000 0.000000 0.001000 0.001000 1048576 0.002000 0.002000 0.002000 0.002000 0.001000 2097152 0.003000 0.003000 0.003000 0.004000 0.004000 4194304 0.006000 0.006000 0.007000 0.007000 0.007000 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.000000 0.000000 0.000000 16384 0.000000 0.000000 0.000000 0.000000 0.000000 32768 0.001000 0.001000 0.000000 0.000000 0.000000 65536 0.001000 0.001000 0.001000 0.000000 0.000000 131072 0.001000 0.001000 0.001000 0.000000 0.000000 262144 0.001000 0.001000 0.002000 0.002000 0.002000 524288 0.003000 0.003000 0.004000 0.004000 0.003000 1048576 0.006000 0.006000 0.006000 0.006000 0.007000 2097152 0.013000 0.013000 0.012000 0.012000 0.012000 4194304 0.024000 0.025000 0.025000 0.025000 0.025000 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.000000 0.000000 0.001000 16384 0.001000 0.001000 0.000000 0.001000 0.000000 32768 0.001000 0.001000 0.001000 0.001000 0.000000 65536 0.001000 0.001000 0.002000 0.002000 0.001000 131072 0.003000 0.003000 0.003000 0.003000 0.003000 262144 0.006000 0.006000 0.006000 0.006000 0.006000 524288 0.012000 0.012000 0.012000 0.012000 0.011000 1048576 0.023000 0.025000 0.024000 0.024000 0.024000 2097152 0.047000 0.047000 0.048000 0.048000 0.048000 4194304 0.095000 0.095000 0.096000 0.096000 0.096000 TEST03 Time the unvectorized loops: do i = 1, n y(i) = x(i) y(i) = PI * x(i) ) y(i) = sqrt ( x(i) ) y(i) = exp ( x(i) ) end do Data vectors will be of minimum size 4096 Data vectors will be of maximum size 4194304 Number of repetitions of the operation: 5 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.001000 0.000000 0.000000 16384 0.000000 0.000000 0.000000 0.000000 0.001000 32768 0.000000 0.000000 0.000000 0.000000 0.000000 65536 0.000000 0.001000 0.000000 0.001000 0.000000 131072 0.000000 0.000000 0.000000 0.000000 0.000000 262144 0.001000 0.001000 0.001000 0.001000 0.001000 524288 0.001000 0.001000 0.001000 0.001000 0.001000 1048576 0.002000 0.002000 0.003000 0.002000 0.002000 2097152 0.005000 0.005000 0.005000 0.004000 0.004000 4194304 0.009000 0.008000 0.010000 0.009000 0.009000 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.000000 0.000000 0.000000 16384 0.000000 0.000000 0.001000 0.000000 0.000000 32768 0.000000 0.000000 0.000000 0.000000 0.000000 65536 0.000000 0.000000 0.000000 0.000000 0.001000 131072 0.000000 0.001000 0.001000 0.000000 0.000000 262144 0.001000 0.000000 0.001000 0.001000 0.001000 524288 0.002000 0.002000 0.002000 0.001000 0.001000 1048576 0.003000 0.002000 0.002000 0.003000 0.002000 2097152 0.005000 0.004000 0.005000 0.004000 0.005000 4194304 0.010000 0.009000 0.009000 0.009000 0.009000 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.000000 0.000000 0.000000 0.000000 16384 0.000000 0.000000 0.000000 0.000000 0.000000 32768 0.000000 0.000000 0.001000 0.001000 0.001000 65536 0.000000 0.000000 0.001000 0.001000 0.001000 131072 0.000000 0.000000 0.001000 0.001000 0.001000 262144 0.002000 0.002000 0.001000 0.001000 0.002000 524288 0.003000 0.004000 0.003000 0.003000 0.003000 1048576 0.006000 0.006000 0.006000 0.007000 0.006000 2097152 0.012000 0.012000 0.012000 0.012000 0.013000 4194304 0.024000 0.026000 0.025000 0.026000 0.026000 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.001000 0.001000 0.000000 0.000000 0.000000 16384 0.000000 0.000000 0.001000 0.001000 0.000000 32768 0.000000 0.001000 0.001000 0.001000 0.000000 65536 0.002000 0.001000 0.002000 0.002000 0.002000 131072 0.003000 0.003000 0.003000 0.003000 0.003000 262144 0.007000 0.006000 0.006000 0.006000 0.006000 524288 0.012000 0.012000 0.012000 0.012000 0.011000 1048576 0.025000 0.024000 0.024000 0.024000 0.024000 2097152 0.051000 0.047000 0.048000 0.048000 0.047000 4194304 0.094000 0.096000 0.096000 0.095000 0.096000 TEST04 Time the 2D nearest neighbor problem. Given X(2,N) and Y(2), find X(2,*) closest to Y(2). do i = 1, n if distance ( x(2,i), y ) < minimum so far x_min = x(2,i) end do Data vectors will be of minimum size 1024 Data vectors will be of maximum size 1048576 Number of repetitions of the operation: 5 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 1024 0.000000 0.000000 0.000000 0.000000 0.000000 2048 0.000000 0.000000 0.000000 0.000000 0.000000 4096 0.000000 0.000000 0.000000 0.000000 0.000000 8192 0.000000 0.001000 0.000000 0.000000 0.000000 16384 0.000000 0.000000 0.000000 0.000000 0.000000 32768 0.000000 0.000000 0.000000 0.000000 0.000000 65536 0.001000 0.000000 0.001000 0.000000 0.001000 131072 0.001000 0.001000 0.000000 0.001000 0.001000 262144 0.001000 0.002000 0.002000 0.002000 0.001000 524288 0.003000 0.003000 0.003000 0.003000 0.003000 1048576 0.006000 0.006000 0.007000 0.006000 0.006000 TEST05 Time the matrix multiplication problem. Compute C = A * B where A is an L by M matrix, B is an M by N matrix, and so C is an L by N matrix. Minimum value of L = M = N = 4 Maximum value of L = M = N = 1024 Number of repetitions of the operation: 5 Use nested DO loops for matrix multiplication. Timing results using nested DO loops: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4 0.000000 0.000000 0.000000 0.000000 0.000000 16 0.000000 0.000000 0.000000 0.000000 0.000000 64 0.001000 0.001000 0.002000 0.001000 0.002000 256 0.118000 0.115000 0.117000 0.116000 0.117000 Use the MATMUL routine for matrix multiplication. Timing results using MATMUL: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4 0.000000 0.000000 0.000000 0.000000 0.000000 16 0.000000 0.000000 0.000000 0.000000 0.000000 64 0.000000 0.000000 0.000000 0.000000 0.000000 256 0.005000 0.005000 0.005000 0.005000 0.005000 1024 0.427000 0.491000 0.490000 0.493000 0.490000 WTIME_TEST Normal end of execution. March 19 2018 9:09:30.777 AM