      SUBROUTINE WRITE_MPI_I(NSEND,NRECV,NSR,IUO,itag) 
C Bernd Berg Nov 10 2007. Prints label and up to 7 integers in order.
      implicit real*8 (a-h,o-z)
      implicit logical (l)
      PARAMETER(IZERO=0,ZERO=0.D00,HALF=0.5D00,ONE=1.D00)
      INCLUDE 'mpif.h'
      DIMENSION NSEND(NSR),NRECV(NSR)
      COMMON /FOR_MPI/ ISTATUS(MPI_STATUS_SIZE)
      IF(NSR.GT.7.OR.IZERO.NE.0) THEN
        CALL MPI_FINALIZE(IERR)
      STOP "WRITE_MPI_I: NSR.GT.7.OR.IZERO.NE.0"
      ENDIF
      CALL MPI_COMM_RANK(MPI_COMM_WORLD,MY_ID,IERR)
      CALL MPI_COMM_SIZE(MPI_COMM_WORLD,N_PROC,IERR)
      IF(MY_ID.EQ.0) WRITE(IUO,*) "  "
      DO I=0,(N_PROC-1)
        IF(MY_ID.EQ.I) CALL MPI_SEND(NSEND,NSR,MPI_INTEGER,IZERO,ITAG,
     &                               MPI_COMM_WORLD,IERR)
        IF(MY_ID.EQ.0) THEN 
           CALL MPI_RECV(NRECV,NSR,MPI_INTEGER,I,ITAG,
     &                               MPI_COMM_WORLD,ISTATUS,IERR)
           WRITE(IUO,'(8I9)') I,NRECV
        END IF
      END DO
      RETURN
      END
