Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Plug some easy memleaks
[simgrid.git] / src / smpi / README
1
2 Quick Notes : getting started with the examples
3 ===============================================
4
5 ..:: What you need ::..
6
7 - a platform file describing the environment. You can go to 
8   the Platform Description Archive (http://pda.gforge.inria.fr/) to
9   get an existing one or generate your own platform with the
10   SIMULACRUM tool (see 'Download' section there).
11
12 - a hostfile. Like in almost all MPI distributions, the hostfile
13   list the hosts which the processes will be mapped on. At present,
14   the format is one hostname per line. The hostnames must be present
15   in the platform file. 
16
17   Note: the mapping of MPI processes (ranks) follows the order of the
18         hostfile. Rank 0 is mapped to first hostname in hostfile, Rank 1
19         on second hostname, etc. If n (where -np n) is greater than the
20         number l of lines in hostfile, the mapping is done round-robin. 
21
22
23 ..:: Try the examples ::..
24
25 Go to :
26 # cd simgrid/examples/smpi
27
28 To compile an example : 
29 # ../../src/smpi/smpicc bcast.c -o bcast
30
31 Use 'smpirun' to use it then:
32
33 To run it : 
34 # ../../src/smpi/smpirun -np 3 ./bcast 
35 node 0 has value 17
36 node 2 has value 3
37 node 1 has value 3
38 node 1 has value 17
39 node 0 has value 17
40 node 2 has value 17
41 [0.000000] [smpi_kernel/INFO] simulation time 4.32934e-05
42
43
44 To run it with a specific platform:
45 # ../../src/smpi/smpirun -np 3 -platform platform.xml -hostfile hostfile ./bcast
46
47 Note that by default, the examples use the installed version of
48 simgrid. So please install it before playing with the examples, or set
49 a LD_LIBRARY_PATH variable pointing to src/.libs
50
51
52
53