Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
1d766f116c2e2d18fd5214492d76cc84647195cf
[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/src/smpi/sample
27
28 To compile an example : 
29 # ../smpicc bcast.c -o bcast
30
31 Use 'smpirun' to use it then:
32
33 To run it : 
34 # ../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 # ../smpirun -np 3 -platform platform.xml -hostfile hostfile ./bcast
46
47
48
49
50
51