Commit 6dd972cd authored by mohamadbashar.disoki's avatar mohamadbashar.disoki

Update READEME.md

parent 4e8d0f08
...@@ -24,20 +24,20 @@ the way given below, to generate an executable *mpi_sample*. ...@@ -24,20 +24,20 @@ the way given below, to generate an executable *mpi_sample*.
mpicc -o mpi_sample mpi_sample.c mpicc -o mpi_sample mpi_sample.c
``` ```
**Note**: compile your code within the **/nfs** shared directory **Note**: compile your code under the **/nfs** shared directory
To run it only in your machine (with 2 processes), you do To run it only in your machine (with 2 processes), you do
``` ```
mpirun -np 2 ./mpi_sample mpirun -np 2 ./mpi_sample
``` ```
Now, to run it within a cluster (add the hostname of the cluster's node you want to use), Now, to run it in the cluster (add the hostname of the cluster's node you want to use),
``` ```
mpirun -np 5 -hosts master,localhost ./mpi_sample mpirun -np 5 -hosts master,slave1 ./mpi_sample
``` ```
Or specify the same in a hostfile Or specify the same in a hostfile (add user=mpiuser for slave1, slave2 hosts)
``` ```
mpirun -np 3 -f mpi_hosts ./mpi_sampl mpirun -np 3 -f mpi_hosts ./mpi_sampl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment