| Article Index |
|---|
| Setting up a Beowulf Cluster in 13 Steps |
| Kick Start Your Cluster |
| Cluster is Ready!! |
| All Pages |
Your cluster is ready!!! You can test run your programs by compiling the code available in the examples directory within mpich1 directory. Since example files have a MakeFile associated with them, you can compile the code by simply typing make command in the terminal after navigating to the corresponding directory.
To execute your code, make sure that the executable is at the same path in all nodes ie. If "foo" is your executable present in the path /home/mpiuser/mpich1/example/foo in node0, then that executable must be present in the same path in all other nodes.
To execute the code foo, type the following command in terminal after navigating to the location of the executable: mpirun -np 2 foo. Its enough to run the command in any one of the nodes, but make sure that the executable file is present in the same path in all the nodes. Here mpirun is the command that will run our program in all the nodes specified in the machines.LINUX file. "-np 2" flag indicates the number of processes to be spawned. Here we spawn two processes. By default one process will be spawned in the home node. Since here we used "-np 2", two processes will be spawned, one in the host machine and other in the node listed in the machines.LINUX file. If the machines.LINUX file has 10 nodes listed and "-np 2" flag is used, only the node represented by the first entry in the file is attached to the cluster.
- Usually RSH is used in place of SSH. But since SSH is so easily configurable, we stick with SSH. Moreover SSH is secure than RSH
- Do not use MPICH2. I was unable to get MPICH2 to work properly
- Make sure that your executable is there in same location in all the nodes
The whole process can be further simplified, if we could set up a Network File System and mount that directory in all the nodes. Thus changes made in the directory in one node will reflect to all the other nodes. Instructions on how to get this working are available in the following references.
This tutorial can be expanded to add more features such as NFS etc. Please refer to the following links for comprehensive tutorials.
- - MPICH Ubuntu Cluster
- https://help.ubuntu.com/community/MpichCluster
- - Using MPICH to build a small beowulf cluster
- http://www.linuxjournal.com/article/5690
- - MPICH-1
- http://www.mcs.anl.gov/research/projects/mpi/mpich1/
If you have any doubts or queries, feel free to post it in our Google Groups
| < Prev |
|---|




