      program example4b
      include 'mpif.h'
      integer ierr, rank, len, i, NTIMES
      parameter (NTIMES = 100)
      character*(MPI_MAX_PROCESSOR_NAME) name
      double precision time_start, time_finish, tick
      call MPI_INIT(ierr)
      call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
      call MPI_GET_PROCESSOR_NAME(name, len, ierr)
      tick = MPI_WTICK(ierr)
      time_start = MPI_WTIME(ierr)
      do i = 1, NTIMES
         time_finish = MPI_WTIME(ierr)
      end do
      print *, 'processor ', name(1:len),
     &         ', process ', rank, ': tick = ', tick,
     &         ', time = ', (time_finish-time_start)/NTIMES
      call MPI_FINALIZE(ierr)
      end
