source: pypar/documentation/pypar_installation.tex @ 643

Last change on this file since 643 was 124, checked in by ole, 19 years ago

Doc files and ring_example

File size: 3.6 KB
Line 
1       
2a native MPI library (e.g.\ LAM/MPI or MPICH),
3that
4that the MPI runtime system is up and running (e.g.\ using \texttt{lamboot}).
5If not please see the installation notes at the pypar web site.
6
7       
8%Taken from exercise 5
9
10\subsection*{Preliminaries}
11
12\subsubsection*{The shell configuration}
13Log in using the username you created previously.
14You will need to configure a few environment variables to make
15life simpler.
16Environment variables control the way you personally interact with the
17shell and they are defined in the file \texttt{.bashrc} which lives in
18your home directory. Edit \texttt{.bashrc} and add the following lines
19
20\begin{verbatim}
21export PATH=.:$HOME/bin:${PATH}
22export LAMRSH="ssh -x"
23\end{verbatim}
24
25The first line asks the shell to always look for files in the directory
26you are working in. The second tells the MPI runtime system to use
27secure shell (ssh) without graphics capabilities (X11).
28Close the shell window and open a new one for this to take effect. 
29
30\subsubsection*{Setting up the secure shell environment}
31
32Next we will make sure that you can access all machines without having to
33type in your password every time. The secure shell (ssh) has a capability
34to store your password encrypted on your disk and automatically provide
35it when needed. To accomplish this you need the following steps:
36
37\begin{enumerate} 
38  \item ssh-keygen -t rsa (Generate codes for the encryption)\\
39  \emph{When asked for a filename, just go with the suggested default.
40  When asked for a passphrase just press \textbf{Enter} twice}
41  \item cd \verb+~/.ssh+ 
42  \item cp id\_rsa.pub authorized\_keys   
43\end{enumerate}
44
45Whenever you try to log into a remote host using ssh, your host will
46negotiate with the remote host using these keys and if accepted provide
47the password automatically. To test try
48\begin{verbatim}
49  ssh ninja-n whoami
50\end{verbatim}
51where
52\[
53  n = 1, 2, \ldots 8
54\]
55This will log you in briefly issue the command \texttt{whoami},
56display the result and log you out again.
57
58The first time you do this you will see the message
59\begin{verbatim}
60The authenticity of host 'ninja-8 (192.168.1.8)' can't be established.
61RSA key fingerprint is 06:eb:b3:e0:f1:57:35:0e:58:49:b4:48:46:fb:5c:aa.
62Are you sure you want to continue connecting (yes/no)?
63\end{verbatim}
64which means that this is the first time the encrypted connection
65is to be established. Just type \texttt{yes}.
66You might also see a warning message about X11 forwarding which
67you can ignore. From now on you should be able to move freely among
68the hosts in our cluster.
69See \texttt{man ssh} for more information.
70
71\subsection*{The MPI runtime system}
72
73We are now ready to start the \emph{MPI runtime system} which comprises a
74number of servers (one on each machine) who will allow you to execute
75MPI programs in parallel.
76
77The runtime system needs a configuration file listing
78the hosts who are participating in the cluster.
79Create a file called \texttt{.lamhosts} in your
80home directory (\verb+~+).
81To begin with list \emph{only} the machine you are working on, e.g.
82\begin{verbatim}
83ninja-n
84\end{verbatim} 
85where n is the number you are working on.
86Later we will add more machines.
87%namely \texttt{ninja-1} to \texttt{ninja-8}.
88
89The MPI runtime is then started by issuing the command
90\begin{verbatim}
91  lamboot -v ~/.lamhosts
92\end{verbatim}
93which reads the configuration file, logs in to all listed hosts and
94start the MPI servers. 
95You should see a diagnostic message like
96\begin{verbatim}
97LAM 6.5.8/MPI 2 C++/ROMIO - Indiana University
98
99Executing hboot on n2 (ninja-n - 1 CPU)...
100\end{verbatim}
101and you are ready to run MPI.
102
103       
104
Note: See TracBrowser for help on using the repository browser.