File indexing completed on 2024-04-06 12:28:25
0001
0002
0003 source xeon_scripts/init-env.sh
0004 source xeon_scripts/throughput-test-common.sh
0005
0006 ben_arch=${1}
0007
0008 if [[ "${ben_arch}" == "KNL" ]]
0009 then
0010 mOpt="-j 64"
0011 maxcore=64
0012 declare -a instruction_sets=(AVX512)
0013 declare -a thread_combo_arr=("1 1" "2 2" "4 4" "8 8" "16 16" "32 32" "64 64" "128 128" "256 256")
0014 elif [[ "${ben_arch}" == "SKL-SP" ]]
0015 then
0016 mOpt="-j 32"
0017 maxcore=32
0018 declare -a instruction_sets=(AVX512)
0019 declare -a thread_combo_arr=("1 1" "2 2" "4 4" "8 8" "16 16" "32 32" "64 64")
0020 elif [[ "${ben_arch}" == "LNX-G" ]]
0021 then
0022 mOpt="-j 32"
0023 maxcore=32
0024 declare -a instruction_sets=(AVX512)
0025 declare -a thread_combo_arr=("1 1" "2 2" "4 4" "8 8" "16 16" "32 32" "64 64")
0026 elif [[ "${ben_arch}" == "LNX-S" ]]
0027 then
0028 mOpt="-j 32"
0029 maxcore=32
0030 declare -a instruction_sets=(AVX512)
0031 declare -a thread_combo_arr=("1 1" "2 2" "4 4" "8 8" "16 16" "32 32" "64 64")
0032 else
0033 echo "${ben_arch} is not a valid architecture! Exiting..."
0034 exit
0035 fi
0036
0037
0038
0039 dir=/data2/slava77/samples/
0040 subdir=2021/11834.0_TTbar_14TeV+2021/AVE_50_BX01_25ns/
0041 file=memoryFile.fv6.default.211008-c6b7c67.bin
0042
0043 base_nevents=2000
0044
0045
0046 seeds="--cmssw-n2seeds"
0047 algo="--build-ce"
0048 opts="--silent --loop-over-file --remove-dup --use-dead-modules --backward-fit"
0049 base_exe="./mkFit/mkFit --input-file ${dir}/${subdir}/${file} ${seeds} ${algo} ${opts}"
0050
0051
0052 base_outname="throughput"
0053 output_file="${base_outname}_results.${ext}"
0054
0055
0056
0057
0058
0059
0060 for instruction_set in "${instruction_sets[@]}"
0061 do
0062
0063 make distclean
0064 make ${mOpt} ${!instruction_set}
0065
0066 echo "Ensuring the input file is fully in the memory caches"
0067 dd if=${dir}/${subdir}/${file} of=/dev/null bs=10M
0068 dd if=${dir}/${subdir}/${file} of=/dev/null bs=10M
0069 dd if=${dir}/${subdir}/${file} of=/dev/null bs=10M
0070 dd if=${dir}/${subdir}/${file} of=/dev/null bs=10M
0071
0072
0073 for thread_combo in "${thread_combo_arr[@]}"
0074 do echo "${thread_combo}" | while read -r nth nev
0075 do
0076
0077 ncore=${nth}
0078 nproc=$(( ${base_nevents} * ${ncore} ))
0079
0080
0081 test_label="${instruction_set}_${nth_label}${nth}_${nev_label}${nev}"
0082 echo "$(date) Running throughput test for: ${test_label}..."
0083
0084
0085 test_exe="${base_exe} --num-thr ${nth} --num-thr-ev ${nev}"
0086
0087
0088 tmp_output_file="${base_outname}_${test_label}.${tmp_ext}"
0089
0090
0091 MkFitThroughput "${test_exe}" "${nproc}" "1" "${tmp_output_file}"
0092 cat ${tmp_output_file}.* > ${tmp_output_file}
0093
0094
0095 AppendTmpFile "${tmp_output_file}" "${ncore}" "${nproc}" "1"
0096
0097
0098
0099 njob=${nth}
0100
0101
0102 test_label="${instruction_set}_${njob_label}${njob}"
0103 echo "$(date) Running throughput test for: ${test_label}..."
0104
0105
0106 test_exe="${base_exe} --num-thr 1 --num-thr-ev 1"
0107
0108
0109 tmp_output_file="${base_outname}_${test_label}.${tmp_ext}"
0110
0111
0112 MkFitThroughput "${test_exe}" "${base_nevents}" "${njob}" "${tmp_output_file}"
0113 cat ${tmp_output_file}.* > ${tmp_output_file}
0114
0115
0116 AppendTmpFile "${tmp_output_file}" "1" "${nproc}" "${njob}"
0117
0118 done
0119 done
0120
0121 done
0122
0123
0124
0125
0126
0127
0128 > "${output_file}"
0129 echo -e "Throughput test meta-data\n" >> "${output_file}"
0130 echo "ben_arch: ${ben_arch}" >> "${output_file}"
0131 echo "base_exe: ${base_exe}" >> "${output_file}"
0132 echo "base_nevents: ${base_nevents}" >> "${output_file}"
0133 echo -e "\nResults (events/s)\n" >> "${output_file}"
0134
0135
0136 for instruction_set in "${instruction_sets[@]}"
0137 do
0138
0139 for thread_combo in "${thread_combo_arr[@]}"
0140 do echo "${thread_combo}" | while read -r nth nev
0141 do
0142
0143 test_label="${instruction_set}_${nth_label}${nth}_${nev_label}${nev}"
0144 echo "Computing time for: ${test_label}"
0145
0146
0147 tmp_output_file="${base_outname}_${test_label}.${tmp_ext}"
0148
0149
0150 DumpIntoFileThroughput "${tmp_output_file}" "${output_file}"
0151
0152
0153 njob=${nth}
0154
0155 test_label="${instruction_set}_${njob_label}${njob}"
0156 echo "Computing time for: ${test_label}"
0157
0158
0159 tmp_output_file="${base_outname}_${test_label}.${tmp_ext}"
0160
0161
0162 DumpIntoFileThroughput "${tmp_output_file}" "${output_file}"
0163
0164 done
0165 done
0166 done
0167
0168
0169
0170
0171
0172 make distclean
0173
0174
0175
0176
0177
0178 echo "$(date) Finished throughput test!"