Skip to content

Commit

Permalink
[prof] in gg_tt.mad dsample.f, add time profilers also in sample_put_…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
valassi committed Aug 10, 2024
1 parent daecabe commit e0ccc96
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions epochX/cudacpp/gg_tt.mad/Source/dsample.f
Original file line number Diff line number Diff line change
Expand Up @@ -1755,10 +1755,19 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
data fprb/maxfprb*1d0/
data jpnt,jplace /1,1/

LOGICAL FIRST
SAVE FIRST
DATA FIRST/.TRUE./
c-----
c Begin Code
c-----

IF ( FIRST ) THEN
CALL COUNTERS_REGISTER_COUNTER( 6, 'Fortran I/O'//char(0) ) ! null-terminated C-string (maybe not needed but it does not harm)
FIRST=.FALSE.
ENDIF
CALL COUNTERS_START_COUNTER( 6, 1 ) ! FortranI/O=6

if (first_time) then
first_time = .false.
twgt_it = 0d0
Expand Down Expand Up @@ -2288,6 +2297,7 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
call store_events(-1d0, .True.)
endif
cur_it = itm+2
CALL COUNTERS_STOP_COUNTER( 6 ) ! FortranI/O=6
return
endif
endif
Expand Down Expand Up @@ -2354,6 +2364,7 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
c 129 close(22)
tsigma = tsigma*sqrt(max(0d0,chi2)) !This gives the 68% confidence cross section
cur_it = itm+20
CALL COUNTERS_STOP_COUNTER( 6 ) ! FortranI/O=6
return
endif
endif
Expand Down Expand Up @@ -2395,6 +2406,7 @@ subroutine sample_put_point(wgt, point, iteration,ipole, allow_update)
endif
else
endif
CALL COUNTERS_STOP_COUNTER( 6 ) ! FortranI/O=6
end
subroutine none_pass(max_events)
Expand Down

0 comments on commit e0ccc96

Please sign in to comment.