One of my class in this semester is Parallel Programming. Normally, I have to use cluster computer in the faculty by using remote log in, but, I don't like when I have to modify codes or create new codes, I have to upload it to the server. It's not convenience for me. So, I just find the solution to run parallel code (MPI) in one single machine that can work as the cluster with one machine.
The solution is we can use mpich2 package. The step to install is here.
Requirement:
You have to use Linux (I try with Ubuntu 10.10 and Mint 9). You may run this os through a Virtual Machine.
Step:
1. If your machine doesn't install gcc then type : "sudo apt-get install gcc"
2. Then you install mpich2 by using this command : "sudo apt-get install mpich2"
3. After you install come to your home folder e.g. /home/[your username] by : "cd $HOME"
4. Then you go to that directory and create the file name ".mpd.conf" and the content is "MPD_SECRETWORD=mr45-j9z"
5. type "chmod 600 .mpd.conf"
6. The directory that want to run code have to create the file name "mpd.hosts" which content is "localhost"
7. Finish configuration.
Test:
1. You have to boot mpd by "mpdboot -n 1"
2. Your machine Must be connected to the access point.
3. Compile program by "mpicc -o x x.c" ; where x is your code file name .
4. Run the code by "mpirun -np y ./x" ; where y is process number and x is object code name.
Now, You can run MPI code in your machine.
More Information: https://help.ubuntu.com/community/MpichCluster
No comments:
Post a Comment