report Subroutine

subroutine report(spec, avg_time, avg_time_gather, avg_time_write, comm, rc)

Arguments

Type IntentOptional Attributes Name
type(ComboSpec), intent(in) :: spec
real, intent(in) :: avg_time
real, intent(in) :: avg_time_gather
real, intent(in) :: avg_time_write
integer, intent(in) :: comm
integer, intent(out), optional :: rc

Calls

proc~~report~3~~CallsGraph proc~report~3 report mpi_comm_rank mpi_comm_rank proc~report~3->mpi_comm_rank mpi_comm_size mpi_comm_size proc~report~3->mpi_comm_size proc~mapl_return MAPL_Return proc~report~3->proc~mapl_return proc~mapl_verify MAPL_Verify proc~report~3->proc~mapl_verify at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Called by

proc~~report~3~~CalledByGraph proc~report~3 report proc~run~21 run proc~run~21->proc~report~3 program~main~19 main program~main~19->proc~run~21

Source Code

   subroutine report(spec, avg_time, avg_time_gather, avg_time_write, comm, rc)
      type(ComboSpec), intent(in) :: spec
      real, intent(in) :: avg_time
      real, intent(in) :: avg_time_gather
      real, intent(in) :: avg_time_write

      integer, intent(in) :: comm
      integer, optional, intent(out) :: rc

      integer :: status
      integer :: rank
      integer :: npes
      integer :: group
      real :: bw_gb
      integer, parameter :: WORD=4

      call MPI_Comm_rank(comm, rank, status)
      _VERIFY(status)
      _RETURN_UNLESS(rank == 0)

      call MPI_Comm_size(MPI_COMM_WORLD, npes, status)
      _VERIFY(status)
      group = npes /spec%n_writers

      bw_gb = 1.e-9 * WORD * (spec%nx**2)*6*spec%n_levs / avg_time
      write(*,'(4(i6.0,","),4(f15.4,:,","))') spec%nx, spec%n_levs, spec%n_writers, group, avg_time, avg_time_gather, avg_time_write, bw_gb
 
      _RETURN(_SUCCESS)
   end subroutine report