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 +-- test/c/Results/binarytrees | 9 +++---- test/c/Results/chomp | 2 -- test/c/Results/fannkuch | 62 ++++++++++++++++++++++----------------------- test/c/Results/fft | 2 +- test/c/Results/fftsp | 2 +- test/c/Results/fib | 2 +- test/c/Results/integr | 2 +- test/c/Results/mandelbrot | Bin 709 -> 709 bytes test/c/Results/nbody | 2 +- test/c/Results/nsieve | 6 ++--- test/c/Results/nsievebits | 2 +- test/c/Results/perlin | 2 +- test/c/Results/spectral | 2 +- test/c/binarytrees.c | 2 +- test/c/chomp.c | 4 +-- test/c/fannkuch.c | 2 +- test/c/fft.c | 2 +- test/c/fftsp.c | 2 +- test/c/fftw.c | 2 +- test/c/fib.c | 2 +- test/c/integr.c | 2 +- test/c/lists.c | 4 +-- test/c/mandelbrot.c | 2 +- test/c/nbody.c | 2 +- test/c/nsieve.c | 2 +- test/c/nsievebits.c | 4 +-- test/c/perlin.c | 4 +-- test/c/qsort.c | 2 +- test/c/spectral.c | 2 +- 30 files changed, 68 insertions(+), 71 deletions(-) (limited to 'test') 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 diff --git a/test/c/Results/binarytrees b/test/c/Results/binarytrees index db0f0ef7..72654db9 100644 --- a/test/c/Results/binarytrees +++ b/test/c/Results/binarytrees @@ -1,5 +1,4 @@ -stretch tree of depth 9 check: -1 -512 trees of depth 4 check: -512 -128 trees of depth 6 check: -128 -32 trees of depth 8 check: -32 -long lived tree of depth 8 check: -1 +stretch tree of depth 7 check: -1 +128 trees of depth 4 check: -128 +32 trees of depth 6 check: -32 +long lived tree of depth 6 check: -1 diff --git a/test/c/Results/chomp b/test/c/Results/chomp index fb4d17a1..7898d32f 100644 --- a/test/c/Results/chomp +++ b/test/c/Results/chomp @@ -1,6 +1,4 @@ player 0 plays at (1,1) -player 1 plays at (4,0) -player 0 plays at (0,4) player 1 plays at (3,0) player 0 plays at (0,3) player 1 plays at (2,0) diff --git a/test/c/Results/fannkuch b/test/c/Results/fannkuch index dac06137..09ecc715 100644 --- a/test/c/Results/fannkuch +++ b/test/c/Results/fannkuch @@ -1,31 +1,31 @@ -12345678 -21345678 -23145678 -32145678 -31245678 -13245678 -23415678 -32415678 -34215678 -43215678 -42315678 -24315678 -34125678 -43125678 -41325678 -14325678 -13425678 -31425678 -41235678 -14235678 -12435678 -21435678 -24135678 -42135678 -23451678 -32451678 -34251678 -43251678 -42351678 -24351678 -Pfannkuchen(8) = 22 +123456 +213456 +231456 +321456 +312456 +132456 +234156 +324156 +342156 +432156 +423156 +243156 +341256 +431256 +413256 +143256 +134256 +314256 +412356 +142356 +124356 +214356 +241356 +421356 +234516 +324516 +342516 +432516 +423516 +243516 +Pfannkuchen(6) = 10 diff --git a/test/c/Results/fft b/test/c/Results/fft index cbeb0999..0fc1c969 100644 --- a/test/c/Results/fft +++ b/test/c/Results/fft @@ -1 +1 @@ -4096 points, result OK +1024 points, result OK diff --git a/test/c/Results/fftsp b/test/c/Results/fftsp index 36264416..2b5711a6 100644 --- a/test/c/Results/fftsp +++ b/test/c/Results/fftsp @@ -1 +1 @@ -64 points, result OK +8 points, result OK diff --git a/test/c/Results/fib b/test/c/Results/fib index d8beea8c..0e0fa4d1 100644 --- a/test/c/Results/fib +++ b/test/c/Results/fib @@ -1 +1 @@ -fib(26) = 196418 +fib(15) = 987 diff --git a/test/c/Results/integr b/test/c/Results/integr index bb755482..c61fdcc2 100644 --- a/test/c/Results/integr +++ b/test/c/Results/integr @@ -1 +1 @@ -integr(square, 0.0, 1.0, 1000000) = 0.333333 +integr(square, 0.0, 1.0, 100000) = 0.333328 diff --git a/test/c/Results/mandelbrot b/test/c/Results/mandelbrot index e6eb3e50..246f7ce1 100644 Binary files a/test/c/Results/mandelbrot and b/test/c/Results/mandelbrot differ diff --git a/test/c/Results/nbody b/test/c/Results/nbody index e43de06f..99ad4fd1 100644 --- a/test/c/Results/nbody +++ b/test/c/Results/nbody @@ -1,2 +1,2 @@ -0.169075164 --0.169026909 +-0.169050762 diff --git a/test/c/Results/nsieve b/test/c/Results/nsieve index 69643235..95fea812 100644 --- a/test/c/Results/nsieve +++ b/test/c/Results/nsieve @@ -1,3 +1,3 @@ -Primes up to 102400 9805 -Primes up to 51200 5239 -Primes up to 25600 2818 +Primes up to 12800 1526 +Primes up to 6400 834 +Primes up to 3200 452 diff --git a/test/c/Results/nsievebits b/test/c/Results/nsievebits index e2d08319..2131804c 100644 --- a/test/c/Results/nsievebits +++ b/test/c/Results/nsievebits @@ -1,3 +1,3 @@ -Primes up to 80000 7837 Primes up to 40000 4203 Primes up to 20000 2262 +Primes up to 10000 1229 diff --git a/test/c/Results/perlin b/test/c/Results/perlin index 1d3be5f8..8438b53c 100644 --- a/test/c/Results/perlin +++ b/test/c/Results/perlin @@ -1 +1 @@ --2.9375e+01 +6.0000e+00 diff --git a/test/c/Results/spectral b/test/c/Results/spectral index 2ad8d778..b06cd560 100644 --- a/test/c/Results/spectral +++ b/test/c/Results/spectral @@ -1 +1 @@ -1.273394737 +1.272359925 diff --git a/test/c/binarytrees.c b/test/c/binarytrees.c index f2921d9a..adc0d7b3 100644 --- a/test/c/binarytrees.c +++ b/test/c/binarytrees.c @@ -75,7 +75,7 @@ int main(int argc, char* argv[]) unsigned N, depth, minDepth, maxDepth, stretchDepth; treeNode *stretchTree, *longLivedTree, *tempTree; - N = argc < 2 ? 8 : atol(argv[1]); + N = argc < 2 ? 6 : atol(argv[1]); minDepth = 4; diff --git a/test/c/chomp.c b/test/c/chomp.c index a2d0d627..5b3c9cfb 100644 --- a/test/c/chomp.c +++ b/test/c/chomp.c @@ -338,8 +338,8 @@ int main(void) struct _play *tree; - ncol = 5; - nrow = 5; + ncol = 4; + nrow = 4; tree = make_play(1); /* create entire tree structure, not just the */ player = 0; /* needed part for first move */ current = make_data(nrow,ncol); /* start play at full board */ diff --git a/test/c/fannkuch.c b/test/c/fannkuch.c index ddaa7309..6fb7912f 100644 --- a/test/c/fannkuch.c +++ b/test/c/fannkuch.c @@ -102,7 +102,7 @@ fannkuch( int n ) int main( int argc, char* argv[] ) { - int n = (argc>1) ? atoi(argv[1]) : 8; + int n = (argc>1) ? atoi(argv[1]) : 6; printf("Pfannkuchen(%d) = %ld\n", n, fannkuch(n)); return 0; diff --git a/test/c/fft.c b/test/c/fft.c index f91f5300..429181b1 100644 --- a/test/c/fft.c +++ b/test/c/fft.c @@ -152,7 +152,7 @@ int main(int argc, char ** argv) double enp, t, y, z, zr, zi, zm, a; double * xr, * xi, * pxr, * pxi; - if (argc >= 2) n = atoi(argv[1]); else n = 12; + if (argc >= 2) n = atoi(argv[1]); else n = 10; np = 1 << n; enp = np; npm = np / 2 - 1; diff --git a/test/c/fftsp.c b/test/c/fftsp.c index 316ef714..2dcd4ad2 100644 --- a/test/c/fftsp.c +++ b/test/c/fftsp.c @@ -153,7 +153,7 @@ int main(int argc, char ** argv) float enp, t, y, z, zr, zi, zm, a; float * xr, * xi, * pxr, * pxi; - if (argc >= 2) n = atoi(argv[1]); else n = 6; + if (argc >= 2) n = atoi(argv[1]); else n = 3; np = 1 << n; enp = np; npm = np / 2 - 1; diff --git a/test/c/fftw.c b/test/c/fftw.c index 1d5b6526..755bac7f 100644 --- a/test/c/fftw.c +++ b/test/c/fftw.c @@ -74,7 +74,7 @@ const E KP1_847759065 = ((E) +1.847759065022573512256366378793576573644833252); /* Test harness */ -#define NRUNS (100 * 10) +#define NRUNS (10 * 10) int main() { diff --git a/test/c/fib.c b/test/c/fib.c index 77aa7bb9..439b908c 100644 --- a/test/c/fib.c +++ b/test/c/fib.c @@ -12,7 +12,7 @@ int fib(int n) int main(int argc, char ** argv) { int n, r; - if (argc >= 2) n = atoi(argv[1]); else n = 26; + if (argc >= 2) n = atoi(argv[1]); else n = 15; r = fib(n); printf("fib(%d) = %d\n", n, r); return 0; diff --git a/test/c/integr.c b/test/c/integr.c index 9c762297..19ea78ab 100644 --- a/test/c/integr.c +++ b/test/c/integr.c @@ -25,7 +25,7 @@ double test(int n) int main(int argc, char ** argv) { int n; double r; - if (argc >= 2) n = atoi(argv[1]); else n = 1000000; + if (argc >= 2) n = atoi(argv[1]); else n = 100000; r = test(n); printf("integr(square, 0.0, 1.0, %d) = %g\n", n, r); return 0; diff --git a/test/c/lists.c b/test/c/lists.c index d1c67954..a72ec398 100644 --- a/test/c/lists.c +++ b/test/c/lists.c @@ -61,8 +61,8 @@ int main(int argc, char ** argv) int n, niter, i; struct list * l; - if (argc >= 2) n = atoi(argv[1]); else n = 100; - if (argc >= 3) niter = atoi(argv[1]); else niter = 20000; + if (argc >= 2) n = atoi(argv[1]); else n = 500; + if (argc >= 3) niter = atoi(argv[1]); else niter = 100; l = buildlist(n); if (checklist(n, reverselist(l))) { printf("OK\n"); diff --git a/test/c/mandelbrot.c b/test/c/mandelbrot.c index d2afcad1..84fae15c 100644 --- a/test/c/mandelbrot.c +++ b/test/c/mandelbrot.c @@ -17,7 +17,7 @@ int main (int argc, char **argv) { int w, h, bit_num = 0; char byte_acc = 0; - int i, iter = 50; + int i, iter = 30; double x, y, limit = 2.0; double Zr, Zi, Cr, Ci, Tr, Ti; diff --git a/test/c/nbody.c b/test/c/nbody.c index 207184f7..1ce8d788 100644 --- a/test/c/nbody.c +++ b/test/c/nbody.c @@ -140,7 +140,7 @@ void setup_bodies(void) int main(int argc, char ** argv) { - int n = argc < 2 ? 200 : atoi(argv[1]); + int n = argc < 2 ? 100 : atoi(argv[1]); int i; setup_bodies(); diff --git a/test/c/nsieve.c b/test/c/nsieve.c index 49fe385f..fc79ba69 100644 --- a/test/c/nsieve.c +++ b/test/c/nsieve.c @@ -29,7 +29,7 @@ static unsigned int nsieve(int m) { #define NITER 2 int main(int argc, char * argv[]) { - int m = argc < 2 ? 9 : atoi(argv[1]); + int m = argc < 2 ? 6 : atoi(argv[1]); int i, j; for (i = 0; i < 3; i++) { int n = 200 << (m-i); diff --git a/test/c/nsievebits.c b/test/c/nsievebits.c index 3a2e8b8b..15d31417 100644 --- a/test/c/nsievebits.c +++ b/test/c/nsievebits.c @@ -30,7 +30,7 @@ nsieve(unsigned int m) return (count); } -#define NITER 2 +#define NITER 1 static void test(unsigned int n) @@ -48,7 +48,7 @@ main(int ac, char **av) { unsigned int n; - n = ac < 2 ? 3 : atoi(av[1]); + n = ac < 2 ? 2 : atoi(av[1]); test(n); if (n >= 1) test(n - 1); diff --git a/test/c/perlin.c b/test/c/perlin.c index b853aeed..79d49d62 100644 --- a/test/c/perlin.c +++ b/test/c/perlin.c @@ -64,8 +64,8 @@ static void init(void) { } #define INCREMENT 0.5 -#define MIN -5.0 -#define MAX 5.0 +#define MIN -3.0 +#define MAX 3.0 int main(int argc, char ** argv) { init(); diff --git a/test/c/qsort.c b/test/c/qsort.c index a157f283..8a035eb5 100644 --- a/test/c/qsort.c +++ b/test/c/qsort.c @@ -34,7 +34,7 @@ int main(int argc, char ** argv) int n, i, j; int * a, * b; - if (argc >= 2) n = atoi(argv[1]); else n = 3000; + if (argc >= 2) n = atoi(argv[1]); else n = 500; a = malloc(n * sizeof(int)); b = malloc(n * sizeof(int)); for (j = 0; j < NITER; j++) { diff --git a/test/c/spectral.c b/test/c/spectral.c index 7e56bf7f..b3a34070 100644 --- a/test/c/spectral.c +++ b/test/c/spectral.c @@ -43,7 +43,7 @@ void eval_AtA_times_u(int N, const double u[], double AtAu[]) int main(int argc, char *argv[]) { int i; - int N = ((argc == 2) ? atoi(argv[1]) : 15); + int N = ((argc == 2) ? atoi(argv[1]) : 11); double * u, * v, vBv, vv; u = malloc(N * sizeof(double)); v = malloc(N * sizeof(double)); -- cgit