From aeecb4a229ff5617422483d5945c875dce84ac0e Mon Sep 17 00:00:00 2001 From: genaud Date: Tue, 30 Jun 2009 14:32:30 +0000 Subject: [PATCH] added automatic test of reduce git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6402 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/smpi/Makefile.am | 2 +- examples/smpi/reduce.tesh | 99 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 examples/smpi/reduce.tesh diff --git a/examples/smpi/Makefile.am b/examples/smpi/Makefile.am index 83984e3726..807e1d757d 100644 --- a/examples/smpi/Makefile.am +++ b/examples/smpi/Makefile.am @@ -40,7 +40,7 @@ mvmul: mvmul.c $(top_builddir)/src/smpi/smpicc $^ -o $@ # List the tesh files below -TESTS = bcast.tesh +TESTS = bcast.tesh reduce.tesh # No need to change anything after that line TESTS_ENVIRONMENT = $(top_builddir)/tools/tesh/tesh diff --git a/examples/smpi/reduce.tesh b/examples/smpi/reduce.tesh new file mode 100644 index 0000000000..7d0df32eaf --- /dev/null +++ b/examples/smpi/reduce.tesh @@ -0,0 +1,99 @@ +# use the tested library, not the installed one +# (since we want to pass it to the child, it has to be redefined before each command) +! setenv LD_LIBRARY_PATH=../../src/.libs + +# Go for the first test +p Test Reduce with 3 processes +$ ../../src/smpi/smpirun -map -hostfile hostfile -platform ../msg/small_platform.xml -np 3 ./reduce +> [rank 0] -> Tremblay +> [rank 1] -> Jupiter +> [rank 2] -> Fafard +> [0] has value 1 +> [1] has value 2 +> [2] has value 3 +> ** Scalar Int Test Result: +> [0] sum=6 ... validation ok. +> [0] min=1 ... validation ok. +> [0] max=3 ... validation ok. +> Elapsed time=0.007907 s +> ** IBM Test Result: ... +> [0] ok. +> [2] ok. +> [1] ok. + +# second test +! setenv LD_LIBRARY_PATH=../../src/.libs +p Test Reduce with 6 processes +$ ../../src/smpi/smpirun -map -hostfile hostfile -platform ../msg/small_platform.xml -np 6 ./reduce +> [rank 0] -> Tremblay +> [rank 1] -> Jupiter +> [rank 2] -> Fafard +> [rank 3] -> Ginette +> [rank 4] -> Bourassa +> [rank 5] -> Tremblay +> [0] has value 1 +> [1] has value 2 +> [2] has value 3 +> [3] has value 4 +> [4] has value 5 +> [5] has value 6 +> ** Scalar Int Test Result: +> [0] sum=21 ... validation ok. +> [0] min=1 ... validation ok. +> [0] max=6 ... validation ok. +> Elapsed time=0.007907 s +> ** IBM Test Result: ... +> [4] ok. +> [2] ok. +> [0] ok. +> [5] ok. +> [1] ok. +> [3] ok. + + +# third test +! setenv LD_LIBRARY_PATH=../../src/.libs +p Test Reduce with 12 processes +$ ../../src/smpi/smpirun -map -hostfile hostfile -platform ../msg/small_platform.xml -np 12 ./reduce +> [rank 0] -> Tremblay +> [rank 1] -> Jupiter +> [rank 2] -> Fafard +> [rank 3] -> Ginette +> [rank 4] -> Bourassa +> [rank 5] -> Tremblay +> [rank 6] -> Jupiter +> [rank 7] -> Fafard +> [rank 8] -> Ginette +> [rank 9] -> Bourassa +> [rank 10] -> Tremblay +> [rank 11] -> Jupiter +> [0] has value 1 +> [1] has value 2 +> [2] has value 3 +> [3] has value 4 +> [4] has value 5 +> [5] has value 6 +> [6] has value 7 +> [7] has value 8 +> [8] has value 9 +> [9] has value 10 +> [10] has value 11 +> [11] has value 12 +> ** Scalar Int Test Result: +> [0] sum=78 ... validation ok. +> [0] min=1 ... validation ok. +> [0] max=12 ... validation ok. +> Elapsed time=0.007908 s +> ** IBM Test Result: ... +> [1] ok. +> [11] ok. +> [0] ok. +> [5] ok. +> [10] ok. +> [3] ok. +> [8] ok. +> [4] ok. +> [9] ok. +> [2] ok. +> [7] ok. +> [6] ok. -- 2.20.1