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.71e-07 1 OMP 3.2 0.0584073 6.949e-06 10 SEQ 3.14243 0.000833331 1.29003e-07 10 OMP 3.14243 0.000833331 5.84005e-07 100 SEQ 3.1416 8.33333e-06 3.81995e-07 100 OMP 3.1416 8.33333e-06 1.214e-06 1000 SEQ 3.14159 8.33333e-08 3.083e-06 1000 OMP 3.14159 8.33333e-08 4.727e-06 10000 SEQ 3.14159 8.33341e-10 3.0148e-05 10000 OMP 3.14159 8.33341e-10 3.0705e-05 100000 SEQ 3.14159 8.36842e-12 0.000309454 100000 OMP 3.14159 8.36842e-12 0.000316902 1000000 SEQ 3.14159 2.84217e-14 0.00289789 1000000 OMP 3.14159 2.84217e-14 0.00288495 10000000 SEQ 3.14159 6.21725e-14 0.0269126 10000000 OMP 3.14159 6.21725e-14 0.0251658 100000000 SEQ 3.14159 6.33271e-13 0.254619 100000000 OMP 3.14159 6.33271e-13 0.25443 1000000000 SEQ 3.14159 1.77636e-13 2.4293 1000000000 OMP 3.14159 1.77636e-13 2.47197 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.11999e-07 1 OMP 3.2 0.0584073 4.2214e-05 10 SEQ 3.14243 0.000833331 1.02998e-07 10 OMP 3.14243 0.000833331 1.103e-06 100 SEQ 3.1416 8.33333e-06 3.10996e-07 100 OMP 3.1416 8.33333e-06 7.39994e-07 1000 SEQ 3.14159 8.33333e-08 2.489e-06 1000 OMP 3.14159 8.33333e-08 1.858e-06 10000 SEQ 3.14159 8.33341e-10 2.4434e-05 10000 OMP 3.14159 8.33336e-10 1.2746e-05 100000 SEQ 3.14159 8.36842e-12 0.000244025 100000 OMP 3.14159 8.35332e-12 0.000122696 1000000 SEQ 3.14159 2.84217e-14 0.0024615 1000000 OMP 3.14159 1.06137e-13 0.00122261 10000000 SEQ 3.14159 6.21725e-14 0.0239512 10000000 OMP 3.14159 1.29674e-13 0.0121482 100000000 SEQ 3.14159 6.33271e-13 0.246807 100000000 OMP 3.14159 1.16351e-13 0.12213 1000000000 SEQ 3.14159 1.77636e-13 2.42378 1000000000 OMP 3.14159 1.07914e-13 1.2374 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.06993e-07 1 OMP 3.2 0.0584073 0.000146715 10 SEQ 3.14243 0.000833331 1.08004e-07 10 OMP 3.14243 0.000833331 1.244e-06 100 SEQ 3.1416 8.33333e-06 3.12e-07 100 OMP 3.1416 8.33333e-06 1.082e-06 1000 SEQ 3.14159 8.33333e-08 2.484e-06 1000 OMP 3.14159 8.33333e-08 1.611e-06 10000 SEQ 3.14159 8.33341e-10 2.4479e-05 10000 OMP 3.14159 8.33331e-10 6.937e-06 100000 SEQ 3.14159 8.36842e-12 0.000244117 100000 OMP 3.14159 8.33333e-12 6.2042e-05 1000000 SEQ 3.14159 2.84217e-14 0.0024498 1000000 OMP 3.14159 8.21565e-14 0.000611914 10000000 SEQ 3.14159 6.21725e-14 0.0240159 10000000 OMP 3.14159 1.23457e-13 0.00620081 100000000 SEQ 3.14159 6.33271e-13 0.239319 100000000 OMP 3.14159 1.10578e-13 0.0621074 1000000000 SEQ 3.14159 1.77636e-13 2.46705 1000000000 OMP 3.14159 2.75335e-14 0.646589 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.03995e-07 1 OMP 3.2 0.0584073 0.000181099 10 SEQ 3.14243 0.000833331 1.23997e-07 10 OMP 3.14243 0.000833331 1.762e-06 100 SEQ 3.1416 8.33333e-06 4.53001e-07 100 OMP 3.1416 8.33333e-06 1.347e-06 1000 SEQ 3.14159 8.33333e-08 3.978e-06 1000 OMP 3.14159 8.33333e-08 1.88201e-06 10000 SEQ 3.14159 8.33341e-10 3.936e-05 10000 OMP 3.14159 8.33333e-10 6.824e-06 100000 SEQ 3.14159 8.36842e-12 0.0003932 100000 OMP 3.14159 8.332e-12 5.7317e-05 1000000 SEQ 3.14159 2.84217e-14 0.00393727 1000000 OMP 3.14159 7.81597e-14 0.000564555 10000000 SEQ 3.14159 6.21725e-14 0.0290959 10000000 OMP 3.14159 1.06581e-14 0.00590007 100000000 SEQ 3.14159 6.33271e-13 0.257057 100000000 OMP 3.14159 2.22045e-14 0.0582563 1000000000 SEQ 3.14159 1.77636e-13 2.49369 1000000000 OMP 3.14159 2.44249e-14 0.581432 COMPUTE_PI Normal end of execution.