13.07.2015 Views

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ISBN: 978-972-8939-25-0 © 2010 IADIS4. PRACTICAL PARALLEL CALCULATION AND EVALUATIONThis section describes our practical parallel programming and shows a real result for execution of parallelprograms based on master-worker paradigm. We know that a value of the circle ratio can be computed bymeans of the following definite integration (3) shown below.=1 4∫1 + xdxπ0 2 -- (3)The real numerical value will be obtained through calculation of the equation (3) by the way of numericalintegration based on the following approximation (4) shown below,∑ − 11 N 4π ≈2 -- (4)N i = 0 1 + (( i + 0.5) / N )where N is a division number for integration interval 0,1][ of the equation (3). Users had better choose alarger number as N in order to obtain a more precise result for the above numerical integration.Such a calculation can be realized with description of “i” related loop operation, namely iterationprocedure about control variable of “i”. We can achieve practical parallel programming by means ofapplication of each loop operation into the worker process which has been explained in the previous section.In the other words, such a situation is suitable enough to satisfy Amdahl's law with efficient parallelizationratio. We will expect to achieve good speedup-improvement for parallelization in the case of parallelcalculation for numerical integration of circle ratio based on master-worker paradigm.In order to make certain of speedup improvement for calculation through parallel programming, we haveapplied N = 50,000, 000 to numerical integration of circle ratio expressed in the approximation (4). Atfirst, we have computed it with the computer algebra system Risa/Asir. Our test-bed PC has a CPU chip with4 processor cores so that we can select parallel programming with the master-worker based parallelcalculation from one worker process to four. Table 1 shows result of elapsed time for the above parallelcalculation.Table 1. Elapsed time for parallel calculation by the computer algebra system (Risa/Asir)Numbers of worker processElapsed time for calculation Speedup (Improvement) for(second)only one worker's case1 37.902 1.00023419.62713.78711.0561.9312.7493.428Secondly, we have computed the approximation (4) with PLAYSTATION3. The Cell B.E. ofPLAYSTATION3 has seven sets of SPEs, but SPE library of it can handle only six sets of SPEs. So we canselect the same (but not identical) way of parallel programming from one worker to six. Table 2 showsanother result of elapsed time for such parallel calculation.Table 2. Elapsed time for parallel calculation by Cell B.E. with SPE library on Sony-produced PLAYSTATION3Numbers of worker processElapsed time for calculation Speedup (Improvement) for(second)only one worker's case1 6.037 1.000234563.0232.0191.5181.2171.0171.9972.9903.9774.9615.936From comparison of Table 1 and 2, it is confirmed that elapsed times of calculation by the computeralgebra system Risa/Asir are fairly larger than ones by the Cell B.E. with SPE library on PLAYSTATION3.So the former is suitable for symbolic and/or algebraic computation, while the latter is efficient for numerical260

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!