X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cf0ddebf009b2bc9286e62563880c2ffdccdef67..a9c3061cd030f1df440da03ce89f6498def03db1:/src/smpi/README diff --git a/src/smpi/README b/src/smpi/README index 7c5e1cd553..c3cfb9b829 100644 --- a/src/smpi/README +++ b/src/smpi/README @@ -2,16 +2,36 @@ Quick Notes : getting started with the examples =============================================== +..:: What you need ::.. + +- a platform file describing the environment. You can go to + the Platform Description Archive (http://pda.gforge.inria.fr/) to + get an existing one or generate your own platform with the + SIMULACRUM tool (see 'Download' section there). + +- a hostfile. Like in almost all MPI distributions, the hostfile + list the hosts which the processes will be mapped on. At present, + the format is one hostname per line. The hostnames must be present + in the platform file. + + Note: the mapping of MPI processes (ranks) follows the order of the + hostfile. Rank 0 is mapped to first hostname in hostfile, Rank 1 + on second hostname, etc. If n (where -np n) is greater than the + number l of lines in hostfile, the mapping is done round-robin. + + +..:: Try the examples ::.. + Go to : -# cd simgrid/src/smpi/sample +# cd simgrid/examples/smpi To compile an example : -# ../smpicc bcast.c -o bcast +# ../../src/smpi/smpicc bcast.c -o bcast Use 'smpirun' to use it then: To run it : -# ../smpirun -np 3 ./bcast +# ../../src/smpi/smpirun -np 3 ./bcast node 0 has value 17 node 2 has value 3 node 1 has value 3 @@ -22,9 +42,11 @@ node 2 has value 17 To run it with a specific platform: -# ../smpirun -np 3 -platform platform.xml -hostfile hostfile ./bcast - +# ../../src/smpi/smpirun -np 3 -platform platform.xml -hostfile hostfile ./bcast +Note that by default, the examples use the installed version of +simgrid. So please install it before playing with the examples, or set +a LD_LIBRARY_PATH variable pointing to src/.libs