COMPUTE_PI C++/OpenMP version Estimate the value of PI by summing a series. Number of processors available = 8 Number of threads = 1 R8_TEST: Estimate the value of PI, using double arithmetic. N = number of terms computed and added; MODE = SEQ for sequential code; MODE = OMP for Open MP enabled code; (performance depends on whether Open MP is used, and how many processes are available) ESTIMATE = the computed estimate of PI; ERROR = ( the computed estimate - PI ); TIME = elapsed wall clock time; Note that you can''t increase N forever, because: A) ROUNDOFF starts to be a problem, and B) maximum integer size is a problem. N Mode Estimate Error Time 1 SEQ 3.2 0.0584073 1.77999e-07 1 OMP 3.2 0.0584073 6.844e-06 10 SEQ 3.14243 0.000833331 1.44006e-07 10 OMP 3.14243 0.000833331 6.49015e-07 100 SEQ 3.1416 8.33333e-06 3.63973e-07 100 OMP 3.1416 8.33333e-06 9.93023e-07 1000 SEQ 3.14159 8.33333e-08 2.97802e-06 1000 OMP 3.14159 8.33333e-08 4.71604e-06 10000 SEQ 3.14159 8.33341e-10 2.9163e-05 10000 OMP 3.14159 8.33341e-10 2.9752e-05 100000 SEQ 3.14159 8.36842e-12 0.000291302 100000 OMP 3.14159 8.36842e-12 0.000298811 1000000 SEQ 3.14159 2.84217e-14 0.00288895 1000000 OMP 3.14159 2.84217e-14 0.00279253 10000000 SEQ 3.14159 6.21725e-14 0.0265716 10000000 OMP 3.14159 6.21725e-14 0.0251481 100000000 SEQ 3.14159 6.33271e-13 0.250034 100000000 OMP 3.14159 6.33271e-13 0.258608 1000000000 SEQ 3.14159 1.77636e-13 2.51491 1000000000 OMP 3.14159 1.77636e-13 2.401 COMPUTE_PI Normal end of execution. COMPUTE_PI C++/OpenMP version Estimate the value of PI by summing a series. Number of processors available = 8 Number of threads = 2 R8_TEST: Estimate the value of PI, using double arithmetic. N = number of terms computed and added; MODE = SEQ for sequential code; MODE = OMP for Open MP enabled code; (performance depends on whether Open MP is used, and how many processes are available) ESTIMATE = the computed estimate of PI; ERROR = ( the computed estimate - PI ); TIME = elapsed wall clock time; Note that you can''t increase N forever, because: A) ROUNDOFF starts to be a problem, and B) maximum integer size is a problem. N Mode Estimate Error Time 1 SEQ 3.2 0.0584073 2.06986e-07 1 OMP 3.2 0.0584073 7.1781e-05 10 SEQ 3.14243 0.000833331 8.89995e-08 10 OMP 3.14243 0.000833331 9.94012e-07 100 SEQ 3.1416 8.33333e-06 3.00992e-07 100 OMP 3.1416 8.33333e-06 7.10017e-07 1000 SEQ 3.14159 8.33333e-08 2.42802e-06 1000 OMP 3.14159 8.33333e-08 1.76899e-06 10000 SEQ 3.14159 8.33341e-10 2.38e-05 10000 OMP 3.14159 8.33336e-10 1.245e-05 100000 SEQ 3.14159 8.36842e-12 0.00024318 100000 OMP 3.14159 8.35332e-12 0.000119736 1000000 SEQ 3.14159 2.84217e-14 0.00238238 1000000 OMP 3.14159 1.06137e-13 0.00130694 10000000 SEQ 3.14159 6.21725e-14 0.0237529 10000000 OMP 3.14159 1.29674e-13 0.0120759 100000000 SEQ 3.14159 6.33271e-13 0.238652 100000000 OMP 3.14159 1.16351e-13 0.120216 1000000000 SEQ 3.14159 1.77636e-13 2.46725 1000000000 OMP 3.14159 1.07914e-13 1.26209 COMPUTE_PI Normal end of execution. COMPUTE_PI C++/OpenMP version Estimate the value of PI by summing a series. Number of processors available = 8 Number of threads = 4 R8_TEST: Estimate the value of PI, using double arithmetic. N = number of terms computed and added; MODE = SEQ for sequential code; MODE = OMP for Open MP enabled code; (performance depends on whether Open MP is used, and how many processes are available) ESTIMATE = the computed estimate of PI; ERROR = ( the computed estimate - PI ); TIME = elapsed wall clock time; Note that you can''t increase N forever, because: A) ROUNDOFF starts to be a problem, and B) maximum integer size is a problem. N Mode Estimate Error Time 1 SEQ 3.2 0.0584073 2.06986e-07 1 OMP 3.2 0.0584073 0.000149504 10 SEQ 3.14243 0.000833331 8.89995e-08 10 OMP 3.14243 0.000833331 1.245e-06 100 SEQ 3.1416 8.33333e-06 3.16009e-07 100 OMP 3.1416 8.33333e-06 1.07003e-06 1000 SEQ 3.14159 8.33333e-08 2.48803e-06 1000 OMP 3.14159 8.33333e-08 1.50403e-06 10000 SEQ 3.14159 8.33341e-10 2.8001e-05 10000 OMP 3.14159 8.33331e-10 7.16199e-06 100000 SEQ 3.14159 8.36842e-12 0.000244078 100000 OMP 3.14159 8.33333e-12 6.2089e-05 1000000 SEQ 3.14159 2.84217e-14 0.00244552 1000000 OMP 3.14159 8.26006e-14 0.000774522 10000000 SEQ 3.14159 6.21725e-14 0.0258873 10000000 OMP 3.14159 1.23457e-13 0.00637866 100000000 SEQ 3.14159 6.33271e-13 0.255479 100000000 OMP 3.14159 1.10578e-13 0.0623537 1000000000 SEQ 3.14159 1.77636e-13 2.39257 1000000000 OMP 3.14159 2.75335e-14 0.642626 COMPUTE_PI Normal end of execution. COMPUTE_PI C++/OpenMP version Estimate the value of PI by summing a series. Number of processors available = 8 Number of threads = 8 R8_TEST: Estimate the value of PI, using double arithmetic. N = number of terms computed and added; MODE = SEQ for sequential code; MODE = OMP for Open MP enabled code; (performance depends on whether Open MP is used, and how many processes are available) ESTIMATE = the computed estimate of PI; ERROR = ( the computed estimate - PI ); TIME = elapsed wall clock time; Note that you can''t increase N forever, because: A) ROUNDOFF starts to be a problem, and B) maximum integer size is a problem. N Mode Estimate Error Time 1 SEQ 3.2 0.0584073 1.05007e-07 1 OMP 3.2 0.0584073 0.000191488 10 SEQ 3.14243 0.000833331 1.36963e-07 10 OMP 3.14243 0.000833331 1.846e-06 100 SEQ 3.1416 8.33333e-06 4.61005e-07 100 OMP 3.1416 8.33333e-06 1.27999e-06 1000 SEQ 3.14159 8.33333e-08 3.99299e-06 1000 OMP 3.14159 8.33333e-08 1.974e-06 10000 SEQ 3.14159 8.33341e-10 3.9367e-05 10000 OMP 3.14159 8.33333e-10 6.66204e-06 100000 SEQ 3.14159 8.36842e-12 0.000399029 100000 OMP 3.14159 8.33156e-12 5.7563e-05 1000000 SEQ 3.14159 2.84217e-14 0.00400717 1000000 OMP 3.14159 7.77156e-14 0.000564624 10000000 SEQ 3.14159 6.21725e-14 0.0312703 10000000 OMP 3.14159 1.06581e-14 0.00577434 100000000 SEQ 3.14159 6.33271e-13 0.260157 100000000 OMP 3.14159 2.22045e-14 0.0588226 1000000000 SEQ 3.14159 1.77636e-13 2.5101 1000000000 OMP 3.14159 2.44249e-14 0.573868 COMPUTE_PI Normal end of execution.