Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
finish the first tesh file of SMPI example
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Jun 2009 13:32:23 +0000 (13:32 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Jun 2009 13:32:23 +0000 (13:32 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6359 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/smpi/Makefile.am
examples/smpi/bcast.tesh

index 45d03f4..63415a3 100644 (file)
@@ -1,16 +1,18 @@
-# Copyright (c) 2004-2007. The SimGrid team. All right reserved.
+# Copyright (c) 2004-2009. The SimGrid team. All right reserved.
 
 # This file is part of the SimGrid project. This is free software:
 # You can redistribute and/or modify it under the terms of the
 # GNU LGPL (v2.1) licence.
 
 
 
 # This file is part of the SimGrid project. This is free software:
 # You can redistribute and/or modify it under the terms of the
 # GNU LGPL (v2.1) licence.
 
 
-#INCLUDES  = -I$(top_srcdir)/include
-#AM_CFLAGS = -g
-
-# For each test and/or example:
+# HOW TO ADD A NEW EXAMPLE:
+#
 #  - add the binary name into the noinst_PROGRAMS variable
 #  - add a rule to compile the program, inspired from the existing ones
 #  - add the binary name into the noinst_PROGRAMS variable
 #  - add a rule to compile the program, inspired from the existing ones
+#  - add a tesh file running it in several conditions. 
+#    Write the file taking the others as example, and after reading
+#    <simgrid>/tools/tesh/README.tesh
+#  - List the tesh file in the TESTS variable so that it gets tested on make check
 
 noinst_PROGRAMS = bcast bcbench compute compute2 compute3 first second mvmul ring_c split
 #reduce Not working yet (FIXME)
 
 noinst_PROGRAMS = bcast bcbench compute compute2 compute3 first second mvmul ring_c split
 #reduce Not working yet (FIXME)
@@ -39,7 +41,7 @@ mvmul: mvmul.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
 
 # List the tesh files below
        $(top_builddir)/src/smpi/smpicc $^ -o $@
 
 # List the tesh files below
-TESTS = 
+TESTS = bcast.tesh
 
 # No need to change anything after that line
 TESTS_ENVIRONMENT = $(top_builddir)/tools/tesh/tesh
 
 # No need to change anything after that line
 TESTS_ENVIRONMENT = $(top_builddir)/tools/tesh/tesh
index 822b37a..3584c6d 100644 (file)
@@ -1,8 +1,16 @@
+# define a variable for the command line since it's so long
+# (since we use it only in rewriting in this file, defining it once is enough)
+! setenv cmdline=../../src/smpi/smpirun -quiet -hostfile hostfile -platform ../msg/small_platform.xml 
+
 # use the tested library, not the installed one
 # 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
 ! setenv LD_LIBRARY_PATH=../../src/.libs
-! setenv cmdline=../../src/smpi/smpirun -quiet -hostfile hostfile -platform ../msg/small_platform.xml 
 
 
-! output ignore
+# Ignore the output since it contains timing information depending on the host speed
+#   (FIXME: add an option to SIMIX to not display this timing)
+! output display
+
+# Go for the first test
 p Test Broadcast with less processes than hosts
 $ ${cmdline} -np 3 ./bcast
 > [rank 0] -> Tremblay
 p Test Broadcast with less processes than hosts
 $ ${cmdline} -np 3 ./bcast
 > [rank 0] -> Tremblay
@@ -16,8 +24,18 @@ $ ${cmdline} -np 3 ./bcast
 > node 2 has value 17 after broadcast
 > [0.000000] [smpi_kernel/INFO] simulation time 0.00343892
 
 > node 2 has value 17 after broadcast
 > [0.000000] [smpi_kernel/INFO] simulation time 0.00343892
 
+
+
+# second test
 p Test Broadcast with as much processes than hosts
 p Test Broadcast with as much processes than hosts
+! output display
+! setenv LD_LIBRARY_PATH=../../src/.libs
 $ ${cmdline} -np 6 ./bcast
 
 $ ${cmdline} -np 6 ./bcast
 
+
+
+# Another test
 p Test Broadcast with more processes than hosts
 p Test Broadcast with more processes than hosts
+! output display
+! setenv LD_LIBRARY_PATH=../../src/.libs
 $ ${cmdline} -np 12 ./bcast
 $ ${cmdline} -np 12 ./bcast