      PROGRAM broadcast
      INCLUDE 'mpif.h'
      INTEGER err, rank, size
      real param,param2
      CALL MPI_INIT(err)
      CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank, err)
      CALL MPI_COMM_SIZE(MPI_COMM_WORLD, size, err)
c      
      if(rank.eq.5) param=23.0
c      
c     /* works but DANGEROUS */
      if(rank.eq.0)then
         call MPI_BCAST(param2,1,MPI_REAL,5,MPI_COMM_WORLD,err)
      else
         call MPI_BCAST(param,1,MPI_REAL,5,MPI_COMM_WORLD,err)
      endif
c
      print *,'P:',rank,' after broadcast param is ',param,param2
c
      CALL MPI_FINALIZE(err)
      END
