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

    array = 0
    CALL MPI_Init(error)
    CALL MPI_Comm_rank(MPI_COMM_WORLD,myrank,error)
    IF (myrank == root) THEN
        OPEN (11,FILE="Programs/integers.input",ACTION="READ")
        READ (11,*) array
        CLOSE(11)
    END IF

    CALL MPI_Bcast(array,size,MPI_INTEGER,root,MPI_COMM_WORLD,error)
    WRITE (*,"('Processor ',I0,' now has data',100(1X,I0))") myrank,array
    CALL MPI_Finalize(error)
END PROGRAM main
