From 5e9000f7a408cfc43ae1e060bd81efaeadceba0c Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Mon, 19 Aug 2024 22:26:33 +0200 Subject: [PATCH] [cmsdy] in dsample.f of pp_dy3j.mad P0_gux_taptamggux (also copied to gg_tt.mad), comment out dead if/then branches (for warnings that are commented out) This is another minor component of #969. It gives almost insignificant performance improvements, but it simplifies the code. CUDACPP_RUNTIME_DISABLEFPE=1 ./build.cuda_d_inl0_hrd0/madevent_cuda < /tmp/avalassi/input_dy3j_x1_cudacpp [COUNTERS] PROGRAM TOTAL : 4.1574s [COUNTERS] Fortran Other ( 0 ) : 0.1706s [COUNTERS] Fortran Initialise(I/O) ( 1 ) : 0.0670s [COUNTERS] Fortran Random2Momenta ( 3 ) : 2.8950s for 1170103 events => throughput is 2.47E-06 events/s [COUNTERS] Fortran PDFs ( 4 ) : 0.1021s for 49152 events => throughput is 2.08E-06 events/s [COUNTERS] Fortran UpdateScaleCouplings ( 5 ) : 0.1360s for 16384 events => throughput is 8.30E-06 events/s [COUNTERS] Fortran Reweight ( 6 ) : 0.0518s for 16384 events => throughput is 3.16E-06 events/s [COUNTERS] Fortran Unweight(LHE-I/O) ( 7 ) : 0.0679s for 16384 events => throughput is 4.15E-06 events/s [COUNTERS] Fortran SamplePutPoint ( 8 ) : 0.1401s for 1170103 events => throughput is 1.20E-07 events/s [COUNTERS] CudaCpp Initialise ( 11 ) : 0.4658s [COUNTERS] CudaCpp Finalise ( 12 ) : 0.0263s [COUNTERS] CudaCpp MEs ( 19 ) : 0.0347s for 16384 events => throughput is 2.12E-06 events/s [COUNTERS] OVERALL NON-MEs ( 21 ) : 4.1227s [COUNTERS] OVERALL MEs ( 22 ) : 0.0347s for 16384 events => throughput is 2.12E-06 events/s --- epochX/cudacpp/gg_tt.mad/Source/dsample.f | 10 +++++----- epochX/cudacpp/pp_dy3j.mad/Source/dsample.f | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/Source/dsample.f b/epochX/cudacpp/gg_tt.mad/Source/dsample.f index 98f35352fa..af7859b51e 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/dsample.f +++ b/epochX/cudacpp/gg_tt.mad/Source/dsample.f @@ -1349,10 +1349,10 @@ subroutine sample_get_x(wgt, x, j, ipole, xmin, xmax) call ntuple(ddum(j),max(xbin_min,dble(int(tx(2,j)))), $ min(xbin_max,dble(int(tx(2,j))+1)),j,ipole) - if(max(xbin_min,dble(int(tx(2,j)))).gt. - $ min(xbin_max,dble(int(tx(2,j))+1))) then +c if(max(xbin_min,dble(int(tx(2,j)))).gt. +c $ min(xbin_max,dble(int(tx(2,j))+1))) then c write(*,*) 'not good' - endif +c endif c write(*,'(2i6,4e15.5)') nzoom,j,ddum(j),tx(2,j), c $ max(xbin_min,dble(int(tx(2,j)))), @@ -1426,10 +1426,10 @@ subroutine sample_get_x(wgt, x, j, ipole, xmin, xmax) endif icount=icount+1 endif - if (x .lt. xmin .or. x .gt. xmax) then +c if (x .lt. xmin .or. x .gt. xmax) then c write(*,'(a,4i4,2f24.16,1e10.2)') 'Bad x',ij,int(xbin_min),ip, c & int(xbin_max),xmin,x,xmax-xmin - endif +c endif wgt = wgt * xo * dble(xbin_max-xbin_min) c print*,'Returning x',ij,ipole,j,x diff --git a/epochX/cudacpp/pp_dy3j.mad/Source/dsample.f b/epochX/cudacpp/pp_dy3j.mad/Source/dsample.f index 98f35352fa..af7859b51e 100644 --- a/epochX/cudacpp/pp_dy3j.mad/Source/dsample.f +++ b/epochX/cudacpp/pp_dy3j.mad/Source/dsample.f @@ -1349,10 +1349,10 @@ subroutine sample_get_x(wgt, x, j, ipole, xmin, xmax) call ntuple(ddum(j),max(xbin_min,dble(int(tx(2,j)))), $ min(xbin_max,dble(int(tx(2,j))+1)),j,ipole) - if(max(xbin_min,dble(int(tx(2,j)))).gt. - $ min(xbin_max,dble(int(tx(2,j))+1))) then +c if(max(xbin_min,dble(int(tx(2,j)))).gt. +c $ min(xbin_max,dble(int(tx(2,j))+1))) then c write(*,*) 'not good' - endif +c endif c write(*,'(2i6,4e15.5)') nzoom,j,ddum(j),tx(2,j), c $ max(xbin_min,dble(int(tx(2,j)))), @@ -1426,10 +1426,10 @@ subroutine sample_get_x(wgt, x, j, ipole, xmin, xmax) endif icount=icount+1 endif - if (x .lt. xmin .or. x .gt. xmax) then +c if (x .lt. xmin .or. x .gt. xmax) then c write(*,'(a,4i4,2f24.16,1e10.2)') 'Bad x',ij,int(xbin_min),ip, c & int(xbin_max),xmin,x,xmax-xmin - endif +c endif wgt = wgt * xo * dble(xbin_max-xbin_min) c print*,'Returning x',ij,ipole,j,x