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.91001e-07 1 OMP 3.2 0.0584073 5.328e-06 10 SEQ 3.14243 0.000833331 1.11002e-07 10 OMP 3.14243 0.000833331 6.17001e-07 100 SEQ 3.1416 8.33333e-06 3.82002e-07 100 OMP 3.1416 8.33333e-06 1.037e-06 1000 SEQ 3.14159 8.33333e-08 3.081e-06 1000 OMP 3.14159 8.33333e-08 4.992e-06 10000 SEQ 3.14159 8.33341e-10 3.016e-05 10000 OMP 3.14159 8.33341e-10 3.0726e-05 100000 SEQ 3.14159 8.36842e-12 0.000301032 100000 OMP 3.14159 8.36842e-12 0.000303144 1000000 SEQ 3.14159 2.84217e-14 0.00299247 1000000 OMP 3.14159 2.84217e-14 0.00284173 10000000 SEQ 3.14159 6.21725e-14 0.0248494 10000000 OMP 3.14159 6.21725e-14 0.0236823 100000000 SEQ 3.14159 6.33271e-13 0.235805 100000000 OMP 3.14159 6.33271e-13 0.237099 1000000000 SEQ 3.14159 1.77636e-13 2.37566 1000000000 OMP 3.14159 1.77636e-13 2.37296 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 3.98999e-07 1 OMP 3.2 0.0584073 6.9934e-05 10 SEQ 3.14243 0.000833331 1.25001e-07 10 OMP 3.14243 0.000833331 1.187e-06 100 SEQ 3.1416 8.33333e-06 4.83997e-07 100 OMP 3.1416 8.33333e-06 8.94994e-07 1000 SEQ 3.14159 8.33333e-08 2.443e-06 1000 OMP 3.14159 8.33333e-08 1.763e-06 10000 SEQ 3.14159 8.33341e-10 2.3795e-05 10000 OMP 3.14159 8.33336e-10 1.256e-05 100000 SEQ 3.14159 8.36842e-12 0.000322842 100000 OMP 3.14159 8.35332e-12 0.000144801 1000000 SEQ 3.14159 2.84217e-14 0.00246748 1000000 OMP 3.14159 1.06137e-13 0.00122735 10000000 SEQ 3.14159 6.21725e-14 0.0243124 10000000 OMP 3.14159 1.29674e-13 0.0124093 100000000 SEQ 3.14159 6.33271e-13 0.240689 100000000 OMP 3.14159 1.16351e-13 0.122262 1000000000 SEQ 3.14159 1.77636e-13 2.3853 1000000000 OMP 3.14159 1.07914e-13 1.23106 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 1.70003e-07 1 OMP 3.2 0.0584073 0.000197209 10 SEQ 3.14243 0.000833331 1.11999e-07 10 OMP 3.14243 0.000833331 1.278e-06 100 SEQ 3.1416 8.33333e-06 3.09999e-07 100 OMP 3.1416 8.33333e-06 8.68e-07 1000 SEQ 3.14159 8.33333e-08 2.489e-06 1000 OMP 3.14159 8.33333e-08 1.459e-06 10000 SEQ 3.14159 8.33341e-10 2.4445e-05 10000 OMP 3.14159 8.33331e-10 6.931e-06 100000 SEQ 3.14159 8.36842e-12 0.000244063 100000 OMP 3.14159 8.33333e-12 7.9451e-05 1000000 SEQ 3.14159 2.84217e-14 0.00249429 1000000 OMP 3.14159 8.21565e-14 0.000618056 10000000 SEQ 3.14159 6.21725e-14 0.0257019 10000000 OMP 3.14159 1.23457e-13 0.00701746 100000000 SEQ 3.14159 6.33271e-13 0.271758 100000000 OMP 3.14159 1.10578e-13 0.0645396 1000000000 SEQ 3.14159 1.77636e-13 2.48251 1000000000 OMP 3.14159 2.75335e-14 0.632428 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 2.78997e-07 1 OMP 3.2 0.0584073 0.000210184 10 SEQ 3.14243 0.000833331 1.20999e-07 10 OMP 3.14243 0.000833331 1.893e-06 100 SEQ 3.1416 8.33333e-06 4.62998e-07 100 OMP 3.1416 8.33333e-06 1.406e-06 1000 SEQ 3.14159 8.33333e-08 3.972e-06 1000 OMP 3.14159 8.33333e-08 1.955e-06 10000 SEQ 3.14159 8.33341e-10 3.9358e-05 10000 OMP 3.14159 8.33333e-10 6.698e-06 100000 SEQ 3.14159 8.36842e-12 0.000393264 100000 OMP 3.14159 8.33156e-12 5.7447e-05 1000000 SEQ 3.14159 2.84217e-14 0.00394097 1000000 OMP 3.14159 7.81597e-14 0.000575387 10000000 SEQ 3.14159 6.21725e-14 0.0314221 10000000 OMP 3.14159 1.06581e-14 0.00671694 100000000 SEQ 3.14159 6.33271e-13 0.265194 100000000 OMP 3.14159 2.17604e-14 0.0618827 1000000000 SEQ 3.14159 1.77636e-13 2.53131 1000000000 OMP 3.14159 2.4869e-14 0.572399 COMPUTE_PI Normal end of execution.