      include 'mpif.h'
      integer,parameter :: numdat=100
      integer :: buf(numdat)
      call MPI_INIT(ierr)
      call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ierr)
      call MPI_COMM_SIZE(MPI_COMM_WORLD,nprocs,ierr)
      ist=((numdat-1)/nprocs+1)*myrank+1
      ied=((numdat-1)/nprocs+1)*(myrank+1)
      do i=ist,ied
        buf(i)=i
      enddo
      write(60+myrank,'(10I8)') (buf(i),i=ist,ied)
      call MPI_FINALIZE(ierr)
      stop
      end
