From ad50f453dae61d0ec1802cf5819f6d5e7d4c8970 Mon Sep 17 00:00:00 2001 From: AZEN-SGG Date: Tue, 8 Apr 2025 14:29:26 +0300 Subject: [PATCH] Add tests --- 2025.04.04/test/1/a.txt | 4 ++++ 2025.04.04/test/1/a1.txt | 1 + 2025.04.04/test/1/b.txt | 1 + 2025.04.04/test/1/c.txt | 4 ++++ 2025.04.04/test/1/c_b.txt | 1 + 2025.04.04/test/1/c_x.txt | 1 + 2025.04.04/test/1/d.txt | 5 +++++ 2025.04.04/test/1/e.txt | 6 ++++++ 2025.04.04/test/1/f.txt | 4 ++++ 2025.04.04/test/1/g.txt | 4 ++++ 2025.04.04/test/1/g1.txt | 4 ++++ 2025.04.04/test/1/g2.txt | 4 ++++ 2025.04.04/test/1/h.txt | 8 ++++++++ 2025.04.04/test/1/h1.txt | 8 ++++++++ 2025.04.04/test/1/h2.txt | 8 ++++++++ 2025.04.04/test/1/x.txt | 1 + 2025.04.04/test/1/x0.txt | 1 + 2025.04.04/test/1/x01.txt | 1 + 2025.04.04/test/3/a.txt | 4 ++++ 2025.04.04/test/3/b.txt | 4 ++++ 2025.04.04/test/3/c.txt | 4 ++++ 2025.04.04/test/3/d.txt | 6 ++++++ 2025.04.04/test/3/e.txt | 6 ++++++ 2025.04.04/test/3/f.txt | 4 ++++ 2025.04.04/test/3/g.txt | 1 + 2025.04.04/test/a.txt | 4 ++++ 2025.04.04/test/a20.txt | 4 ++++ 2025.04.04/test/a40.txt | 4 ++++ 2025.04.04/test/b.txt | 4 ++++ 2025.04.04/test/c.txt | 6 ++++++ 2025.04.04/test/d.txt | 6 ++++++ 2025.04.04/test/e.txt | 6 ++++++ 2025.04.04/test/f.txt | 4 ++++ 2025.04.04/test/g.txt | 4 ++++ 2025.04.04/test/h.txt | 8 ++++++++ 2025.04.04/test/test1.sh | 3 +++ 2025.04.04/test/test13.sh | 3 +++ 2025.04.04/test/test13_matr.sh | 15 +++++++++++++++ 2025.04.04/test/test13_matr_mpi.sh | 9 +++++++++ 2025.04.04/test/test13_matr_thr.sh | 9 +++++++++ 2025.04.04/test/test13_mpi.sh | 3 +++ 2025.04.04/test/test13_thr.sh | 3 +++ 2025.04.04/test/test1_matr.sh | 15 +++++++++++++++ 43 files changed, 205 insertions(+) create mode 100644 2025.04.04/test/1/a.txt create mode 120000 2025.04.04/test/1/a1.txt create mode 100644 2025.04.04/test/1/b.txt create mode 100644 2025.04.04/test/1/c.txt create mode 100644 2025.04.04/test/1/c_b.txt create mode 100644 2025.04.04/test/1/c_x.txt create mode 100644 2025.04.04/test/1/d.txt create mode 100644 2025.04.04/test/1/e.txt create mode 100644 2025.04.04/test/1/f.txt create mode 100644 2025.04.04/test/1/g.txt create mode 100644 2025.04.04/test/1/g1.txt create mode 100644 2025.04.04/test/1/g2.txt create mode 100644 2025.04.04/test/1/h.txt create mode 100644 2025.04.04/test/1/h1.txt create mode 100644 2025.04.04/test/1/h2.txt create mode 100644 2025.04.04/test/1/x.txt create mode 100644 2025.04.04/test/1/x0.txt create mode 100644 2025.04.04/test/1/x01.txt create mode 100644 2025.04.04/test/3/a.txt create mode 100644 2025.04.04/test/3/b.txt create mode 100644 2025.04.04/test/3/c.txt create mode 100644 2025.04.04/test/3/d.txt create mode 100644 2025.04.04/test/3/e.txt create mode 100644 2025.04.04/test/3/f.txt create mode 100644 2025.04.04/test/3/g.txt create mode 100644 2025.04.04/test/a.txt create mode 100644 2025.04.04/test/a20.txt create mode 100644 2025.04.04/test/a40.txt create mode 100644 2025.04.04/test/b.txt create mode 100644 2025.04.04/test/c.txt create mode 100644 2025.04.04/test/d.txt create mode 100644 2025.04.04/test/e.txt create mode 100644 2025.04.04/test/f.txt create mode 100644 2025.04.04/test/g.txt create mode 100644 2025.04.04/test/h.txt create mode 100755 2025.04.04/test/test1.sh create mode 100755 2025.04.04/test/test13.sh create mode 100755 2025.04.04/test/test13_matr.sh create mode 100755 2025.04.04/test/test13_matr_mpi.sh create mode 100755 2025.04.04/test/test13_matr_thr.sh create mode 100755 2025.04.04/test/test13_mpi.sh create mode 100755 2025.04.04/test/test13_thr.sh create mode 100755 2025.04.04/test/test1_matr.sh diff --git a/2025.04.04/test/1/a.txt b/2025.04.04/test/1/a.txt new file mode 100644 index 0000000..3c00302 --- /dev/null +++ b/2025.04.04/test/1/a.txt @@ -0,0 +1,4 @@ +5 4 1 1 +4 5 1 1 +1 1 4 2 +1 1 2 4 diff --git a/2025.04.04/test/1/a1.txt b/2025.04.04/test/1/a1.txt new file mode 120000 index 0000000..8d14cbf --- /dev/null +++ b/2025.04.04/test/1/a1.txt @@ -0,0 +1 @@ +a.txt \ No newline at end of file diff --git a/2025.04.04/test/1/b.txt b/2025.04.04/test/1/b.txt new file mode 100644 index 0000000..3b47890 --- /dev/null +++ b/2025.04.04/test/1/b.txt @@ -0,0 +1 @@ +5 6 3 5 diff --git a/2025.04.04/test/1/c.txt b/2025.04.04/test/1/c.txt new file mode 100644 index 0000000..5d238cb --- /dev/null +++ b/2025.04.04/test/1/c.txt @@ -0,0 +1,4 @@ +5 7 6 5 12 +7 10 8 7 17 +6 8 10 9 17 +5 7 9 10 17 diff --git a/2025.04.04/test/1/c_b.txt b/2025.04.04/test/1/c_b.txt new file mode 100644 index 0000000..154e28b --- /dev/null +++ b/2025.04.04/test/1/c_b.txt @@ -0,0 +1 @@ +12 17 17 17 diff --git a/2025.04.04/test/1/c_x.txt b/2025.04.04/test/1/c_x.txt new file mode 100644 index 0000000..0ed7c1a --- /dev/null +++ b/2025.04.04/test/1/c_x.txt @@ -0,0 +1 @@ +0 1 0 1 0 diff --git a/2025.04.04/test/1/d.txt b/2025.04.04/test/1/d.txt new file mode 100644 index 0000000..230c2d6 --- /dev/null +++ b/2025.04.04/test/1/d.txt @@ -0,0 +1,5 @@ + 68 -41 -17 10 +-41 25 10 -6 +-17 10 5 -3 + 10 -6 -3 2 + 0 0 0 0 diff --git a/2025.04.04/test/1/e.txt b/2025.04.04/test/1/e.txt new file mode 100644 index 0000000..7138fc5 --- /dev/null +++ b/2025.04.04/test/1/e.txt @@ -0,0 +1,6 @@ +1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 diff --git a/2025.04.04/test/1/f.txt b/2025.04.04/test/1/f.txt new file mode 100644 index 0000000..00ba9be --- /dev/null +++ b/2025.04.04/test/1/f.txt @@ -0,0 +1,4 @@ +1 2 3 0 1 4 +2 4 5 -1 0 4 +3 5 -6 -2 -3 1 +0 -1 -2 1 2 1 diff --git a/2025.04.04/test/1/g.txt b/2025.04.04/test/1/g.txt new file mode 100644 index 0000000..7b8c8bf --- /dev/null +++ b/2025.04.04/test/1/g.txt @@ -0,0 +1,4 @@ + 6 5 4 3 2 1 8 7 +-5 -4 -3 -2 -1 -8 -7 -6 + 4 3 2 1 8 7 6 5 +-3 -2 -1 -8 -7 -6 -5 -4 diff --git a/2025.04.04/test/1/g1.txt b/2025.04.04/test/1/g1.txt new file mode 100644 index 0000000..9a6ca6e --- /dev/null +++ b/2025.04.04/test/1/g1.txt @@ -0,0 +1,4 @@ + 6 5 4 3 2 1.1 8 7 +-5 -4 -3 -2 -1.2 -8 -7 -6 + 4 3 2 1.3 8 7 6 5 +-3 -2 -1.4 -8 -7 -6 -5 -4 diff --git a/2025.04.04/test/1/g2.txt b/2025.04.04/test/1/g2.txt new file mode 100644 index 0000000..43a946b --- /dev/null +++ b/2025.04.04/test/1/g2.txt @@ -0,0 +1,4 @@ + 6 5 4 3 2 1.1 8 7 +-5 -4 -3 -2 -1.2 -8.1 -7 -6 + 4 3 2 1.3 8 7 6 5 +-3 -2 -1.4 -8 -7 -6 -5 -4 diff --git a/2025.04.04/test/1/h.txt b/2025.04.04/test/1/h.txt new file mode 100644 index 0000000..eca0b0f --- /dev/null +++ b/2025.04.04/test/1/h.txt @@ -0,0 +1,8 @@ + 6 -5 4 -3 + 5 -4 3 -2 + 4 -3 2 -1 + 3 -2 1 -8 + 2 -1 8 -7 + 1 -8 7 -6 + 8 -7 6 -5 + 7 -6 5 -4 diff --git a/2025.04.04/test/1/h1.txt b/2025.04.04/test/1/h1.txt new file mode 100644 index 0000000..29a53cd --- /dev/null +++ b/2025.04.04/test/1/h1.txt @@ -0,0 +1,8 @@ + 6 -5.1 4 -3 + 5 -4.2 3 -2 + 4 -3.3 2 -1 + 3 -2.4 1 -8 + 2 -1.5 8 -7 + 1 -8.6 7 -6 + 8 -7.7 6 -5 + 7 -6.8 5 -4 diff --git a/2025.04.04/test/1/h2.txt b/2025.04.04/test/1/h2.txt new file mode 100644 index 0000000..b5172a1 --- /dev/null +++ b/2025.04.04/test/1/h2.txt @@ -0,0 +1,8 @@ + 6 -5.1 4 -3 + 5 -4.2 3 -2 + 4 -3.3 2 -1 + 3 -2.4 0.9 -8 + 2 -1.5 8 -7 + 1 -8.6 7 -6 + 8 -7.7 6 -5 + 7 -6.8 5 -4 diff --git a/2025.04.04/test/1/x.txt b/2025.04.04/test/1/x.txt new file mode 100644 index 0000000..abdc297 --- /dev/null +++ b/2025.04.04/test/1/x.txt @@ -0,0 +1 @@ +1 0 1 0 diff --git a/2025.04.04/test/1/x0.txt b/2025.04.04/test/1/x0.txt new file mode 100644 index 0000000..6a20ce4 --- /dev/null +++ b/2025.04.04/test/1/x0.txt @@ -0,0 +1 @@ +0 0 0 0 diff --git a/2025.04.04/test/1/x01.txt b/2025.04.04/test/1/x01.txt new file mode 100644 index 0000000..006db41 --- /dev/null +++ b/2025.04.04/test/1/x01.txt @@ -0,0 +1 @@ +0 1 0 0 diff --git a/2025.04.04/test/3/a.txt b/2025.04.04/test/3/a.txt new file mode 100644 index 0000000..3c00302 --- /dev/null +++ b/2025.04.04/test/3/a.txt @@ -0,0 +1,4 @@ +5 4 1 1 +4 5 1 1 +1 1 4 2 +1 1 2 4 diff --git a/2025.04.04/test/3/b.txt b/2025.04.04/test/3/b.txt new file mode 100644 index 0000000..0e1f44c --- /dev/null +++ b/2025.04.04/test/3/b.txt @@ -0,0 +1,4 @@ +7 4 4 1 +4 7 1 4 +4 1 7 4 +1 4 4 7 diff --git a/2025.04.04/test/3/c.txt b/2025.04.04/test/3/c.txt new file mode 100644 index 0000000..8e48684 --- /dev/null +++ b/2025.04.04/test/3/c.txt @@ -0,0 +1,4 @@ +6 4 4 1 +4 6 1 4 +4 1 6 4 +1 4 4 6 diff --git a/2025.04.04/test/3/d.txt b/2025.04.04/test/3/d.txt new file mode 100644 index 0000000..a50e1ca --- /dev/null +++ b/2025.04.04/test/3/d.txt @@ -0,0 +1,6 @@ +1 2 3 0 1 2 +2 4 5 -1 0 3 +3 5 6 -2 -3 0 +0 -1 -2 1 2 3 +1 0 -3 2 4 5 +2 3 0 3 5 6 diff --git a/2025.04.04/test/3/e.txt b/2025.04.04/test/3/e.txt new file mode 100644 index 0000000..bb6eea9 --- /dev/null +++ b/2025.04.04/test/3/e.txt @@ -0,0 +1,6 @@ +3 2 3 0 1 2 +2 6 5 -1 0 3 +3 5 8 -2 -3 0 +0 -1 -2 3 2 3 +1 0 -3 2 6 5 +2 3 0 3 5 8 diff --git a/2025.04.04/test/3/f.txt b/2025.04.04/test/3/f.txt new file mode 100644 index 0000000..55ade77 --- /dev/null +++ b/2025.04.04/test/3/f.txt @@ -0,0 +1,4 @@ +6 -3 4 1 +4 2 4 0 +4 -2 3 1 +4 2 3 1 diff --git a/2025.04.04/test/3/g.txt b/2025.04.04/test/3/g.txt new file mode 100644 index 0000000..3a2e3f4 --- /dev/null +++ b/2025.04.04/test/3/g.txt @@ -0,0 +1 @@ +-1 diff --git a/2025.04.04/test/a.txt b/2025.04.04/test/a.txt new file mode 100644 index 0000000..8eec100 --- /dev/null +++ b/2025.04.04/test/a.txt @@ -0,0 +1,4 @@ +5 7 6 5 +7 10 8 7 +6 8 10 9 +5 7 9 10 diff --git a/2025.04.04/test/a20.txt b/2025.04.04/test/a20.txt new file mode 100644 index 0000000..cbac2d3 --- /dev/null +++ b/2025.04.04/test/a20.txt @@ -0,0 +1,4 @@ +5e-20 7e-20 6e-20 5e-20 +7e-20 10e-20 8e-20 7e-20 +6e-20 8e-20 10e-20 9e-20 +5e-20 7e-20 9e-20 10e-20 diff --git a/2025.04.04/test/a40.txt b/2025.04.04/test/a40.txt new file mode 100644 index 0000000..c06092f --- /dev/null +++ b/2025.04.04/test/a40.txt @@ -0,0 +1,4 @@ +5e+40 7e+40 6e+40 5e+40 +7e+40 10e+40 8e+40 7e+40 +6e+40 8e+40 10e+40 9e+40 +5e+40 7e+40 9e+40 10e+40 diff --git a/2025.04.04/test/b.txt b/2025.04.04/test/b.txt new file mode 100644 index 0000000..0e1f44c --- /dev/null +++ b/2025.04.04/test/b.txt @@ -0,0 +1,4 @@ +7 4 4 1 +4 7 1 4 +4 1 7 4 +1 4 4 7 diff --git a/2025.04.04/test/c.txt b/2025.04.04/test/c.txt new file mode 100644 index 0000000..a50e1ca --- /dev/null +++ b/2025.04.04/test/c.txt @@ -0,0 +1,6 @@ +1 2 3 0 1 2 +2 4 5 -1 0 3 +3 5 6 -2 -3 0 +0 -1 -2 1 2 3 +1 0 -3 2 4 5 +2 3 0 3 5 6 diff --git a/2025.04.04/test/d.txt b/2025.04.04/test/d.txt new file mode 100644 index 0000000..eb8d46c --- /dev/null +++ b/2025.04.04/test/d.txt @@ -0,0 +1,6 @@ +1 2 3 0 1 4 +2 4 5 -1 0 4 +3 5 6 -2 -3 1 +0 -1 -2 1 2 1 +1 0 -3 2 4 3 +4 4 1 1 3 8 diff --git a/2025.04.04/test/e.txt b/2025.04.04/test/e.txt new file mode 100644 index 0000000..bb6eea9 --- /dev/null +++ b/2025.04.04/test/e.txt @@ -0,0 +1,6 @@ +3 2 3 0 1 2 +2 6 5 -1 0 3 +3 5 8 -2 -3 0 +0 -1 -2 3 2 3 +1 0 -3 2 6 5 +2 3 0 3 5 8 diff --git a/2025.04.04/test/f.txt b/2025.04.04/test/f.txt new file mode 100644 index 0000000..55ade77 --- /dev/null +++ b/2025.04.04/test/f.txt @@ -0,0 +1,4 @@ +6 -3 4 1 +4 2 4 0 +4 -2 3 1 +4 2 3 1 diff --git a/2025.04.04/test/g.txt b/2025.04.04/test/g.txt new file mode 100644 index 0000000..f042ccb --- /dev/null +++ b/2025.04.04/test/g.txt @@ -0,0 +1,4 @@ +-2 2 2 2 +-3 3 2 2 +-2 0 4 2 +-1 0 0 5 diff --git a/2025.04.04/test/h.txt b/2025.04.04/test/h.txt new file mode 100644 index 0000000..b3b37ce --- /dev/null +++ b/2025.04.04/test/h.txt @@ -0,0 +1,8 @@ +6 -3 4 1 +4 2 4 0 +4 -2 3 1 +4 2 3 1 +-2 2 2 2 +-3 3 2 2 +-2 0 4 2 +-1 0 0 5 diff --git a/2025.04.04/test/test1.sh b/2025.04.04/test/test1.sh new file mode 100755 index 0000000..d937e69 --- /dev/null +++ b/2025.04.04/test/test1.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# 300 runs +for ((n=1; n<=300;n++)) ; do echo "--------- n=$n ----------" ; ./a.out $n ; done diff --git a/2025.04.04/test/test13.sh b/2025.04.04/test/test13.sh new file mode 100755 index 0000000..9ddcc45 --- /dev/null +++ b/2025.04.04/test/test13.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# 145 runs +for ((n=2; n<=30;n++)) ; do for ((m=3;m<=$n;m+=3)) ; do echo "n=$n m=$m" ; ./a.out $n $m ; done ; done diff --git a/2025.04.04/test/test13_matr.sh b/2025.04.04/test/test13_matr.sh new file mode 100755 index 0000000..a2e43c6 --- /dev/null +++ b/2025.04.04/test/test13_matr.sh @@ -0,0 +1,15 @@ +#!/bin/bash +echo "a.txt" +./a.out 4 3 /users/data/matr/a.txt +echo "a20.txt" +./a.out 4 3 /users/data/matr/a20.txt +echo "b.txt" +./a.out 4 3 /users/data/matr/b.txt +echo "c.txt" +./a.out 6 3 /users/data/matr/c.txt +echo "d.txt" +./a.out 6 3 /users/data/matr/d.txt +echo "e.txt" +./a.out 6 3 /users/data/matr/e.txt +echo "f.txt" +./a.out 6 3 /users/data/matr/f.txt diff --git a/2025.04.04/test/test13_matr_mpi.sh b/2025.04.04/test/test13_matr_mpi.sh new file mode 100755 index 0000000..e95c428 --- /dev/null +++ b/2025.04.04/test/test13_matr_mpi.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for k in 1 2 ; do echo "k=$k a.txt ---------------" ; mpirun -np $k ./a.out 4 3 /users/data/matr/a.txt ; done +for k in 1 2 ; do echo "k=$k a20.txt ---------------" ; mpirun -np $k ./a.out 4 3 /users/data/matr/a20.txt ; done +for k in 1 2 ; do echo "k=$k b.txt ---------------" ; mpirun -np $k ./a.out 4 3 /users/data/matr/b.txt ; done +for k in 1 2 ; do echo "k=$k c.txt ---------------" ; mpirun -np $k ./a.out 6 3 /users/data/matr/c.txt ; done +for k in 1 2 ; do echo "k=$k d.txt ---------------" ; mpirun -np $k ./a.out 6 3 /users/data/matr/d.txt ; done +for k in 1 2 ; do echo "k=$k e.txt ---------------" ; mpirun -np $k ./a.out 6 3 /users/data/matr/e.txt ; done +for k in 1 2 ; do echo "k=$k f.txt ---------------" ; mpirun -np $k ./a.out 6 3 /users/data/matr/f.txt ; done diff --git a/2025.04.04/test/test13_matr_thr.sh b/2025.04.04/test/test13_matr_thr.sh new file mode 100755 index 0000000..9a2d351 --- /dev/null +++ b/2025.04.04/test/test13_matr_thr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for k in 1 2 ; do echo "k=$k a.txt ---------------" ; ./a.out 4 3 $k /users/data/matr/a.txt ; done +for k in 1 2 ; do echo "k=$k a20.txt ---------------" ; ./a.out 4 3 $k /users/data/matr/a20.txt ; done +for k in 1 2 ; do echo "k=$k b.txt ---------------" ; ./a.out 4 3 $k /users/data/matr/b.txt ; done +for k in 1 2 ; do echo "k=$k c.txt ---------------" ; ./a.out 6 3 $k /users/data/matr/c.txt ; done +for k in 1 2 ; do echo "k=$k d.txt ---------------" ; ./a.out 6 3 $k /users/data/matr/d.txt ; done +for k in 1 2 ; do echo "k=$k e.txt ---------------" ; ./a.out 6 3 $k /users/data/matr/e.txt ; done +for k in 1 2 ; do echo "k=$k f.txt ---------------" ; ./a.out 6 3 $k /users/data/matr/f.txt ; done diff --git a/2025.04.04/test/test13_mpi.sh b/2025.04.04/test/test13_mpi.sh new file mode 100755 index 0000000..a4be11c --- /dev/null +++ b/2025.04.04/test/test13_mpi.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# 3000 runs +for ((n=3; n<=30;n++)) ; do for ((m=3;m<=$n;m+=3)) ; do for ((k=1;k<=$n;k++)) ; do echo "n=$n m=$m k=$k ----------------" ; mpirun -np $k ./a.out $n $m ; done ; done ; done diff --git a/2025.04.04/test/test13_thr.sh b/2025.04.04/test/test13_thr.sh new file mode 100755 index 0000000..1504705 --- /dev/null +++ b/2025.04.04/test/test13_thr.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# 3000 runs +for ((n=3; n<=30;n++)) ; do for ((m=3;m<=$n;m+=3)) ; do for ((k=1;k<=$n;k++)) ; do echo "n=$n m=$m k=$k ----------------" ; ./a.out $n $m $k ; done ; done ; done diff --git a/2025.04.04/test/test1_matr.sh b/2025.04.04/test/test1_matr.sh new file mode 100755 index 0000000..a6c934e --- /dev/null +++ b/2025.04.04/test/test1_matr.sh @@ -0,0 +1,15 @@ +#!/bin/bash +echo "a.txt" +./a.out 4 /users/data/matr/a.txt +echo "a20.txt" +./a.out 4 /users/data/matr/a20.txt +echo "b.txt" +./a.out 4 /users/data/matr/b.txt +echo "c.txt" +./a.out 6 /users/data/matr/c.txt +echo "d.txt" +./a.out 6 /users/data/matr/d.txt +echo "e.txt" +./a.out 6 /users/data/matr/e.txt +echo "f.txt" +./a.out 6 /users/data/matr/f.txt