subroutine trmpi_ears(chbuf)

  ! 
  ! rank > 0 cpus LISTEN for instructions in unending loop
  !               execute received instructions -- see trmpi/trmpi_listener.f90

  ! this low level routine acts as "ears" for trmpi_listener caller:
  ! pick up MPI broadcast and return buffer for interpretation by caller

  ! for corresponding code see subroutine trmpi_requestor
  !               which is called by cpu rank=0 only

  ! Split from trmpi_listener, DMC, 24 May 2011
  !------------------------------------------------------------------
  !
  use trmpi
  use logmod
  implicit NONE

  character*(*) :: chbuf     ! CHAR buffer returned to caller
  integer       :: ierr777=777
  !------------------------------------------------

  integer      :: iertmp

  !-----------------------------------------------------

#ifdef __MPI
  call infoLog("trmpi_ears: call MPI_BCAST trmpi_comm=",trmpi_comm)
  call MPI_BCAST(chbuf, len(chbuf), MPI_CHARACTER, 0, trmpi_comm, iertmp)
  if(iertmp.ne.0) then
     write(0,*) ' ?trmpi_ears: MPI_BCAST status=',iertmp, &
          ' on cpu# ',trmpi_myid
     call MPI_ABORT(trmpi_comm,iertmp,ierr777)
     call bad_exit
  endif


  ! 07/22/2011 CLF: synch
  ! write(0,*) 'trmpi_ears: call MPI_BARRIER ',chbuf(1:len(chbuf))
  call infoLog("trmpi_ears: call MPI_BARRIER "//chbuf(1:len(chbuf)))
  call MPI_BARRIER(trmpi_comm, iertmp)
  if(iertmp.ne.0) then
     write(0,*) ' ?trmpi_ears: MPI_BARRIER status=',iertmp, &
          ' on cpu# ',trmpi_myid
     call MPI_ABORT(trmpi_comm,iertmp,ierr777)
     call bad_exit
  endif

 ! write(0,*) 'trmpi_ears: after call MPI_BARRIER ',chbuf(1:len(chbuf))

#endif
end subroutine trmpi_ears
