      SUBROUTINE WRITE_MPI_D04(SEND,RECV,NSR,IUO,ITAG)
C Bernd Berg Nov 14 2008. Prints label and up to 4 real*8 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 SEND(NSR),RECV(NSR)
      COMMON /FOR_MPI/ ISTATUS(MPI_STATUS_SIZE)
      IF(NSR.GT.4.OR.IZERO.NE.0) THEN
        CALL MPI_FINALIZE(IERR)
      STOP "WRITE_MPI_D04: NSR.GT.4.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,'(/,I6,4G16.8)') IZERO,SEND
      DO I=1,(N_PROC-1)
        IF(MY_ID.EQ.I) CALL MPI_SEND(SEND,NSR,MPI_DOUBLE_PRECISION,
     &                              IZERO,ITAG,MPI_COMM_WORLD,IERR)
        IF(MY_ID.EQ.0) THEN
           CALL MPI_RECV(RECV,NSR,MPI_DOUBLE_PRECISION,I,ITAG,
     &                            MPI_COMM_WORLD,ISTATUS,IERR)
           WRITE(IUO,'(I6,4G16.8)') I,RECV
        END IF
      END DO
      RETURN
      END