    PROGRAM MAIN
    IMPLICIT NONE
      include 'mpif.h'
      INTEGER :: IERR,MYID,NPROCS
      INTEGER :: STATUS
      CHARACTER(128) :: HNAME
      INTEGER(4) :: HOSTNM

      CALL MPI_INIT(IERR)
      CALL MPI_COMM_SIZE(MPI_COMM_WORLD,NPROCS,IERR)
      CALL MPI_COMM_RANK(MPI_COMM_WORLD,MYID,IERR)

      STATUS = HOSTNM(HNAME)
      IF (MYID==0) WRITE(*,'("NUMBER OF PROCESSES: ",I3)') NPROCS
      WRITE(*,'("HELLO WORLD! (MYID: ",I3,", HOST NAME: ",A10,")")') MYID,HNAME

      CALL MPI_FINALIZE(IERR)

    END PROGRAM MAIN
