PROGRAM main
    USE double
    USE mpi
    IMPLICIT NONE
    INTEGER, PARAMETER :: size = 5, root = 1
    INTEGER :: myrank, error
    REAL(KIND=DP), DIMENSION(size) :: array

    array = 0.0_DP

    CALL MPI_Init(error)
    CALL MPI_Comm_rank(MPI_COMM_WORLD,myrank,error)
    IF (myrank == root) THEN
        OPEN (11,FILE="Programs/reals.input",ACTION="READ")
        READ (11,*) array
        CLOSE(11)
    END IF
    CALL MPI_Bcast(array,size,MPI_DOUBLE_PRECISION,root,MPI_COMM_WORLD,error)
    WRITE (*,"('Processor ',I0,' now has data',100(1X,F0.3))") myrank,array
    CALL MPI_Finalize(error)
END PROGRAM main
