diff --git a/coremark_pro/coremark_pro_run b/coremark_pro/coremark_pro_run index 0fdf220..1cfa0d2 100755 --- a/coremark_pro/coremark_pro_run +++ b/coremark_pro/coremark_pro_run @@ -23,7 +23,7 @@ # coremark_pro_version="v1.1.2743" commit="none" -test_name_run="coremark_pro" +test_name="coremark_pro" arguments="$@" exit_out() @@ -103,8 +103,8 @@ $curdir/test_tools/gather_data ${curdir} pull_data() { pro_file=`mktemp /tmp/pro_reduce_data.XXXXX` - test_name=${1} - grep "^${test_name}" coremark_pro_run* | cut -d':' -f2 > ${pro_file} + sub_test_name=${1} + grep "^${sub_test_name}" coremark_pro_run* | cut -d':' -f2 > ${pro_file} multicore=0.0 singlecore=0.0 scaling=0.0 @@ -123,7 +123,7 @@ pull_data() multicore=`echo "${multicore}/${iterations}" | bc -l` singlecore=`echo "${singlecore}/${iterations}" | bc -l` scaling=`echo "${scaling}/${iterations}" | bc -l` - printf "%-47s %10.2f %10.2f %10.2f\n" $test_name $multicore $singlecore $scaling >> $summary_file + printf "%-47s %10.2f %10.2f %10.2f\n" $sub_test_name $multicore $singlecore $scaling >> $summary_file } produce_summary_report() @@ -155,8 +155,8 @@ produce_summary_report() if [[ ${line} == "CoreMark"* ]]; then found=0 fi - test_name=`echo $line | awk '{print $1}'` - pull_data $test_name + sub_test_name=`echo $line | awk '{print $1}'` + pull_data $sub_test_name continue fi if [[ $line == "------"* ]]; then @@ -168,12 +168,13 @@ produce_summary_report() generate_csv_file() { + start_time="${1}" + end_time="${2}" # # Create the csv file. # - $TOOLS_BIN/test_header_info --front_matter --results_file results.csv --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $coremark_pro_version --test_name $test_name - echo Test:Multi iterations:Single Iterations:Scaling >> results.csv + $TOOLS_BIN/test_header_info --front_matter --results_file results.csv --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $coremark_pro_version --test_name $test_name --field_header "Test,Multi iterations,Single Iterations,Scaling" items="^cjpeg-rose7-preset ^core ^linear_alg-mid-100x100-sp ^loops-all-mid-10k-sp ^nnet_test ^parser-125k ^radix2-big-64k ^sha-test ^zip-test" for i in $items; do multi_iter=0.0 @@ -194,22 +195,25 @@ generate_csv_file() single_iter=`echo "scale = 2;$single_iter / ${samples}.00" | bc -l` scaling=`echo "scale = 2;$scaling / ${samples}.00" | bc -l` name=`echo $i | sed "s/\^//g"` - echo $name:$multi_iter:$single_iter:$scaling >> results.csv + data_string=$(build_data_string "${name}" "${multi_iter}" "${single_iter}" "${scaling}" "${start_time}" "${end_time}") + echo "${data_string}" >> results.csv done } save_results() { value=`grep CoreMark-PRO coremark_pro.summary | head -1` - value_out=`echo $value | cut -d' ' -f2,3 | sed "s/ /:/g"` - echo "Score:${value_out}" >> results.csv + value_out1=`echo $value | cut -d' ' -f2` + value_out2=`echo $value | cut -d' ' -f3` + data_string=$(build_data_string "Score" "${value_out1}" "${value_out2}" "0" "0" "${start_time}" "${end_time}") + echo "$data_string" >> results.csv grep -q ":::" results.csv if [ $? -eq 0 ]; then echo Failed > test_results_report else echo Ran > test_results_report fi - ${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --other_files "$summary_file,coremark_pro_run*,test_results_report" --results results.csv --test_name coremark_pro --tuned_setting $to_tuned_setting --version $coremark_pro_version --user $to_user + ${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --other_files "$summary_file,coremark_pro_run*,test_results_report" --results results.csv --test_name $test_name --tuned_setting $to_tuned_setting --version $coremark_pro_version --user $to_user } # @@ -261,6 +265,27 @@ update_build_options() popd >/dev/null } +record_pcp_results() +{ + test="$1" + results=$2 + multi=$3 + + metric_name=`echo "${test}" | sed "s/-//g" | sed "s/ //g" | awk '{print $1}'` + # + # Only if we have results for the test. + # + grep -q "^${test}" $results + if [[ $? -eq 0 ]]; then + if [[ $multi -eq 1 ]]; then + value=`grep "^${test}" $results | awk '{print $2}'` + else + value=`grep "^${test}" $results | awk '{print $3}'` + fi + results2pcp_add_value "${metric_name}:${value}" + fi +} + run_coremark_pro() { if [ ! -d coremark-pro ]; then @@ -286,6 +311,15 @@ run_coremark_pro() if [ $to_use_pcp -eq 1 ]; then source $TOOLS_BIN/pcp/pcp_commands.inc + # + # Create the openmetrics file. + # + rm -f ${run_dir}/openmetrics_coremark_pro_reset.txt + while IFS= read -r line + do + metric=`echo $line | sed "s/-//g"` + echo "${metric} NaN" >> ${run_dir}/openmetrics_coremark_pro_reset.txt + done < "${run_dir}/openmetrics_coremark_pro_base.txt" setup_pcp pcp_cfg=$TOOLS_BIN/pcp/default.cfg pcp_dir=/tmp/pcp_coremark-pro_$(date +%Y.%m.%d-%H.%M.%S) @@ -311,38 +345,74 @@ run_coremark_pro() fi numb_cpus=`cat /proc/cpuinfo | grep processor | wc -l` for iter in $(seq 1 1 $to_times_to_run); do - #If we're using PCP, snap a chalk line at the start of the iteration and log the run number if [[ $to_use_pcp -eq 1 ]]; then - start_pcp_subset - result2pcp iteration ${run_number} + start_pcp_subset + result2pcp iteration ${iter} fi - + start_time=$(retrieve_time_stamp) make_flags="TARGET=linux64 XCMD=-c${numb_cpus} certify-all" padded_iter=$(format_iteration_number $iter $to_times_to_run) make -s $make_flags > coremark_pro_run_${padded_iter} if [ $? -ne 0 ]; then exit_out "Run failed, make $make_flags" 1 fi - - # If we're using PCP, snap the chalk line at the end of the iteration + end_time=$(retrieve_time_stamp) + # + # If record the results. + # if [[ $to_use_pcp -eq 1 ]]; then - stop_pcp_subset + # + # Single first + # + results2pcp_add_value "iteration:${iter}" + results2pcp_add_value "multicore:0" + while IFS= read -r line + do + record_pcp_results "$line" coremark_pro_run_${iter} 0 + done < "${run_dir}/openmetrics_coremark_pro_base.txt" + # + # Commit it. + # + results2pcp_add_value_commit + # + # Clear it. + # + reset_pcp_om + stop_pcp_subset + start_pcp_subset + # + # Now multi + # + results2pcp_add_value "iteration:${iter}" + results2pcp_add_value "multicore:1" + while IFS= read -r line + do + record_pcp_results "$line" coremark_pro_run_${iter} 1 + done < "${run_dir}/openmetrics_coremark_pro_base.txt" + # + # Commit it. + # + results2pcp_add_value_commit + # + # Clear it. + # + reset_pcp_om fi done # If we're using PCP, stop logging - if [[ $to_use_pcp -eq 1 ]]; then - echo "Stop PCP" - stop_pcp - fi + if [[ $to_use_pcp -eq 1 ]]; then + stop_pcp_subset + stop_pcp + fi for iter in $(seq 1 1 $to_times_to_run); do produce_summary_report $iter $to_times_to_run done - generate_csv_file + generate_csv_file "$start_time" "$end_time" save_results @@ -350,7 +420,7 @@ run_coremark_pro() shutdown_pcp fi - ${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --other_files "$summary_file,coremark_pro_run*,test_results_report,$pcp_dir" --results results.csv --test_name coremark_pro --tuned_setting $to_tuned_setting --version $coremark_pro_version --user $to_user + ${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --other_files "$summary_file,coremark_pro_run*,test_results_report,$pcp_dir" --results results.csv --test_name $test_name --tuned_setting $to_tuned_setting --version $coremark_pro_version --user $to_user popd > /dev/null } diff --git a/coremark_pro/openmetrics_coremark_pro_base.txt b/coremark_pro/openmetrics_coremark_pro_base.txt new file mode 100644 index 0000000..d6827ff --- /dev/null +++ b/coremark_pro/openmetrics_coremark_pro_base.txt @@ -0,0 +1,17 @@ +iteration +running +numthread +runtime +throughput +latency +multicore +cjpeg-rose7-preset +core +linear_alg-mid-100x100-sp +loops-all-mid-10k-sp +nnet_test +parser-125k +radix2-big-64k +sha-test +zip-test +CoreMark-PRO