diff options
Diffstat (limited to 'UNI/baselines/cpu')
-rw-r--r-- | UNI/baselines/cpu/Makefile | 6 | ||||
-rw-r--r-- | UNI/baselines/cpu/app_baseline.c | 14 | ||||
-rwxr-xr-x | UNI/baselines/cpu/run-opti.sh | 11 | ||||
-rwxr-xr-x | UNI/baselines/cpu/run.sh | 11 |
4 files changed, 29 insertions, 13 deletions
diff --git a/UNI/baselines/cpu/Makefile b/UNI/baselines/cpu/Makefile index 10e4f9b..ec3f403 100644 --- a/UNI/baselines/cpu/Makefile +++ b/UNI/baselines/cpu/Makefile @@ -16,13 +16,15 @@ uni_O2: app_baseline.c run: uni ./uni -i 1258291200 -t 4 +# -e 20 was not part of the upstream instructions + .PHONY: run_O0 run_O0: uni_O0 - ./uni_O0 -i 1258291200 -t 4 + ./uni_O0 -i 1258291200 -t 4 -e 20 .PHONY: run_O2 run_O2: uni_O2 - ./uni_O2 -i 1258291200 -t 4 + ./uni_O2 -i 1258291200 -t 4 -e 20 .PHONY: clean clean: diff --git a/UNI/baselines/cpu/app_baseline.c b/UNI/baselines/cpu/app_baseline.c index 39f225a..f4f303f 100644 --- a/UNI/baselines/cpu/app_baseline.c +++ b/UNI/baselines/cpu/app_baseline.c @@ -32,7 +32,7 @@ static T *create_test_file(unsigned int nr_elements) { B = (T*) malloc(nr_elements * sizeof(T)); C = (T*) malloc(nr_elements * sizeof(T)); - printf("nr_elements\t%u\t", nr_elements); + //printf("nr_elements\t%u\t", nr_elements); for (int i = 0; i < nr_elements; i++) { //A[i] = (unsigned int) (rand()); //A[i] = i+1; @@ -141,16 +141,12 @@ int main(int argc, char **argv) { nr_threads++; if (rep >= p.n_warmup) { - printf("[::] n_threads=%d e_type=%s n_elements=%d " - "| throughput_cpu_MBps=%f\n", - nr_threads, XSTR(T), file_size, - file_size * 2 * sizeof(T) / timer.time[0]); - printf("[::] n_threads=%d e_type=%s n_elements=%d " - "| throughput_cpu_MOpps=%f\n", + printf("[::] UNI CPU | n_threads=%d e_type=%s n_elements=%d " + "| throughput_MBps=%f", nr_threads, XSTR(T), file_size, + file_size * sizeof(T) / timer.time[0]); + printf(" throughput_MOpps=%f", file_size / timer.time[0]); - printf("[::] n_threads=%d e_type=%s n_elements=%d | ", - nr_threads, XSTR(T), file_size); printall(&timer, 0); } } diff --git a/UNI/baselines/cpu/run-opti.sh b/UNI/baselines/cpu/run-opti.sh new file mode 100755 index 0000000..0a3a4a3 --- /dev/null +++ b/UNI/baselines/cpu/run-opti.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +HOST="$(hostname)" + +echo $HOST + +make clean + +make run_O0 | sed 's/CPU/CPU O0/' | tee "${HOST}-O0.txt" + +make run_O2 | sed 's/CPU/CPU O2/' | tee "${HOST}-O2.txt" diff --git a/UNI/baselines/cpu/run.sh b/UNI/baselines/cpu/run.sh index 3c99ad2..37a6a9c 100755 --- a/UNI/baselines/cpu/run.sh +++ b/UNI/baselines/cpu/run.sh @@ -2,16 +2,23 @@ set -e +HOST="$(hostname)" + +echo $HOST + +( + echo "prim-benchmarks UNI CPU (dfatool edition)" echo "Started at $(date)" echo "Revision $(git describe --always)" -for nr_threads in 1 2 4 6 8 12 16 20 24 32; do +for nr_threads in 88 64 44 1 2 4 6 8 12 16 20 24 32; do for i in 19660800 1258291200 629145600 314572800 157286400 78643200 39321600; do for dt in int8_t int16_t int32_t int64_t float double; do if make -B TYPE=${dt}; then - timeout -k 1m 30m ./uni -i ${i} -w 0 -e 100 -t ${nr_threads} || true + timeout --foreground -k 1m 60m ./uni -i ${i} -w 0 -e 100 -t ${nr_threads} || true fi done done done +) | tee "${HOST}-explore.txt" |