       Include 'mpif.h'
       Integer I, numtasks, rank,ierr
       Call MPI_INIT(ierr)
       CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank,ierr)
       CALL MPI_COMM_SIZE(MPI_COMM_WORLD, numtasks,ierr)
       If(rank.eq.0)then
       Sum=0.0
       Do i=0,1000
       Sum=sum+sin(i/10.0)
       Enddo
       Endif
       Call MPI_BARRIER(MPI_COMM_WORLD,ierr)
       CALL MPI_FINALIZE(ierr)
       end

