20080710 163738.372 TIMER_OMP_GET_WTIME FORTRAN77 version Demonstrate the OMP_GET_WTIME timer. omp_get_wtime ( ) is an OpenMP function. It returns elapsed wall clock time in seconds. Number of processors is 2 Number of threads requested = 2 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 524288 Number of repetitions of the operation: 5 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000086 0.000055 0.000053 0.000055 0.000055 8192 0.000137 0.000106 0.000105 0.000104 0.000105 16384 0.000271 0.000208 0.000208 0.000210 0.000208 32768 0.000535 0.000420 0.000416 0.000427 0.000425 65536 0.001087 0.000841 0.000835 0.000848 0.000843 131072 0.002251 0.001719 0.001859 0.001725 0.001782 262144 0.004454 0.003517 0.003569 0.003517 0.003503 524288 0.009202 0.007033 0.007135 0.007090 0.006980 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000062 0.000064 0.000062 0.000061 0.000063 8192 0.000129 0.000123 0.000122 0.000122 0.000200 16384 0.000239 0.000238 0.000246 0.000237 0.000240 32768 0.000478 0.000534 0.000475 0.000471 0.000472 65536 0.000957 0.000955 0.000943 0.000949 0.000957 131072 0.002008 0.001943 0.002074 0.002045 0.001935 262144 0.003998 0.004053 0.003968 0.003926 0.003864 524288 0.007727 0.007955 0.007788 0.007899 0.007982 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000148 0.000128 0.000128 0.000128 0.000128 8192 0.000263 0.000257 0.000257 0.000259 0.000262 16384 0.000515 0.000575 0.000513 0.000508 0.000508 32768 0.001018 0.001011 0.001022 0.001011 0.001020 65536 0.002041 0.002034 0.002051 0.002041 0.002035 131072 0.004107 0.004151 0.004169 0.004233 0.004225 262144 0.008450 0.008370 0.008318 0.008332 0.008320 524288 0.016720 0.016811 0.016613 0.016827 0.016692 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 4096 0.000385 0.000322 0.000322 0.000322 0.000323 8192 0.000650 0.000648 0.000648 0.000647 0.000647 16384 0.001326 0.001292 0.001296 0.001290 0.001297 32768 0.002598 0.002599 0.002652 0.002584 0.002643 65536 0.005175 0.005172 0.005169 0.005235 0.005171 131072 0.010914 0.010432 0.010504 0.010500 0.010486 262144 0.021131 0.021211 0.021069 0.021200 0.020987 524288 0.042251 0.042241 0.042175 0.041917 0.041903 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 524288 Number of repetitions of the operation: 5 Timing results: Vector Size Rep #1 Rep #2 Rep #3 Rep #4 Rep #5 1024 0.000070 0.000026 0.000025 0.000025 0.000025 2048 0.000049 0.000049 0.000049 0.000049 0.000050 4096 0.000095 0.000099 0.000098 0.000097 0.000102 8192 0.000196 0.000198 0.000195 0.000194 0.000204 16384 0.000398 0.000473 0.000389 0.000371 0.000420 32768 0.000768 0.000772 0.000874 0.000768 0.000832 65536 0.001715 0.001555 0.001637 0.001491 0.001643 131072 0.003229 0.003258 0.003321 0.003249 0.003140 262144 0.006376 0.006455 0.006621 0.006496 0.006293 524288 0.012810 0.013190 0.013174 0.013107 0.013547 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 = 256 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.000005 0.000004 0.000004 0.000003 0.000003 16 0.000135 0.000131 0.000128 0.000128 0.000126 64 0.007697 0.007461 0.007530 0.007473 0.007334 TIMER_OMP_GET_WTIME Normal end of execution. 20080710 163740.206