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 2.09999e-07 1 OMP 3.2 0.0584073 5.375e-06 10 SEQ 3.14243 0.000833331 2.22999e-07 10 OMP 3.14243 0.000833331 9.02e-07 100 SEQ 3.1416 8.33333e-06 1.756e-06 100 OMP 3.1416 8.33333e-06 2.246e-06 1000 SEQ 3.14159 8.33333e-08 1.6752e-05 1000 OMP 3.14159 8.33333e-08 1.7379e-05 10000 SEQ 3.14159 8.33341e-10 0.000167192 10000 OMP 3.14159 8.33341e-10 0.000169137 100000 SEQ 3.14159 8.36842e-12 0.00167123 100000 OMP 3.14159 8.36842e-12 0.00167343 1000000 SEQ 3.14159 2.84217e-14 0.0153829 1000000 OMP 3.14159 2.84217e-14 0.0149541 10000000 SEQ 3.14159 6.21725e-14 0.133901 10000000 OMP 3.14159 6.21725e-14 0.136101 100000000 SEQ 3.14159 6.33271e-13 1.35392 100000000 OMP 3.14159 6.33271e-13 1.3872 1000000000 SEQ 3.14159 1.77636e-13 13.7102 1000000000 OMP 3.14159 1.77636e-13 13.9748 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 1.12001e-07 1 OMP 3.2 0.0584073 5.5509e-05 10 SEQ 3.14243 0.000833331 1.85999e-07 10 OMP 3.14243 0.000833331 1.603e-06 100 SEQ 3.1416 8.33333e-06 1.482e-06 100 OMP 3.1416 8.33333e-06 1.79e-06 1000 SEQ 3.14159 8.33333e-08 1.4224e-05 1000 OMP 3.14159 8.33333e-08 8.122e-06 10000 SEQ 3.14159 8.33341e-10 0.000154404 10000 OMP 3.14159 8.33336e-10 8.4566e-05 100000 SEQ 3.14159 8.36842e-12 0.00163249 100000 OMP 3.14159 8.35332e-12 0.00102179 1000000 SEQ 3.14159 2.84217e-14 0.0152135 1000000 OMP 3.14159 1.06137e-13 0.00827308 10000000 SEQ 3.14159 6.21725e-14 0.144925 10000000 OMP 3.14159 1.29674e-13 0.0768477 100000000 SEQ 3.14159 6.33271e-13 1.35709 100000000 OMP 3.14159 1.16351e-13 0.728728 1000000000 SEQ 3.14159 1.77636e-13 13.7571 1000000000 OMP 3.14159 1.07914e-13 7.23154 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.08999e-07 1 OMP 3.2 0.0584073 0.00667992 10 SEQ 3.14243 0.000833331 3.47e-07 10 OMP 3.14243 0.000833331 3.103e-06 100 SEQ 3.1416 8.33333e-06 1.56e-06 100 OMP 3.1416 8.33333e-06 1.832e-06 1000 SEQ 3.14159 8.33333e-08 1.5139e-05 1000 OMP 3.14159 8.33333e-08 5.169e-06 10000 SEQ 3.14159 8.33341e-10 0.000164778 10000 OMP 3.14159 8.33331e-10 3.932e-05 100000 SEQ 3.14159 8.36842e-12 0.00150968 100000 OMP 3.14159 8.33333e-12 0.000384838 1000000 SEQ 3.14159 2.84217e-14 0.0150552 1000000 OMP 3.14159 8.21565e-14 0.00390771 10000000 SEQ 3.14159 6.21725e-14 0.137702 10000000 OMP 3.14159 1.23457e-13 0.0384065 100000000 SEQ 3.14159 6.33271e-13 1.38111 100000000 OMP 3.14159 1.10578e-13 0.400982 1000000000 SEQ 3.14159 1.77636e-13 13.7471 1000000000 OMP 3.14159 2.75335e-14 3.81766 COMPUTE_PI Normal end of execution.