From 03412b9f841f140b9b7410a1890298e3ac2835db Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Tue, 20 Oct 2020 13:35:52 -0400 Subject: TACLe and DIS benchmark fixes - Use consistent approach to prevent computations from being optimized out in the DIS benchmarks - Don't print results in the DIS benchmarks - Fix a memory corruption in TACLe's "epic" benchmark reflect1() - Fix return codes for all benchmarks - Rename run_baseline.sh to run_bench.sh in preperation for this being the main benchmarking script --- dis/Field/field.c | 14 +++++++------- dis/Matrix/ver2/matrix.c | 6 ++++-- dis/Neighborhood/neighborhood.c | 33 ++++++++++++++++++++------------- dis/Pointer/pointer.c | 9 +++++---- dis/Transitive/transitive.c | 10 +++++----- dis/Update/update.c | 4 ++-- 6 files changed, 43 insertions(+), 33 deletions(-) (limited to 'dis') diff --git a/dis/Field/field.c b/dis/Field/field.c index 900d47b..d028ee7 100644 --- a/dis/Field/field.c +++ b/dis/Field/field.c @@ -137,17 +137,17 @@ int main(int argc, char **argv) { } endTime = time(NULL); - volatile int sumAll = 0; + volatile int _stop_optimizer = 0; for (l = 0; l < n; l++) { unsigned int ll; - // fprintf(stdout, "%d subfields for token %d \n", token[l].subfields, l); - sumAll += token[l].subfields + l; + //fprintf(stdout, "%d subfields for token %d \n", token[l].subfields, l); + _stop_optimizer += token[l].subfields + l; for (ll = 0; ll < token[l].subfields; ll++) { - sumAll += ll + token[l].stat[ll].count + token[l].stat[ll].min + + _stop_optimizer += ll + token[l].stat[ll].count + token[l].stat[ll].min + token[l].stat[ll].sum; - /*fprintf(stdout, "subfields %d:\tcount = %d\tmin= %x\tsum= %x\n", - ll, token[l].stat[ll].count, - token[l].stat[ll].min, token[l].stat[ll].sum);*/ + //fprintf(stdout, "subfields %d:\tcount = %d\tmin= %x\tsum= %x\n", + // ll, token[l].stat[ll].count, + // token[l].stat[ll].min, token[l].stat[ll].sum);*/ } } fprintf(stderr, "time for field stressmark = %f seconds.\n", diff --git a/dis/Matrix/ver2/matrix.c b/dis/Matrix/ver2/matrix.c index 5162579..9d9ac7e 100755 --- a/dis/Matrix/ver2/matrix.c +++ b/dis/Matrix/ver2/matrix.c @@ -551,8 +551,10 @@ int main(int argc, char **argv) { sum += sum + *(vectorX + k); } - fprintf(stdout, "sum = %f, actualError = %e, actualIteration = %d\n", sum, - actualError, actualIteration); + //fprintf(stdout, "sum = %f, actualError = %e, actualIteration = %d\n", sum, + // actualError, actualIteration); + volatile double _stop_optimizer = sum + actualError + actualIteration; + fprintf(stderr, "time for matrix stressmark = %f seconds.\n", difftime(endTime, beginTime)); diff --git a/dis/Neighborhood/neighborhood.c b/dis/Neighborhood/neighborhood.c index 2d401d3..ea1c658 100644 --- a/dis/Neighborhood/neighborhood.c +++ b/dis/Neighborhood/neighborhood.c @@ -74,23 +74,30 @@ int main(int argc, char **argv) { endTime = time(NULL); WRITE_TO_FILE - // printf(" end time is %d\n", endTime); + volatile double _stop_optimizer = values.distShort.deg0.entropy + + values.distShort.deg0.energy + values.distShort.deg45.entropy + + values.distShort.deg45.energy + values.distShort.deg90.entropy + + values.distShort.deg90.energy + values.distShort.deg135.entropy + + values.distShort.deg135.energy + values.distLong.deg0.entropy + + values.distLong.deg0.energy + values.distShort.deg45.entropy + + values.distLong.deg45.energy + values.distLong.deg90.entropy + + values.distLong.deg90.energy + values.distLong.deg135.entropy + + values.distLong.deg135.energy; + //fprintf(stdout, "%9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e", + // values.distShort.deg0.entropy, values.distShort.deg0.energy, + // values.distShort.deg45.entropy, values.distShort.deg45.energy, + // values.distShort.deg90.entropy, values.distShort.deg90.energy, + // values.distShort.deg135.entropy, values.distShort.deg135.energy); - fprintf(stdout, "%9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e", - values.distShort.deg0.entropy, values.distShort.deg0.energy, - values.distShort.deg45.entropy, values.distShort.deg45.energy, - values.distShort.deg90.entropy, values.distShort.deg90.energy, - values.distShort.deg135.entropy, values.distShort.deg135.energy); - - fprintf(stdout, "%9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e", - values.distLong.deg0.entropy, values.distLong.deg0.energy, - values.distShort.deg45.entropy, values.distLong.deg45.energy, - values.distLong.deg90.entropy, values.distLong.deg90.energy, - values.distLong.deg135.entropy, values.distLong.deg135.energy); + //fprintf(stdout, "%9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e", + // values.distLong.deg0.entropy, values.distLong.deg0.energy, + // values.distShort.deg45.entropy, values.distLong.deg45.energy, + // values.distLong.deg90.entropy, values.distLong.deg90.energy, + // values.distLong.deg135.entropy, values.distLong.deg135.energy); fprintf(stderr, "time for neghborhood stressmark = %f seconds.\n", difftime(endTime, beginTime)); free((Pixel *)image); - return (SUCCESS); + return (0); } diff --git a/dis/Pointer/pointer.c b/dis/Pointer/pointer.c index d97f276..0325c64 100644 --- a/dis/Pointer/pointer.c +++ b/dis/Pointer/pointer.c @@ -146,10 +146,11 @@ int main(int argc, char **argv) { endTime = time(NULL); - volatile int _stop_optimizer = thread[l].hops + l; - /*for (l=0; l Date: Tue, 20 Oct 2020 17:10:14 -0400 Subject: Whitespace fixes for TACLeBench and copyright update in extra.h Also move run_all_dis.sh up a directory in preperation for further changes. --- dis/run_all_dis.sh | 70 ------------------------------------------------------ 1 file changed, 70 deletions(-) delete mode 100755 dis/run_all_dis.sh (limited to 'dis') diff --git a/dis/run_all_dis.sh b/dis/run_all_dis.sh deleted file mode 100755 index 5a6b6e1..0000000 --- a/dis/run_all_dis.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -# Run baselines for all the DIS tasks -if [ "$EUID" -ne 0 ] -then - echo "You need to be root to enable cache way and interrupt isolation!" - exit -fi - -if uname -a | grep -q "mc2"; then - echo "MC^2 detected! Cache isolation will be enabled" - iso="i" -else - echo "MC^2 not detected." - iso="xi" -fi - -datestring=$(date +"%b%d-%H") -if ! grep -q irqaffinity /proc/cmdline; then - /playpen/move_interrupts_off_core15.sh -else - echo "performance" > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor -fi -WSSS=WSSS_maxstride2mb -caches=caches_all -# Consider re-enabling this only if you're interested in exploring bandwidth effects -#./setup_mem_and_global.sh -if [[ $1 == "--contend" ]]; then - echo "Will run 6 contending tasks" - echo "Files will be named $datestring--c-"$iso".txt" - echo "Please verify the above settings. Press enter to continue..." - read - # Run two contending tasks on each other CCX - taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher & - taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher & - taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher & - taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher & - taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher & - taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher & - ./run_dis.sh 15 10 $datestring-field-c-$iso Field inputs/Field/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-field-c-$iso - ./run_dis.sh 15 10 $datestring-matrix-c-$iso Matrix inputs/Matrix/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-matrix-c-$iso - ./run_dis.sh 15 10 $datestring-neighborhood-c-$iso Neighborhood inputs/Neighborhood/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-neighborhood-c-$iso - ./run_dis.sh 15 10 $datestring-pointer-c-$iso Pointer inputs/Pointer/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-pointer-c-$iso - ./run_dis.sh 15 10 $datestring-transitive-c-$iso Transitive inputs/Transitive/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-transitive-c-$iso - ./run_dis.sh 15 10 $datestring-update-c-$iso Update inputs/Update/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-update-c-$iso - killall thrasher -else - echo "Will run no contending tasks (use --contend for contending tasks)" - echo "Files will be named $datestring--xc-"$iso".txt" - echo "Please verify the above settings. Press enter to continue..." - read - killall thrasher - ./run_dis.sh 15 10 $datestring-field-xc-$iso Field inputs/Field/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-field-xc-$iso - ./run_dis.sh 15 10 $datestring-matrix-xc-$iso Matrix inputs/Matrix/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-matrix-xc-$iso - ./run_dis.sh 15 10 $datestring-neighborhood-xc-$iso Neighborhood inputs/Neighborhood/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-neighborhood-xc-$iso - ./run_dis.sh 15 10 $datestring-pointer-xc-$iso Pointer inputs/Pointer/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-pointer-xc-$iso - ./run_dis.sh 15 10 $datestring-transitive-xc-$iso Transitive inputs/Transitive/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-transitive-xc-$iso - ./run_dis.sh 15 10 $datestring-update-xc-$iso Update inputs/Update/in0 inputs/$WSSS inputs/$caches - ./postproc.sh $datestring-update-xc-$iso -fi -- cgit v1.2.2