! -------------------------------------------------------------
      subroutine x_rdat_c(msgtype,nproc,tids)
! -------------------------------------------------------------
      use x_gdat

      implicit none
      include 'fpvm3.h'
      integer :: i,j,k
      integer :: info
      integer :: msgtype
      integer :: nproc
      integer, dimension(0:32) :: tids 
      integer :: who
      external fbuff

      do i= 1,nproc
         call pvmfrecv( -1, msgtype, info )
         call pvmfunpack( integer4, who, 1, 1, info )
         call pvmfunpack( integer4, rcv_c, 1, 1, info )
         k= 1+rcv_c*(who)
         call pvmfunpack( real8, r8_frm_c(k), rcv_c, 1, info )
         write(1,*) 'rcv from =',who
      enddo

      end


