HPC MPI Exercise 1: One-Time Setup


Setting Up For Distributed Processing

By default, MPI uses ssh (the Secure Shell) to launch processes on remote systems. However, we have configured MPI to use an older protocol called rsh (the Remote Shell), which is faster because it avoids the encryption/decryption overhead of ssh. To set up rsh, you need to have a text file named .rhosts in your home directory, containing the names of all the hosts in Calvin's CS Labs. To create this file, enter the following command in your home directory:

    cp /home/cs/374/rhosts .rhosts
You can verify that this worked by entering:
    ls -al
This should reveal all of the files in your home directory, including .rhosts. You can then use the command:
   cat .rhosts
or
   less .rhosts
to view the contents of the .rhosts file. (You will need to use cp, ls, and cat or less frequently during this semester, so if you are not used to using the Linux commandline interface, I recommend you keep a list of such commands as you use them.)

The rsh protocol requires that this .rhosts file be kept secure. You should set its permissions so that you and only you can read or write to it, as follows:

    chmod 600 .rhosts
With that, you (and MPI) should now be able to use rsh to launch a process on any CS lab machine (running Linux) without entering a password!

If you look at the name of the first machine in the file, you can test things out by entering:

   rsh machineName
If all is well, you should login to that machine (or any of the machines named in .rhosts) without having to enter your password. You can verify that this worked by checking that your prompt has changed to the name of that new machine. Assuming this worked correctly, use Ctrl-d to logout and return to your own workstation--your prompt should change back--before continuing.

Once you can launch remote shells on CS lab machines without entering a password, you are ready to generate an MPI hosts file.


CS > 374 > Exercises > 01 > One Time Setup


This page maintained by Joel Adams.