== Intall mpich2 == === 1. Testbed Introduction === * VMware Workstation 5.0 * Create three nodes, client-01 ~ client-03, all with 5GB HD and 128MB memory. * The OS on these 3 nodes is Ubuntu-7.10-server * hostname and IP are: * client-01 192.168.180.131 * client-02 192.168.180.132 * client-03 192.168.180.133 === 2. Getting Start to intall mpich2 === * '''Step 1''' : Modify /etc/hosts * Assume that we got 3 machines in our testbed, now we have to edit /etc/hosts on each node.[[BR]] Here is the example of client-01. So does the other two nodes. {{{ root@client-01:~# cat > /etc/hosts << "EOF" > 127.0.0.1 localhost > 192.168.180.131 client-01 > 192.168.180.132 client-02 > 192.168.180.133 client-03 > EOF }}} * Check the /etc/hosts contents, it should be like this. {{{ root@client-01:~# cat /etc/hosts 127.0.0.1 localhost 192.168.180.131 client-01 192.168.180.132 client-02 192.168.180.133 client-03 }}} * Notice that if there is __127.0.0.1 client-01__ in /etc/hosts, it must be deleted. * '''Step 2''' : Download and Install mpich2 * We use mpcich2-1.0.7rc1 for example. {{{ root@client-01:~# wget http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/mpich2-1.0.7rc1.tar.gz root@client-01:~# tar -zxvf mpich2-1.0.7rc1.tar.gz cd mpich2-1.0.7rc1/ }}} * You could choose the install location as you wish, but all the nodes must have the same install location!! [[BR]] We use ''/opt/mpich2'' here for example. {{{ root@client-01:~/mpich2-1.0.7rc1# ./configure preifx=/opt/mpich2 }}} * If there are errors when configuring mpich2, you may need some packages or libraries such as c/c++ compiler.[[BR]] Try this : {{{ root@client-01:~/mpich2-1.0.7rc1# apt-get install build-essential }}} * compile and install {{{ root@client-01:~/mpich2-1.0.7rc1# make root@client-01:~/mpich2-1.0.7rc1# make install }}} * '''Step 3''' : Check if the Installation is Successful * Try these commands to see if the mpich2 have been installed correctly. {{{ root@client-01:~/mpich2-1.0.7rc1# which mpd /usr/local/bin/mpd root@client-01:~/mpich2-1.0.7rc1# which mpicc /usr/local/bin/mpicc root@client-01:~/mpich2-1.0.7rc1# which mpiexec /usr/local/bin/mpiexec root@client-01:~/mpich2-1.0.7rc1# which mpirun /usr/local/bin/mpirun }}} * If there is nothing showed on the screen when enter ''which xxxx'', you probably need to set your environment variables. {{{ root@client-01:~/mpich2-1.0.7rc1# export PATH="$PATH:/opt/mpich2/bin" }}} * '''Step 4''' : Add New Configuration Files * Add ''mpd.host file'', you could put it anywhere in your system. {{{ root@client-01:~/mpich2-1.0.7rc1# touch mpd.hosts root@client-01:~/mpich2-1.0.7rc1# cat > mpd.hosts << "EOF" > client-01 > client-02 > client-03 > EOF }}} * Check if the content in mpd.hosts is correct. {{{ root@client-01:~/mpich2-1.0.7rc1# cat mpd.hosts client-01 client-02 client-03 }}} * Add ''/etc/mpd.conf'', there is only one line in it. Notice that all the nodes must have the same password. We use "this_is_password" for example here. {{{ root@client-01:~/mpich2-1.0.7rc1# touch /etc/mpd.conf root@client-01:~/mpich2-1.0.7rc1# cat > /etc/mpd.conf << "EOF" > secretword=this_is_password > EOF }}} * Change the file properties to 600 for security consideration. {{{ root@client-01:~/mpich2-1.0.7rc1# chmod 600 /etc/mpd.conf }}} ----