Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
3584c6d8aa21c32ac09185c8246ec8ee63e4d36f
[simgrid.git] / examples / smpi / bcast.tesh
1 # define a variable for the command line since it's so long
2 # (since we use it only in rewriting in this file, defining it once is enough)
3 ! setenv cmdline=../../src/smpi/smpirun -quiet -hostfile hostfile -platform ../msg/small_platform.xml 
4
5 # use the tested library, not the installed one
6 # (since we want to pass it to the child, it has to be redefined before each command)
7 ! setenv LD_LIBRARY_PATH=../../src/.libs
8
9 # Ignore the output since it contains timing information depending on the host speed
10 #   (FIXME: add an option to SIMIX to not display this timing)
11 ! output display
12
13 # Go for the first test
14 p Test Broadcast with less processes than hosts
15 $ ${cmdline} -np 3 ./bcast
16 > [rank 0] -> Tremblay
17 > [rank 1] -> Jupiter
18 > [rank 2] -> Fafard
19 > node 1 has value 3 before broadcast
20 > node 0 has value 17 before broadcast
21 > node 2 has value 3 before broadcast
22 > node 1 has value 17 after broadcast
23 > node 0 has value 17 after broadcast
24 > node 2 has value 17 after broadcast
25 > [0.000000] [smpi_kernel/INFO] simulation time 0.00343892
26
27
28
29 # second test
30 p Test Broadcast with as much processes than hosts
31 ! output display
32 ! setenv LD_LIBRARY_PATH=../../src/.libs
33 $ ${cmdline} -np 6 ./bcast
34
35
36
37 # Another test
38 p Test Broadcast with more processes than hosts
39 ! output display
40 ! setenv LD_LIBRARY_PATH=../../src/.libs
41 $ ${cmdline} -np 12 ./bcast