PROGRAM main
    USE double
    USE mpi
    IMPLICIT NONE
    INTEGER :: nprocs, myrank, namelen, error
    CHARACTER(LEN=MPI_MAX_PROCESSOR_NAME) :: procname

    WRITE (*,"('MPI version: ',I1,'.',I1)") MPI_VERSION,MPI_SUBVERSION
    CALL MPI_Init(error)
    CALL MPI_Comm_size(MPI_COMM_WORLD,nprocs,error)
    CALL MPI_Comm_rank(MPI_COMM_WORLD,myrank,error)
    CALL MPI_Get_processor_name(procname,namelen,error)
    WRITE (*,"('This is process ',I1,' in a communicator of ',    &
            &    I1,' processes running on processor ',A)")    &
        myrank,nprocs,procname(1:namelen )
    CALL MPI_Finalize(error)
END PROGRAM main
