      subroutine rcvdat(n,m,lda,nb,a)
      integer j,n,m,lda,nb,nprocs,me,host, iseed(4)
      integer temp(4), neighbor0
      integer proc, mydone, mycols, mypanel
      real a(*)
      integer flag

      common /locn/ proc, mydone, mycols, mypanel

      data flag /0/

*     ** determine the number of processors allocated, along with
*     ** the node id number and the host id number

      call who0(nprocs,me,host)

*     ** receive general information from the host **

cj      if (flag.eq.0) then
      call bcast0 (temp,16,16000,host)
cj      flag = 1

      n   = temp(1)
      m   = temp(2)
      lda = temp(3)
*     ** need to comment out this temp(4) line if doing timings **
      nb  = temp(4)
cj      endif

*     iseed(1) = 617
*     iseed(2) = 1553
*     iseed(3) = 2191
*     iseed(4) = 3771

      iseed(1) = 1287
      iseed(2) = 405
      iseed(3) = 357
      iseed(4) = 1079

*     ** generate panels spinning random number seed for panels of other proc **

      mypanel = 0
      mycols = 0
      iproc = 0
      do 200 j=1,n,nb
	     jb = min (n-j+1,nb)
	     if (me.eq.iproc) then
		 call matgen(a(mypanel*lda*nb+1),lda,m,jb,iseed)
c  	 call printmat(a(mypanel*lda*nb+1),lda,jb,"a panel")
c	 if (me.eq.0) then
c	 call printmat(a(mypanel*lda*nb+1),lda,jb,"a panel")
c	 endif
	         mycols = mycols + jb
	         mypanel = mypanel + 1
	     else
                 call skip (m,jb,iseed)
	     endif
	     iproc = neighbor0(1,iproc)
  200 continue

      return
*
*     end of rcvdat .
*
      end
