From a3f91e32d5d907290d194f7c3a0596ab29b3d3fb Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 14 Jun 2019 10:11:04 +0200 Subject: Towards supporting the CompCert tests (not finished) --- test/c/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index 46670ec6..14c856ff 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -3,14 +3,14 @@ include ../../Makefile.config CCOMP=../../ccomp CCOMPFLAGS=$(CCOMPOPTS) -stdlib ../../runtime -dc -dclight -dasm -CFLAGS=-O1 -Wall +CFLAGS+=-O1 -Wall LIBS=$(LIBMATH) -TIME=xtime -o /dev/null -mintime 2.0 # Xavier's hack -#TIME=time >/dev/null # Otherwise +#TIME=xtime -o /dev/null -mintime 2.0 # Xavier's hack +TIME=time >/dev/null # Otherwise -PROGS=fib qsort fftw sha1 sha3 aes \ +PROGS?=fib qsort fftw sha1 sha3 aes \ lists binarytrees fannkuch \ nsieve nsievebits vmach \ chomp perlin siphash24\ @@ -31,28 +31,28 @@ all_gcc: $(PROGS:%=%.gcc) %.gcc: %.c $(CC) $(CFLAGS) -o $*.gcc $*.c $(LIBS) -test: +test: all @for i in $(PROGS); do \ - if $(SIMU) ./$$i.compcert | cmp -s - Results/$$i; \ + if $(EXECUTE) ./$$i.compcert | cmp -s - Results/$$i; \ then echo "$$i: passed"; \ else echo "$$i: FAILED"; exit 2; \ fi; \ done -test_gcc: +test_gcc: all_gcc @for i in $(PROGS); do \ - if ./$$i.gcc | cmp -s - Results/$$i; \ + if $(EXECUTE) ./$$i.gcc | cmp -s - Results/$$i; \ then echo "$$i: passed"; \ else echo "$$i: FAILED"; \ fi; \ done -bench_gcc: +bench_gcc: all_gcc @for i in $(PROGS); do \ echo -n "$$i: "; $(TIME) ./$$i.gcc; \ done -bench: +bench: all @for i in $(PROGS); do \ echo -n "$$i: "; $(TIME) ./$$i.compcert; \ done -- cgit From 5b6c019a507688dfcf63b9ef54f7731137422ab5 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 10 Sep 2019 17:50:42 +0200 Subject: Starting to modify official CompCert tests to be passable with the simu --- test/c/Makefile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index 14c856ff..9580c8cc 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -3,18 +3,22 @@ include ../../Makefile.config CCOMP=../../ccomp CCOMPFLAGS=$(CCOMPOPTS) -stdlib ../../runtime -dc -dclight -dasm -CFLAGS+=-O1 -Wall +CFLAGS+=-O2 -Wall +EXECUTE:=timeout --signal=SIGTERM 90s $(EXECUTE) LIBS=$(LIBMATH) #TIME=xtime -o /dev/null -mintime 2.0 # Xavier's hack TIME=time >/dev/null # Otherwise -PROGS?=fib qsort fftw sha1 sha3 aes \ - lists binarytrees fannkuch \ - nsieve nsievebits vmach \ - chomp perlin siphash24\ - integr fft fftsp almabench knucleotide mandelbrot nbody spectral bisect +PROGS?=fib integr qsort fft fftsp fftw sha1 sha3 aes almabench \ + lists binarytrees fannkuch mandelbrot nbody \ + nsieve nsievebits spectral vmach \ + bisect chomp perlin siphash24 + +# Kalray NOTE : removed knucleotide from PROGS, it is hard to edit the input +# to modify its size without resulting in a seg fault, and the base input +# takes a too long time to complete in the simulator. all: $(PROGS:%=%.compcert) @@ -33,7 +37,8 @@ all_gcc: $(PROGS:%=%.gcc) test: all @for i in $(PROGS); do \ - if $(EXECUTE) ./$$i.compcert | cmp -s - Results/$$i; \ + $(EXECUTE) ./$$i.compcert > $$i.compcert.out;\ + if cmp -s $$i.compcert.out Results/$$i; \ then echo "$$i: passed"; \ else echo "$$i: FAILED"; exit 2; \ fi; \ @@ -41,7 +46,8 @@ test: all test_gcc: all_gcc @for i in $(PROGS); do \ - if $(EXECUTE) ./$$i.gcc | cmp -s - Results/$$i; \ + $(EXECUTE) ./$$i.gcc > $$i.gcc.out;\ + if cmp -s $$i.gcc.out Results/$$i; \ then echo "$$i: passed"; \ else echo "$$i: FAILED"; \ fi; \ @@ -60,3 +66,4 @@ bench: all clean: rm -f *.compcert *.gcc rm -f *.compcert.c *.light.c *.parsed.c *.s *.o *.sdump *~ + rm -f *.out -- cgit From f0f25eabe5b374f20a5db30f652f6e994fff3fb3 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 13 Sep 2019 14:32:25 +0200 Subject: Scaling down most of c/ CompCert tests --- test/c/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index 9580c8cc..31bf3cd1 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -14,11 +14,16 @@ TIME=time >/dev/null # Otherwise PROGS?=fib integr qsort fft fftsp fftw sha1 sha3 aes almabench \ lists binarytrees fannkuch mandelbrot nbody \ nsieve nsievebits spectral vmach \ - bisect chomp perlin siphash24 - -# Kalray NOTE : removed knucleotide from PROGS, it is hard to edit the input -# to modify its size without resulting in a seg fault, and the base input -# takes a too long time to complete in the simulator. + chomp perlin siphash24 + +## +# Kalray NOTE : +# * removed knucleotide from PROGS, it is hard to edit the input +# to modify its size without resulting in a seg fault, and the base input +# takes a too long time to complete in the simulator. +# * also removed bisect, who is exhibiting different float values on the Kalray +# architecture than using x86 GCC (for both CompCert and GCC ports) (tested with n=10) +## all: $(PROGS:%=%.compcert) -- cgit From 059664368a5f4ed036e87c0a5e0ed1fae1706f3d Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 13 Sep 2019 15:18:55 +0200 Subject: Reducing further the input size of the tests --- test/c/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index 31bf3cd1..b2d83352 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -4,7 +4,7 @@ CCOMP=../../ccomp CCOMPFLAGS=$(CCOMPOPTS) -stdlib ../../runtime -dc -dclight -dasm CFLAGS+=-O2 -Wall -EXECUTE:=timeout --signal=SIGTERM 90s $(EXECUTE) +EXECUTE:=timeout --signal=SIGTERM 20s $(EXECUTE) LIBS=$(LIBMATH) @@ -45,7 +45,7 @@ test: all $(EXECUTE) ./$$i.compcert > $$i.compcert.out;\ if cmp -s $$i.compcert.out Results/$$i; \ then echo "$$i: passed"; \ - else echo "$$i: FAILED"; exit 2; \ + else echo "$$i: FAILED"; \ fi; \ done -- cgit From c4496c4c63a01b2a7c1b89cca128ce0b55b50c29 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 13 Sep 2019 16:11:15 +0200 Subject: Adding back "exit 2" to the test target of test/c/Makefile --- test/c/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index b2d83352..7aee6c4f 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -45,7 +45,7 @@ test: all $(EXECUTE) ./$$i.compcert > $$i.compcert.out;\ if cmp -s $$i.compcert.out Results/$$i; \ then echo "$$i: passed"; \ - else echo "$$i: FAILED"; \ + else echo "$$i: FAILED"; exit 2; \ fi; \ done @@ -54,7 +54,7 @@ test_gcc: all_gcc $(EXECUTE) ./$$i.gcc > $$i.gcc.out;\ if cmp -s $$i.gcc.out Results/$$i; \ then echo "$$i: passed"; \ - else echo "$$i: FAILED"; \ + else echo "$$i: FAILED"; exit 2;\ fi; \ done -- cgit From db96b0e2b156cfa527493f5890cd805f8aa4543a Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sun, 25 Aug 2019 19:22:03 +0200 Subject: Revise the "bench" entries of the test suite Initially, the "bench" entries of the test suite used a "xtime" utility developed in-house and not publically available. This commit adds a version of "xtime" written in OCaml (tools/xtime.ml) and updates the "bench" entries of the test/*/Makefile to use it. --- test/c/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index 51a8f105..4b521bb5 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -7,8 +7,7 @@ CFLAGS=-O1 -Wall LIBS=$(LIBMATH) -TIME=xtime -o /dev/null -mintime 2.0 # Xavier's hack -#TIME=time >/dev/null # Otherwise +TIME=ocaml unix.cma ../../tools/xtime.ml -o /dev/null -mintime 2.0 -minruns 4 PROGS=fib integr qsort fft fftsp fftw sha1 sha3 aes almabench \ lists binarytrees fannkuch knucleotide mandelbrot nbody \ @@ -48,12 +47,12 @@ test_gcc: bench_gcc: @for i in $(PROGS); do \ - echo -n "$$i: "; $(TIME) ./$$i.gcc; \ + $(TIME) -name $$i -- ./$$i.gcc; \ done bench: @for i in $(PROGS); do \ - echo -n "$$i: "; $(TIME) ./$$i.compcert; \ + $(TIME) -name $$i -- ./$$i.compcert; \ done clean: -- cgit From 32f18c9068b4f23997733df68960f4f6c73a7ff4 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 25 Sep 2019 11:41:57 +0200 Subject: Preferring the (ifeq) approach for removing tests --- test/c/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index 7aee6c4f..b7db48ed 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -24,6 +24,10 @@ PROGS?=fib integr qsort fft fftsp fftw sha1 sha3 aes almabench \ # * also removed bisect, who is exhibiting different float values on the Kalray # architecture than using x86 GCC (for both CompCert and GCC ports) (tested with n=10) ## +ifeq ($(ARCH),mppa_k1c) + PROGS:=$(filter-out knucleotide,$(PROGS)) + PROGS:=$(filter-out bisect,$(PROGS)) +endif all: $(PROGS:%=%.compcert) -- cgit From 5ca4b192499ee4829aee1256a3bebf2318c68108 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 25 Sep 2019 14:37:23 +0200 Subject: Restored previous input sizes for other backends --- test/c/Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'test/c/Makefile') diff --git a/test/c/Makefile b/test/c/Makefile index b7db48ed..6bd05718 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -46,20 +46,12 @@ all_gcc: $(PROGS:%=%.gcc) test: all @for i in $(PROGS); do \ - $(EXECUTE) ./$$i.compcert > $$i.compcert.out;\ - if cmp -s $$i.compcert.out Results/$$i; \ - then echo "$$i: passed"; \ - else echo "$$i: FAILED"; exit 2; \ - fi; \ + SIMU='$(EXECUTE)' ./Runtest $$i ./$$i.compcert;\ done test_gcc: all_gcc @for i in $(PROGS); do \ - $(EXECUTE) ./$$i.gcc > $$i.gcc.out;\ - if cmp -s $$i.gcc.out Results/$$i; \ - then echo "$$i: passed"; \ - else echo "$$i: FAILED"; exit 2;\ - fi; \ + SIMU='$(EXECUTE)' ./Runtest $$i ./$$i.gcc;\ done bench_gcc: all_gcc -- cgit