20251007 133150.178 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.783000E-03 TARRAY(1) = 0.00000 TARRAY(2) = 0.783000E-03 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.000014 0.000009 0.000009 0.000009 0.000008 8192 0.000022 0.000017 0.000016 0.000016 0.000017 16384 0.000043 0.000033 0.000033 0.000034 0.000033 32768 0.000084 0.000067 0.000082 0.000066 0.000066 65536 0.000169 0.000131 0.000132 0.000132 0.000183 131072 0.000381 0.000266 0.000263 0.000263 0.000315 262144 0.000675 0.000560 0.000528 0.000528 0.000567 524288 0.001417 0.001076 0.001064 0.001121 0.001194 1048576 0.002821 0.002171 0.002165 0.002234 0.002260 2097152 0.005416 0.004376 0.004397 0.004369 0.004372 4194304 0.010885 0.008761 0.008897 0.009442 0.008850 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000009 0.000009 0.000009 0.000009 0.000009 8192 0.000017 0.000017 0.000017 0.000018 0.000017 16384 0.000033 0.000034 0.000034 0.000034 0.000034 32768 0.000068 0.000068 0.000068 0.000067 0.000067 65536 0.000136 0.000135 0.000136 0.000135 0.000137 131072 0.000270 0.000271 0.000270 0.000269 0.000305 262144 0.000542 0.000547 0.000542 0.000539 0.000543 524288 0.001088 0.001130 0.001123 0.001086 0.001088 1048576 0.002216 0.002227 0.002218 0.002218 0.002214 2097152 0.004665 0.004482 0.004512 0.004496 0.004468 4194304 0.008991 0.009004 0.009029 0.009065 0.009515 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000008 0.000008 0.000008 0.000008 0.000010 8192 0.000015 0.000016 0.000016 0.000016 0.000022 16384 0.000030 0.000031 0.000032 0.000031 0.000042 32768 0.000113 0.000063 0.000063 0.000062 0.000086 65536 0.000125 0.000125 0.000125 0.000125 0.000130 131072 0.000250 0.000252 0.000244 0.000250 0.000259 262144 0.000502 0.000503 0.000494 0.000503 0.000505 524288 0.001034 0.001007 0.000989 0.001008 0.001152 1048576 0.002156 0.002063 0.002056 0.002058 0.002026 2097152 0.004205 0.004228 0.004279 0.004174 0.004204 4194304 0.008389 0.008308 0.008466 0.009234 0.008148 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000068 0.000021 0.000022 0.000022 0.000022 8192 0.000043 0.000043 0.000043 0.000043 0.000043 16384 0.000085 0.000085 0.000086 0.000086 0.000086 32768 0.000172 0.000169 0.000171 0.000173 0.000171 65536 0.000351 0.000338 0.000346 0.000342 0.000342 131072 0.000684 0.000728 0.000684 0.000703 0.000690 262144 0.001397 0.001440 0.001406 0.001443 0.001429 524288 0.002762 0.002815 0.002813 0.002846 0.002802 1048576 0.005437 0.005443 0.005662 0.005701 0.005744 2097152 0.011427 0.011384 0.011421 0.011411 0.011817 4194304 0.021924 0.022836 0.022800 0.023104 0.022290 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.000004 0.000003 0.000004 0.000004 0.000004 2048 0.000006 0.000006 0.000006 0.000006 0.000007 4096 0.000011 0.000011 0.000011 0.000013 0.000013 8192 0.000022 0.000022 0.000022 0.000022 0.000024 16384 0.000046 0.000045 0.000045 0.000044 0.000048 32768 0.000089 0.000090 0.000089 0.000089 0.000096 65536 0.000181 0.000180 0.000178 0.000177 0.000193 131072 0.000401 0.000364 0.000358 0.000382 0.000434 262144 0.000724 0.000718 0.000718 0.000836 0.000926 524288 0.001447 0.001442 0.001442 0.001746 0.001741 1048576 0.002927 0.002902 0.002935 0.003322 0.003692 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.000007 0.000001 0.000000 0.000001 0.000001 16 0.000034 0.000021 0.000020 0.000020 0.000020 64 0.001464 0.001448 0.001409 0.001410 0.001413 256 0.102303 0.094112 0.093265 0.093783 0.094305 timer_etime(): Normal end of execution. 20251007 133152.280