200 likes | 296 Views
On Parallel Computation o f exp(x) based on Master-Worker Paradigm. Keiichi Shiraishi (Kagawa N.C.T.) Yoshiro Imai (Kagawa University). Welcome to Japan Welcome to Takuma Campus I’m looking forward to discussing on Computer Science. BACKGROUNDS. Processors : Clock up --> Multi-core
E N D
On Parallel Computation of exp(x)based onMaster-Worker Paradigm Keiichi Shiraishi (Kagawa N.C.T.) Yoshiro Imai (Kagawa University)
Welcome to Japan Welcome to Takuma Campus I’m looking forward to discussing on Computer Science.
BACKGROUNDS • Processors : Clock up --> Multi-core • Multi-core processors are not expensive. • Core i7, Cell, GPU, etc. • PC clusters, Super Computers and Cloud Computing are a kind of parallel computing. • Using multi-core processors effectively is important. • Teaching materials for parallel computing And… • My research area : Computer Algebra System, e-Learning and Instructional Design
CONTENTS Parallel computation of exp(x) Embarassingly parallel computation and Master-worker paradigm How to compute/parallelize exp(x) Algorithms Experiments Discussions Conclusion
EMBARASSINGLY PARALLEL COMPUTATIONS • Embarassingly parallel computations - no dependency or communication exists between parallel tasks • Master-worker paradigm is suitable. Tasks Results Computing/Processing
NUMERICAL APPROXIMATION OF exp(x) Worker 1 Worker 2 Worker 3 Worker M Equation (3) will be divided to M groups of terms and allocated them to each worker process.
NUMERICAL APPROXIMATION OF exp(x) In these group, the last terms of the former groups are appeared in the coefficient of the following other groups, e.g. xL-1/(L-1)! is appeared in all groups.
TEST-BED OF EXPERIMENTS Number of Workers 1~8 Compute with multiple precision integer/rational numbers (very slow)
ELAPSED TIME (exp(1), N=1000) Communicaton time is needed. Number of workers increases. Number of digits of return value decreses. Parallel Sequential
MAXIMUM NUMBER OF DIGITS OF NUMERATOR/DENOMINATOR OF RETURN VALUE FROM WORKERS If the number of digits is twice, it would needs 4 times multiplication.
DISCUSSIONS • From the viewpoint of numerical computation, a computation with N=1000 isn’t needed because one with about N=10 makes the results sufficient. • There are some numerical approach, e.g. C standard library’s exp(x), Stirling's approximation for n!. • For teaching material, this approach would be good because the tasks allocated each worker processes have some dependencies. It is more difficult than to compute the circle ratio.
CONCLUSIONS • Parallel computation of exp(x) is illustrated. • As number of worker processes increase, the completion time decreases. • As number of digits of numerator/denominator of return value from worker processes decrease, the completion time decreases. • Future works • Evaluation the problem as teaching material
NUMERICAL APPROXIMATION OF THE CIRCLE RATIO N=100, # of workers is 2. Tasks are independent each other. They can be allocated to 2 workers.
ELAPSED TIME (N=50,000,000) • Elapsed Time(Risa/Asir) • Elapsed Time(SPE Library) * Speedup ratio is the ratio of elapsed time with 1 worker to one with n workers.