PROGRAM main
    USE double
    USE mpi
    IMPLICIT NONE
    INTEGER, PARAMETER :: size = 5, root = 1
    INTEGER :: myrank, error
    TYPE :: Struct
        INTEGER :: index
        CHARACTER(LEN=4) :: name
    END TYPE Struct
    INTEGER, PARAMETER :: struct_size = 8    ! Yuck
    TYPE(Struct), DIMENSION(size) :: array

    array = Struct(0,"")

    CALL MPI_Init(error)
    CALL MPI_Comm_rank(MPI_COMM_WORLD,myrank,error)
    IF (myrank == root) THEN
        OPEN (11,FILE="Programs/structs.input",ACTION="READ")
        READ (11,*) array
        CLOSE(11)
    END IF
    CALL MPI_Bcast(array,struct_size*size,MPI_BYTE,root,    &
        MPI_COMM_WORLD,error)
    WRITE (*,"('Processor ',I0,' now has data ',100(I4,2X,A,','))")    &
        myrank,array
    CALL MPI_Finalize(error)
END PROGRAM main
