Skip to content

Commit e0ccc96

Browse files
committed
[prof] in gg_tt.mad dsample.f, add time profilers also in sample_put_points
./build.none_d_inl0_hrd0/madevent_cpp < /tmp/avalassi/input_ggtt_x1_cudacpp [COUNTERS] PROGRAM TOTAL : 0.7442s [COUNTERS] Fortran Overhead ( 0 ) : 0.2437s [COUNTERS] CudaCpp MEs ( 2 ) : 0.0871s for 16384 events => throughput is 5.32E-06 events/s [COUNTERS] CudaCpp HEL ( 3 ) : 0.0008s [COUNTERS] Fortran X2F ( 4 ) : 0.0162s for 16399 events => throughput is 9.86E-07 events/s [COUNTERS] Fortran PDF ( 5 ) : 0.1335s for 98304 events => throughput is 1.36E-06 events/s [COUNTERS] Fortran I/O ( 6 ) : 0.2629s for 16399 events => throughput is 1.60E-05 events/s ./build.none_d_inl0_hrd0/madevent_cpp < /tmp/avalassi/input_ggtt_x10_cudacpp [COUNTERS] PROGRAM TOTAL : 1.9099s [COUNTERS] Fortran Overhead ( 0 ) : 0.3233s [COUNTERS] CudaCpp MEs ( 2 ) : 0.5203s for 98304 events => throughput is 5.29E-06 events/s [COUNTERS] CudaCpp HEL ( 3 ) : 0.0007s [COUNTERS] Fortran X2F ( 4 ) : 0.0956s for 98371 events => throughput is 9.71E-07 events/s [COUNTERS] Fortran PDF ( 5 ) : 0.7980s for 589824 events => throughput is 1.35E-06 events/s [COUNTERS] Fortran I/O ( 6 ) : 0.1719s for 98371 events => throughput is 1.75E-06 events/s
1 parent daecabe commit e0ccc96

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

epochX/cudacpp/gg_tt.mad/Source/dsample.f

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,10 +1755,19 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
17551755
data fprb/maxfprb*1d0/
17561756
data jpnt,jplace /1,1/
17571757

1758+
LOGICAL FIRST
1759+
SAVE FIRST
1760+
DATA FIRST/.TRUE./
17581761
c-----
17591762
c Begin Code
17601763
c-----
17611764

1765+
IF ( FIRST ) THEN
1766+
CALL COUNTERS_REGISTER_COUNTER( 6, 'Fortran I/O'//char(0) ) ! null-terminated C-string (maybe not needed but it does not harm)
1767+
FIRST=.FALSE.
1768+
ENDIF
1769+
CALL COUNTERS_START_COUNTER( 6, 1 ) ! FortranI/O=6
1770+
17621771
if (first_time) then
17631772
first_time = .false.
17641773
twgt_it = 0d0
@@ -2288,6 +2297,7 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
22882297
call store_events(-1d0, .True.)
22892298
endif
22902299
cur_it = itm+2
2300+
CALL COUNTERS_STOP_COUNTER( 6 ) ! FortranI/O=6
22912301
return
22922302
endif
22932303
endif
@@ -2354,6 +2364,7 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
23542364
c 129 close(22)
23552365
tsigma = tsigma*sqrt(max(0d0,chi2)) !This gives the 68% confidence cross section
23562366
cur_it = itm+20
2367+
CALL COUNTERS_STOP_COUNTER( 6 ) ! FortranI/O=6
23572368
return
23582369
endif
23592370
endif
@@ -2395,6 +2406,7 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
23952406
endif
23962407
else
23972408
endif
2409+
CALL COUNTERS_STOP_COUNTER( 6 ) ! FortranI/O=6
23982410
end
23992411
24002412
subroutine none_pass(max_events)

0 commit comments

Comments
 (0)