program main
   use mpi
   integer rank, size, ierror, tag, status(MPI_STATUS_SIZE), len
   character*(MPI_MAX_PROCESSOR_NAME) name

   call MPI_INIT(ierror)
   call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror)
   call MPI_GET_PROCESSOR_NAME(name, len, ierror)
   print "('Hello from process ',I3,' on host ',A,'')", rank, trim(name)
   call MPI_FINALIZE(ierror)
 end

