      subroutine rcvdat(n,m,lda,nb,a)
      integer j,n,m,lda,nb,nprocs,me,host, iseed(4)
      integer temp(4), neighbor0
      integer iproc, 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 **

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

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

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

*     ** 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,j)
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
