Guest User

Untitled

a guest
Jul 18th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. program test
  2. include 'mpif.h'
  3.  
  4. integer ierr, tid, tmp
  5.  
  6. call MPI_INIT(ierr)
  7. call MPI_COMM_RANK(MPI_COMM_WORLD, tid, ierr)
  8.  
  9. tmp = tid
  10.  
  11. if(tid.eq.0) then
  12. call MPI_BCAST(tmp,1,MPI_INTEGER,MPI_ROOT,MPI_COMM_WORLD, ierr)
  13. else
  14.  
  15. endif
  16.  
  17. write(*,*) tid,'done'
  18. call MPI_FINALIZE(ierr)
  19.  
  20. end
  21.  
  22. 1 done 0
  23. 0 done 0
Add Comment
Please, Sign In to add comment