subroutine generate_report() character(:), allocatable :: report_lines(:) integer :: i character(1) :: empty(0) reporter = ProfileReporter(empty) call reporter%add_column(NameColumn(20)) call reporter%add_column(FormattedTextColumn('Inclusive','(f9.6)', 9, InclusiveColumn('MEAN'))) call reporter%add_column(FormattedTextColumn('% Incl','(f6.2)', 6, PercentageColumn(InclusiveColumn('MEAN'),'MAX'))) call reporter%add_column(FormattedTextColumn('Exclusive','(f9.6)', 9, ExclusiveColumn('MEAN'))) call reporter%add_column(FormattedTextColumn('% Excl','(f6.2)', 6, PercentageColumn(ExclusiveColumn('MEAN')))) call reporter%add_column(FormattedTextColumn(' Max Excl)','(f9.6)', 9, ExclusiveColumn('MAX'))) call reporter%add_column(FormattedTextColumn(' Min Excl)','(f9.6)', 9, ExclusiveColumn('MIN'))) call reporter%add_column(FormattedTextColumn('Max PE)','(1x,i5.5,1x)', 7, ExclusiveColumn('MAX_PE'))) call reporter%add_column(FormattedTextColumn('Min PE)','(1x,i5.5,1x)', 7, ExclusiveColumn('MIN_PE'))) report_lines = reporter%generate_report(t_prof) if (mapl_am_I_root()) then write(*,'(a)')'Final profile' write(*,'(a)')'=============' do i = 1, size(report_lines) write(*,'(a)') report_lines(i) end do write(*,'(a)') '' end if end subroutine generate_report