MPI_Bcast( - PowerPoint PPT Presentation

About This Presentation
Title:

MPI_Bcast(

Description:

MPI_Bcast( &data, count, type, root, comm ) Stephen Mahoney. Yana Novikova. Susan Lister. int data = 0; //initiate the data variable ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 4
Provided by: nob81
Category:
Tags: mpibcast | lister

less

Transcript and Presenter's Notes

Title: MPI_Bcast(


1
MPI_Bcast( data, count, type, root, comm )
  • Stephen Mahoney
  • Yana Novikova
  • Susan Lister

2
int data 0 //initiate the data variableif(
node 0 ) //have the root process take user
input scanf( d, data ) //user input will
be 5 in this example//broadcast the updated
variable value to the rest of the processes
MPI_Bcast( data, 1, MPI_INT, 0,
MPI_WORLD_COMM)
3
Proc0 Proc1 Proc2 Proc3 Proc4 Proc5 Proc6 Proc7
0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0
5 5 5 5 5 5 5 5
int data 0
scanf( d, data )
MPI_Bcast (data, 1, MPI_INT, 0, MPI_WORLD_COMM)
Write a Comment
User Comments (0)
About PowerShow.com