35 #include "qrm_common.h"
72 real(kind(1.d0)) :: start, stop
75 real(kind(1.d0)),
save :: timezero, start, stop
76 integer,
parameter :: maxevents=15000, maxtypes=20, maxth=32
77 logical,
save :: pendings(0:maxth-1)
78 real(kind(1.d0)),
save :: starts(0:maxth-1), stops(0:maxth-1), ttimes(1:maxtypes)
81 character(len=20),
save :: labels(maxtypes)
82 integer,
save :: nevtype, nodeid
83 integer,
save :: nevents(0:maxth-1)
84 character(len=7) :: colors(maxtypes)
96 allocate(events(0:maxth-1,maxevents))
97 colors(1:7) = (/
'#d38d5f',
'#ffdd55',
'#8dd35f',
'#80b3ff',
'#e580ff',
'#ac9d93',
'#bcd35f'/)
106 character :: label*(*)
120 if(pendings(thn))
then
121 __qrm_prnt_err(
'("Tracing error!!! events nesting not supported")')
124 pendings(thn) = .true.
133 nevents(thn) = nevents(thn)+1
134 events(thn, min(nevents(thn),maxevents)) =
event_type(id, thn, starts(thn)-timezero, stops(thn)-timezero)
135 ttimes(id) = ttimes(id)+stops(thn)-starts(thn)
136 pendings(thn) = .false.
144 character :: ofile*(*)
147 real(kind(1.d0)) :: tottime
148 real(kind(1.d0)),
parameter :: h=20.d0, scale=10000
150 open(4, file=ofile, action=
'write')
154 do j=1, min(nevents(
i),maxevents)
155 write(4,
'("<rect style=""fill:",a7,";stroke:#000000;stroke-width:0;fill-opacity:1""&
156 & height=""",f5.1,""" width=""",f10.2""" y=""",f10.2,""" x=""",f10.2,""" />")')&
157 & colors(events(
i,j)%id), h, &
158 & (events(
i,j)%stop-events(
i,j)%start)*scale, &
160 &
real(h)*
real(maxth-i), events(
i,j)%start*scale
164 tottime = sum(ttimes)
167 write(4,
'("<text x=""0"" y=""",f10.2,""" font-size=""",i3,""" fill=""",a7,""">",a20," -- ",f4.1,"%</text>")')&
168 &
real(h)*
real(maxth+i+2),floor(h),colors(
i),labels(
i),(ttimes(
i)/tottime)*100
171 write(4,
'("</svg>")')
This module contains all the error management routines and data.
This module contains all the facilities for visualizing the execution profile of a parallel code...
This module contains the interfaces of all non-typed routines.
Generic interface for the ::qrm_swtime routine.