MST(Minimum Spanning Tree Finding)

Professor : Chang-Biau Yang (楊昌彪)


Student : 8724607  Shu-yuan Lin (林淑媛)


Algorithm Use            Analysis

Question Disscuss       Source Program  

 

star.gif (226 個位元組)Algorithm Use

      Using   EREW  MST  Algorithm, each processor  process the same nodes (N = # of processors). Then each processor compair data parallel-ly, and using  Tree algorithm for global compair and broadcast. With time  complexity   O(n2/N).

 

star.gif (226 個位元組)Analysis

(1) Total cpu time for each # of processor and for each kind of data..

# of data

1processor

2processors

4processors

8processors

8

0.000051

0.003557

0.006938

0.764992

16

0.000133

0.007165

0.012769

0.025541

32

0.000473

0.013377

0.028382

0.043414

64

0.001791

0.028507

0.056765

0.089847

128

0.007153

0.065762

0.126125

0.215931

256

0.029348

0.253853

1.488897

5.715132

512

0.293649

0.660194

0.382702

17.230399

960

1.281751

1.842245

14.540853

30.636246

This is total Cpu time for doing find min-spin tree using MPI_Wtime( ) to get time.

         

  At this table, we see that mult-processores maybe not faster than 1-processor. And we don't draw the graph for this table,  since its data with large difference, and we cannot see the different when data small.

(2) Compair find local min node..

# of data

1processor

2processors

4processors

8processors

512

0.000280

0.000148

0.000148

0.000048

960

0.000503

0.000265

0.000147

0.000077

This is each time find local min node

   

wpe6F.jpg (12023 個位元組)

# of data

1cpu

2cpu

4cpu

8cpu

512

0.000006

0.000035

1.238035

1.453843

960

0.000006

0.000032

6.938306

5.771014

This is each time find global min node

   

wpe6E.jpg (14466 個位元組)

# of data

1cpu

2cpu

4cpu

8cpu

512

0.000004

0.000139

0.000183

0.00025

960

0.000004

0.000136

0.000189

0.000250

This is each time for broadcast global min node

 

wpe70.jpg (9519 個位元組)  

     At those tables and graphs, we see the each cpu send datas for compair and broadcast datas need much time. And our data-structure use file for input, It needs large size memory for store. So, In this case we cannot see the efficient of mult-processor. But, we still see that mult-processor can distract working.

 

star.gif (226 個位元組)Question Discuss

 

     Although SP2 with mult-processor, but each cpu with its own memory, not share the memory. Than, each time we need to broadcast datas to each processor and need wait each processor ready to send data, this step use time more than ten times of processor doing commands. Thus, if we can change data structure for saving our inilization data, maybe can saving more time.

star.gif (226 個位元組)Source Program

         hwork.c