c  Fragment of MPI input code
c  We have np processors, each dealing with the cube nx by ny by nzp=nz/np.
c  The number of input files is equal to the number of processors.
c  q(ii,i,j,k) contain data for each proccessor,
c    ii= 1) rho 2) vx*rho 3) vy*rho 4) vz*rho 5) Bx 6) By 7) Bz 8) En 
      character*50  tname 
      integer iunit,ii
      real*4 tmp_read(nx,ny,nzp)
c
      nstep=498
      write(tname,'(a1,i6.6,a1,a1,a1,i3.3)') 'R',nstep
     &,'Q','X','P',rank
      iunit=rank+20
      open (unit=iunit,file=tname,status='old',form='unformatted')
      do ii=1,8
      read(iunit) tmp_read
      do k=1,nzp
      do j=1,ny
      do i=1,nx
      q(ii,i,j,k)=tmp_read(i,j,k)
      enddo
      enddo
      enddo
      enddo  
      close(iunit)
      call MPI_BARRIER(MPI_COMM_WORLD,err)
c  End of fragment.
