! ------------------------------------------------------------ !
      subroutine x_ridat_p(msgtype,envstring,pname,nints,ints)
! ------------------------------------------------------------ !
! Purpose: Receive initial data from parent
! ------------------------------------------------------------ !
      use x_gpvm_p
      use x_gdat

      implicit none
      include 'fpvm3.h'
      integer :: i
      integer :: msgtype
      integer :: nints
      integer, dimension(0:32) :: ints 
      integer, parameter :: slen=30
      character(len=2)  :: pname 
      character(len=30) :: fname
      character(len=slen) :: mycomp
      character(len=4)  :: strng = '_std'
      character(len=70) :: envstring

      external fbuff
      external getcompname
      external openf

      call pvmfmytid( mytid )
      call pvmfparent( mptid )

      write(cmytid,'(i10)') mytid
      cmytid=trim(adjustl(cmytid))
      
      fname=pname//strng//cmytid
      call openf( 1, fname, envstring)

      call getcompname(mycomp, slen)
      mycomp = trim(adjustl(mycomp))
      write(1,*) 'This computer =',mycomp
      write(1,*) 'mptid=',mptid
      write(1,*) 'msgtype=',msgtype
      call fbuff()
      call pvmfrecv( mptid, msgtype, info )
      write(1,*) 'pvmfrecv info=',info
      call fbuff()
      call pvmfunpack( integer4, nproc, 1, 1, info )
      call pvmfunpack( integer4, tids, nproc, 1, info )
      call pvmfunpack( integer4, nints, 1, 1, info )
      call pvmfunpack( integer4, ints, nints, 1, info )
      do i=0,nproc-1
         if(mytid.eq.tids(i)) me = i 
      enddo
      write(1,*) 'me=',me
      call fbuff()
      end
