git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6359
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
-# 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)
$(top_builddir)/src/smpi/smpicc $^ -o $@
# List the tesh files below
$(top_builddir)/src/smpi/smpicc $^ -o $@
# List the tesh files below
# 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
+# 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
+# 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
> 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
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
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