subroutine report(spec, avg_time, std_time, comm, rc)
type(BW_BenchmarkSpec), intent(in) :: spec
real, intent(in) :: avg_time
real, intent(in) :: std_time
integer, intent(in) :: comm
integer, optional, intent(out) :: rc
integer :: status
real :: packet_gb
real :: total_gb
real :: bw
integer :: npes
integer :: rank
integer, parameter :: WORD_SIZE = 4
integer(kind=INT64) :: packet_size
call MPI_Comm_size(comm, npes, status)
_VERIFY(status)
call MPI_Comm_rank(comm, rank, status)
_VERIFY(status)
_RETURN_UNLESS(rank == 0)
packet_size = int(spec%nx,kind=INT64)**2 * 6 * spec%n_levs / spec%n_writers
packet_gb = 1.e-9*(WORD_SIZE * packet_size)
total_gb = packet_gb * npes
bw = total_gb / avg_time
call MPI_Comm_size(comm, npes, status)
_VERIFY(status)
write(*,'(3(1x,i9.0,","),6(f15.4,:,","))') &
spec%nx, spec%n_levs, spec%n_writers, &
total_gb, packet_gb, avg_time, bw, bw/npes, std_time/avg_time
_RETURN(_SUCCESS)
end subroutine report