Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-21 23:14:25

0001 #! /bin/bash
0002 
0003 ###########
0004 ## Input ##
0005 ###########
0006 
0007 dir=${1:-"benchmarks"}
0008 suite=${2:-"forPR"} # which set of benchmarks to run: full, forPR, forConf
0009 useARCH=${3:-0}
0010 whichcands=${4:-"build"}
0011 
0012 ###################
0013 ## Configuration ##
0014 ###################
0015 source xeon_scripts/common-variables.sh ${suite} ${useARCH}
0016 source xeon_scripts/init-env.sh
0017 
0018 ######################################
0019 ## Move Compute Performance Results ##
0020 ######################################
0021 
0022 # Move subroutine build benchmarks
0023 builddir="Benchmarks"
0024 mkdir -p ${dir}/${builddir}
0025 mkdir -p ${dir}/${builddir}/logx
0026 
0027 for ben_arch in "${arch_array[@]}"
0028 do
0029     for benchmark in TH VU
0030     do
0031         oBase=${ben_arch}_${sample}_${benchmark}
0032 
0033         mv ${oBase}_"time".png ${dir}/${builddir}
0034         mv ${oBase}_"speedup".png ${dir}/${builddir}
0035 
0036         mv ${oBase}_"time_logx".png ${dir}/${builddir}/logx
0037         mv ${oBase}_"speedup_logx".png ${dir}/${builddir}/logx
0038     done
0039 done
0040 
0041 # Move multiple events in flight plots
0042 meifdir="MultEvInFlight"
0043 mkdir -p ${dir}/${meifdir}
0044 mkdir -p ${dir}/${meifdir}/logx
0045 
0046 for ben_arch in "${arch_array[@]}" 
0047 do
0048     for build in "${meif_builds[@]}"
0049     do echo ${!build} | while read -r bN bO
0050         do
0051             oBase=${ben_arch}_${sample}_${bN}_"MEIF"
0052             
0053             mv ${oBase}_"time".png ${dir}/${meifdir}
0054             mv ${oBase}_"speedup".png ${dir}/${meifdir}
0055             
0056             mv ${oBase}_"time_logx".png ${dir}/${meifdir}/logx
0057             mv ${oBase}_"speedup_logx".png ${dir}/${meifdir}/logx
0058         done
0059     done
0060 done
0061 
0062 # Move plots from text dump
0063 dumpdir="PlotsFromDump"
0064 mkdir -p ${dir}/${dumpdir}
0065 mkdir -p ${dir}/${dumpdir}/diffs
0066 
0067 for build in "${text_builds[@]}"
0068 do echo ${!build} | while read -r bN bO
0069     do
0070         for var in nHits pt eta phi
0071         do
0072             mv ${sample}_${bN}_${var}.png ${dir}/${dumpdir}
0073             mv ${sample}_${bN}_"d"${var}.png ${dir}/${dumpdir}/diffs
0074         done
0075     done
0076 done
0077 
0078 ######################################
0079 ## Move Physics Performance Results ##
0080 ######################################
0081 
0082 # Make SimTrack Validation directories
0083 simdir=("SIMVAL_MTV" "SIMVAL_MTV_SEED")
0084 simval=("SIMVAL" "SIMVALSEED")
0085 
0086 for((i=0;i<${#simdir[@]};++i));do
0087 
0088 mkdir -p ${dir}/${simdir[i]}
0089 mkdir -p ${dir}/${simdir[i]}/logx
0090 mkdir -p ${dir}/${simdir[i]}/diffs
0091 mkdir -p ${dir}/${simdir[i]}/nHits
0092 mkdir -p ${dir}/${simdir[i]}/score
0093 
0094 # Move text file dumps for SimTrack Validation
0095 for build in "${val_builds[@]}"
0096 do echo ${!build} | while read -r bN bO
0097     do
0098         vBase=${val_arch}_${sample}_${bN}
0099         mv "validation"_${vBase}_${simval[i]}/"totals_validation"_${vBase}_${simval[i]}.txt ${dir}/${simdir[i]}
0100     done
0101 done
0102 
0103 # Move dummy CMSSW text file (SimTrack Validation)
0104 vBase=${val_arch}_${sample}_CMSSW
0105 mv validation_${vBase}_${simval[i]}/totals_validation_${vBase}_${simval[i]}.txt ${dir}/${simdir[i]}
0106 
0107 # Move rate plots for SimTrack Validation
0108 for rate in eff ineff_brl ineff_trans ineff_ec dr fr
0109 do
0110     for pt in 0p0 0p9 2p0
0111     do
0112         for var in phi eta nLayers
0113         do 
0114             mv ${val_arch}_${sample}_${rate}_${var}_${whichcands}_"pt"${pt}_${simval[i]}.png ${dir}/${simdir[i]}
0115         done
0116     done
0117 
0118     # only copy pt > 0 for pt rate plots
0119     for var in pt pt_zoom
0120     do 
0121         mv ${val_arch}_${sample}_${rate}_${var}_${whichcands}_"pt0p0"_${simval[i]}.png ${dir}/${simdir[i]}
0122     done
0123 
0124     mv ${val_arch}_${sample}_${rate}_"pt_logx"_${whichcands}_"pt0p0"_${simval[i]}.png ${dir}/${simdir[i]}/logx
0125 done
0126 
0127 # Move kinematic diff plots for SimTrack Validation
0128 for coll in bestmatch allmatch
0129 do 
0130     for var in nHits invpt phi eta
0131     do
0132         for pt in 0p0 0p9 2p0
0133         do
0134             mv ${val_arch}_${sample}_${coll}_"d"${var}_${whichcands}_"pt"${pt}_${simval[i]}.png ${dir}/${simdir[i]}/diffs
0135         done
0136     done
0137 done
0138 
0139 # Move track quality plots for SimTrack Validation (nHits,score)
0140 for coll in allreco fake bestmatch allmatch
0141 do 
0142     for pt in 0p0 0p9 2p0
0143     do
0144         for qual in nHits score
0145         do
0146             mv ${val_arch}_${sample}_${coll}_${qual}_${whichcands}_"pt"${pt}_${simval[i]}.png ${dir}/${simdir[i]}/${qual}
0147         done
0148     done
0149 done
0150 done
0151 
0152 # Final message
0153 echo "Finished collecting benchmark plots into ${dir}!"