1
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work
Performance Results of Running Parallel Applications on the - - PowerPoint PPT Presentation
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Performance Results of Running Parallel Applications on the InteGrade Edson Norberto C aceres, Henrique Mongelli, Leonardo Loureiro, Christiane
1
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work
2
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work
3
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work The BSP/CGM Model Implementations
4
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work The BSP/CGM Model Implementations
5
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The 0-1 Knapsack Problem The BSP/CGM Algorithm Experimental Results
6
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The 0-1 Knapsack Problem The BSP/CGM Algorithm Experimental Results
7
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The 0-1 Knapsack Problem The BSP/CGM Algorithm Experimental Results
p .
p + 1 . . i n p])
8
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The 0-1 Knapsack Problem The BSP/CGM Algorithm Experimental Results
9
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The 0-1 Knapsack Problem The BSP/CGM Algorithm Experimental Results
Input: (1) The number p of processors; (2) The number i of the processor, where 1 ≤ i ≤ p; and (3) The array w, the capacity of the knapsack W and subarray vi of size n
p , respectively.
Output: f (r, c) = max{f [r, c − w[r]] + v[r], f [r − 1, c]}, where 1 ≤ c ≤ W and (j − 1) n
p + 1 ≤ r ≤ j n p .
for 1 ≤ k ≤ p do if i = 1 then for (k − 1) W
p + 1 ≤ r ≤ k W p
and 1 ≤ c ≤ n
p do
compute f (r, c); end for send(Rk
i ,Pi+1);
end if if i = 1 then receive(Rk
i−1, Pi−1);
for (k − 1) W
p + 1 ≤ r ≤ k W p
and 1 ≤ c ≤ n
p do
compute f (r, c); end for if i = p then send(Rk
i ,Pi+1);
end if end if end for
P p−1
1
P p
2
P 2p−2
p
P p
p
P p−1
p
P k
i
P 0
1
P 1
1
P 1
2
P 2
1
P 2
2
P 2
3
W n
W p n p
Rk
i
10
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The 0-1 Knapsack Problem The BSP/CGM Algorithm Experimental Results
4096 × 1024 8192 × 2048 16384 × 4096 32768 × 8192 p I II I II I II I II 1 0.071 0.084 0.283 0.367 1.105 1.105 4.050 4.591 2 0.063 0.072 0.250 0.278 0.992 1.053 3.953 4.065 4 0.057 0.078 0.244 0.280 0.952 1.146 3.718 4.079 8 0.050
0.500 1.000 1.500 2.000 2.500 3.000 3.500 4.000 4.500 5.000 8 4 2 1 Time (s)
Cluster 4096 x 1024 Cluster 8192 x 2048 Cluster 16384 x 4096 Cluster 32768 x 8192 Grid 4096 x 1024 Grid 8192 x 2048 Grid 16384 x 4096 Grid 32768 x 8192
11
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The BSP/CGM Algorithm Experimental Results
12
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The BSP/CGM Algorithm Experimental Results
Input: (1) Sequences S1 of size m and S2 of size n; (2) Number of processors p; (3) Rank of processor i; (3) Each processor of rank i holds s1[0..m − 1] and s2[i ∗ (n/p)..(i + 1) ∗ (n/p)]. Output: Best local alignment between S1 and S2 matrix A(m+1, blockSize+1), matrix B(m+1, blockSize+1), matrix C(m+1, blockSize+1) blockSize ← n/p next ← i + 1 previous ← i − 1 col ← 1 for round ← 0 to p − 1 do col ← col + blockSize if i = 0 then receive (A[0, col..col + blockSize], previous) receive (B[0, col..col + blockSize], previous) receive (C[0, col..col + blockSize], previous) end if compute A[1..m, col..col + blockSize] compute B[1..m, col..col + blockSize] compute C[1..m, col..col + blockSize] if i = p − 1 then send (A[m, col..col + blockSize], next) send (B[m, col..col + blockSize], next) send (C[m, col..col + blockSize], next) end if end for
13
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work Introduction The BSP/CGM Algorithm Experimental Results
0.000 50.000 100.000 150.000 200.000 250.000 300.000 350.000 400.000 450.000 8 4 2 1 Time (s)
Cluster 4096 x 4096 Cluster 8192 x 8192 Cluster 16384 x 16384 Cluster 32768 x 32768 Grid 4096 x 4096 Grid 8192 x 8192 Grid 16384 x 16384 Grid 32768 x 32768
14
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work
15
Introduction The 0-1 Knapsack Problem Local Alignment Problem Conclusions and Future Work