output_results Subroutine

public subroutine output_results(state)

Uses

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(gs2_program_state_type), intent(inout) :: state

Contents

Source Code


Source Code

  subroutine output_results(state)
    use mp, only: proc0
    implicit none
    type(gs2_program_state_type), intent(inout) :: state
    character(len=*), parameter :: formt =  &
         '(A10," ",A10," ",A10," ",A6," ",A6," ",A1," ",A1," ",A1," ",A1," ",A1,&
         &" ",A1," ",A1," ",A1," ",A1," ",A1," ",A1," ",A1," ",A7)'
    character(len=*), parameter :: bk = '               '
    character(len=*), parameter :: ul = '---------------'
    character(len=*), parameter :: h1 = "GS2 Timing"
    character(len=*), parameter :: h2 = "Data      "
    character(len=*), parameter :: h3 = " Est. Rel."
    character(len=*), parameter :: ha = " Est. Max."
    character(len=*), parameter :: h4 = "Timing Err"
    character(len=*), parameter :: h5 = " %        "
    character(len=6) :: er
    character(len=6) :: em
    integer :: i,n, ou

    ou = state%optim%outunit

    write(er, "(F6.2)") state%optim%timing_rel_error * 100.0
    write(em, "(F6.2)") state%optim%timing_max_rel_error * 100.0


    if (proc0) then

       write(ou,formt)h1,h2,bk,bk,bk,'o', bk, bk, bk, bk, bk, bk, bk,'d','f', bk, bk,bk
       write(ou,formt)h3,h4,er,h5,bk,'p', bk, bk,'l', bk, bk, bk,'f','|','l', bk, bk,bk
       write(ou,formt)ha,h4,em,h5,bk,'t', bk, bk,'o', bk, bk, bk,'i','s','o', bk,'f',bk
       write(ou,formt)bk,bk,bk,bk,bk,'|', bk, bk,'c', bk, bk,'i','e','m','c', bk,'i',bk
       write(ou,formt)bk,bk,bk,bk,bk,'r', bk, bk,'a','o','i','n','l','a','|', bk,'e',bk
       write(ou,formt)bk,bk,bk,bk,bk,'e', bk, bk,'l','p','n','t','d','r','a', bk,'l',bk
       write(ou,formt)bk,bk,bk,bk,bk,'d','|','|','|','t','t','s','|','t','l', bk,'d',bk
       write(ou,formt)bk,bk,bk,bk,bk,'i','p','o','f','|','m','p','s','|','l', bk,'|',bk
       write(ou,formt)bk,bk,bk,bk,bk,'s','e','v','|','s','o','e','u','u','r', bk,'o',bk
       write(ou,formt)bk,bk,bk,bk,bk,'t','r','e','s','o','m','c','b','p','e', bk,'p',bk
       write(ou,formt)bk,bk,bk,bk,bk,'|','s','r','o','u','|','|','g','d','d','|','t',bk
       write(ou,formt)bk,bk,bk,bk,bk,'n','i','l','l','r','s','s','a','a','u','s','i',bk
       write(ou,formt)bk,bk,bk,bk,bk,'b','s','a','v','c','u','u','t','t','c','u','o',bk
       write (ou, formt) &
            'wallclocktime', 'efficiency', 'cost', 'nproc', 'layout', &
            'k','t','p','e','e','b','b','h','e','e','b','n',&
            'minnrow'
       write (ou,formt) ul, ul, ul, ul, ul, ul, ul, ul, ul, ul, ul, ul, ul, ul,&
            ul, ul, ul, ul

       n = size(state%optim%sorted_results)
       do i = 1,n
          call write_summary(state%optim%outunit,&
               state%optim%sorted_results(i), &
               state%optim%sorted_optimisations(i))
       end do
    end if

  end subroutine output_results