-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcompute_pi_output.txt
107 lines (80 loc) · 3.97 KB
/
compute_pi_output.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
20 November 2007 12:21:58 PM
COMPUTE_PI
C++ version
Estimate the value of PI by summing a series.
This program includes Open MP directives, which
may be used to run the program in parallel.
The number of processors available:
OMP_GET_NUM_PROCS () = 1
Call OMP_SET_NUM_THREADS, and request 4 threads
This is process 0
Calling OMP_GET_NUM_THREADS inside a
parallel region, we get the number of
threads is 1.
R4_TEST:
Estimate the value of PI,
using single 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 9e-06
1 OMP 3.2 0.0584073 4e-06
10 SEQ 3.14243 0.000833273 5e-06
10 OMP 3.14243 0.000833273 4e-06
100 SEQ 3.1416 7.86781e-06 1e-05
100 OMP 3.1416 7.86781e-06 1e-05
1000 SEQ 3.14159 2.38419e-07 6.7e-05
1000 OMP 3.14159 2.38419e-07 6.6e-05
10000 SEQ 3.14159 1.90735e-06 0.000674
10000 OMP 3.14159 1.90735e-06 0.000628
100000 SEQ 3.14153 5.98431e-05 0.006508
100000 OMP 3.14153 5.98431e-05 0.006263
1000000 SEQ 3.14135 0.000244379 0.065411
1000000 OMP 3.14135 0.000244379 0.062539
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 4e-06
1 OMP 3.2 0.0584073 3e-06
10 SEQ 3.14243 0.000833331 3e-06
10 OMP 3.14243 0.000833331 3e-06
100 SEQ 3.1416 8.33333e-06 9e-06
100 OMP 3.1416 8.33333e-06 9e-06
1000 SEQ 3.14159 8.33333e-08 5.9e-05
1000 OMP 3.14159 8.33333e-08 5.5e-05
10000 SEQ 3.14159 8.33341e-10 0.000554
10000 OMP 3.14159 8.33341e-10 0.000529
100000 SEQ 3.14159 8.36842e-12 0.00553
100000 OMP 3.14159 8.36842e-12 0.005269
1000000 SEQ 3.14159 2.84217e-14 0.055102
1000000 OMP 3.14159 2.84217e-14 0.052648
10000000 SEQ 3.14159 6.21725e-14 0.551744
10000000 OMP 3.14159 6.21725e-14 0.526432
100000000 SEQ 3.14159 6.33271e-13 5.51182
100000000 OMP 3.14159 6.33271e-13 5.25891
1000000000 SEQ 3.14159 1.77636e-13 55.1052
1000000000 OMP 3.14159 1.77636e-13 52.6762
COMPUTE_PI
Normal end of execution.
20 November 2007 12:23:58 PM