20231213 210232.508 timer_etime(): Fortran77 version Test etime() ETIME is a routine built into most UNIX compilers. real etime real tarray(2) cpu = etime ( tarray ) returning elapsed CPU time in seconds. ETIME reports: The current CPU time is 0.796000E-03 TARRAY(1) = 0.796000E-03 TARRAY(2) = 0.00000 TEST03 Time the following 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.000013 0.000007 0.000007 0.000007 0.000006 8192 0.000019 0.000013 0.000014 0.000013 0.000013 16384 0.000037 0.000025 0.000029 0.000026 0.000026 32768 0.000073 0.000051 0.000051 0.000050 0.000050 65536 0.000146 0.000143 0.000100 0.000100 0.000100 131072 0.000306 0.000234 0.000201 0.000201 0.000201 262144 0.000603 0.000406 0.000407 0.000408 0.000434 524288 0.001325 0.000846 0.000821 0.000820 0.000951 1048576 0.002684 0.001733 0.001674 0.001759 0.001700 2097152 0.005386 0.003577 0.003477 0.003528 0.003240 4194304 0.010551 0.007004 0.007082 0.007009 0.006448 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000014 0.000008 0.000007 0.000018 0.000008 8192 0.000014 0.000014 0.000027 0.000022 0.000014 16384 0.000034 0.000028 0.000053 0.000028 0.000034 32768 0.000055 0.000056 0.000055 0.000056 0.000056 65536 0.000110 0.000110 0.000145 0.000110 0.000110 131072 0.000220 0.000220 0.000224 0.000220 0.000261 262144 0.000442 0.000473 0.000441 0.000457 0.000441 524288 0.000895 0.000899 0.000897 0.000880 0.000897 1048576 0.001768 0.001773 0.001843 0.001775 0.001769 2097152 0.003543 0.003571 0.003995 0.003568 0.003559 4194304 0.007276 0.007129 0.007096 0.007239 0.007118 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000008 0.000009 0.000007 0.000008 0.000007 8192 0.000015 0.000014 0.000015 0.000015 0.000015 16384 0.000029 0.000029 0.000029 0.000029 0.000029 32768 0.000058 0.000057 0.000058 0.000057 0.000057 65536 0.000114 0.000114 0.000114 0.000114 0.000114 131072 0.000228 0.000233 0.000228 0.000228 0.000228 262144 0.000457 0.000456 0.000458 0.000458 0.000457 524288 0.000912 0.000911 0.000912 0.000925 0.000913 1048576 0.001832 0.001833 0.001829 0.001806 0.001828 2097152 0.003666 0.003675 0.003660 0.003670 0.003674 4194304 0.007333 0.007336 0.007352 0.007342 0.007345 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000035 0.000021 0.000021 0.000021 0.000021 8192 0.000041 0.000041 0.000041 0.000041 0.000041 16384 0.000081 0.000081 0.000081 0.000081 0.000082 32768 0.000162 0.000162 0.000162 0.000162 0.000165 65536 0.000323 0.000324 0.000326 0.000323 0.000324 131072 0.000649 0.000648 0.000646 0.000646 0.000649 262144 0.001298 0.001305 0.001291 0.001295 0.001295 524288 0.002582 0.002594 0.002590 0.002587 0.002598 1048576 0.005203 0.005174 0.005177 0.005167 0.005168 2097152 0.010370 0.010372 0.010373 0.010370 0.010338 4194304 0.020734 0.020709 0.020703 0.020677 0.020721 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.000005 0.000004 0.000004 0.000004 0.000004 2048 0.000006 0.000006 0.000007 0.000006 0.000006 4096 0.000012 0.000012 0.000012 0.000012 0.000012 8192 0.000025 0.000024 0.000024 0.000024 0.000023 16384 0.000047 0.000046 0.000046 0.000046 0.000046 32768 0.000094 0.000092 0.000094 0.000091 0.000092 65536 0.000186 0.000183 0.000182 0.000183 0.000183 131072 0.000370 0.000368 0.000361 0.000365 0.000361 262144 0.000750 0.000735 0.000730 0.000732 0.000730 524288 0.001504 0.001492 0.001470 0.001468 0.001461 1048576 0.002965 0.002943 0.002936 0.002932 0.002948 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.000006 0.000001 0.000001 0.000001 0.000000 16 0.000040 0.000021 0.000022 0.000021 0.000021 64 0.001451 0.001348 0.001384 0.001369 0.001370 256 0.108219 0.107039 0.109638 0.106999 0.106852 timer_etime(): Normal end of execution. 20231213 210234.915