Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to activate coverity for simgrid
[simgrid.git] / examples / smpi / NAS / common / print_results.f
1
2       subroutine print_results(name, class, n1, n2, n3, niter, 
3      >               nprocs_compiled, nprocs_total,
4      >               t, mops, optype, verified, npbversion, 
5      >               compiletime, cs1, cs2, cs3, cs4, cs5, cs6, cs7)
6       
7       implicit none
8       character*2 name
9       character*1 class
10       integer n1, n2, n3, niter, nprocs_compiled, nprocs_total, j
11       double precision t, mops
12       character optype*24, size*15
13       logical verified
14       character*(*) npbversion, compiletime, 
15      >              cs1, cs2, cs3, cs4, cs5, cs6, cs7
16
17          write (*, 2) name 
18  2       format(//, ' ', A2, ' Benchmark Completed.')
19
20          write (*, 3) Class
21  3       format(' Class           = ', 12x, a12)
22
23 c   If this is not a grid-based problem (EP, FT, CG), then
24 c   we only print n1, which contains some measure of the
25 c   problem size. In that case, n2 and n3 are both zero.
26 c   Otherwise, we print the grid size n1xn2xn3
27
28          if ((n2 .eq. 0) .and. (n3 .eq. 0)) then
29             if (name(1:2) .eq. 'EP') then
30                write(size, '(f15.0)' ) 2.d0**n1
31                j = 15
32                if (size(j:j) .eq. '.') j = j - 1
33                write (*,42) size(1:j)
34  42            format(' Size            = ',9x, a15)
35             else
36                write (*,44) n1
37  44            format(' Size            = ',12x, i12)
38             endif
39          else
40             write (*, 4) n1,n2,n3
41  4          format(' Size            =  ',9x, i4,'x',i4,'x',i4)
42          endif
43
44          write (*, 5) niter
45  5       format(' Iterations      = ', 12x, i12)
46          
47          write (*, 6) t
48  6       format(' Time in seconds = ',12x, f12.2)
49          
50          write (*,7) nprocs_total
51  7       format(' Total processes = ', 12x, i12)
52          
53          write (*,8) nprocs_compiled
54  8       format(' Compiled procs  = ', 12x, i12)
55
56          write (*,9) mops
57  9       format(' Mop/s total     = ',12x, f12.2)
58
59          write (*,10) mops/float( nprocs_total )
60  10      format(' Mop/s/process   = ', 12x, f12.2)        
61          
62          write(*, 11) optype
63  11      format(' Operation type  = ', a24)
64
65          if (verified) then 
66             write(*,12) '  SUCCESSFUL'
67          else
68             write(*,12) 'UNSUCCESSFUL'
69          endif
70  12      format(' Verification    = ', 12x, a)
71
72          write(*,13) npbversion
73  13      format(' Version         = ', 12x, a12)
74
75          write(*,14) compiletime
76  14      format(' Compile date    = ', 12x, a12)
77
78
79          write (*,121) cs1
80  121     format(/, ' Compile options:', /, 
81      >          '    MPIF77       = ', A)
82
83          write (*,122) cs2
84  122     format('    FLINK        = ', A)
85
86          write (*,123) cs3
87  123     format('    FMPI_LIB     = ', A)
88
89          write (*,124) cs4
90  124     format('    FMPI_INC     = ', A)
91
92          write (*,125) cs5
93  125     format('    FFLAGS       = ', A)
94
95          write (*,126) cs6
96  126     format('    FLINKFLAGS   = ', A)
97
98          write(*, 127) cs7
99  127     format('    RAND         = ', A)
100         
101          write (*,130)
102  130     format(//' Please send the results of this run to:'//
103      >            ' NPB Development Team '/
104      >            ' Internet: npb@nas.nasa.gov'/
105      >            ' '/
106      >            ' If email is not available, send this to:'//
107      >            ' MS T27A-1'/
108      >            ' NASA Ames Research Center'/
109      >            ' Moffett Field, CA  94035-1000'//
110      >            ' Fax: 650-604-3957'//)
111
112
113          return
114          end
115