Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Setting up Open MPI to run on multiple servers
From: Joshua Bernstein (jbernstein_at_[hidden])
Date: 2008-08-11 20:34:10


Rayne wrote:
> Hi all,
> I am trying to set up Open MPI to run on multiple servers, but as I
> have very little experience in networking, I'm getting confused by the
> info on open-mpi.org, with the .rhosts, rsh, ssh etc.
>
> Basically what I have now is a PC with Open MPI installed. I want to
> connect it to, say, 10 servers, so I can run MPI programs on all 11
> nodes. From what I've read, I think I need to install Open MPI on the
> 10 servers too, and there must be a shared directory where I keep all
> the MPI programs I've written, so all nodes can access them.
>
> Then I need to create a machine file on my local PC (I found a default
> hostfile "openmpi-default-hostfile" in {prefix}/etc/. Can I use that
> instead so I need not have "-machinefile machine" with every mpiexec?)
> with the list of the 10 servers. I'm assuming I need to put down the
> IP addresses of the 10 servers in this file. I've also read that the
> 10 servers also need to each have a .rhosts file that tells them the
> machine (i.e. my local PC) and user from which the programs may be
> launched from. Is this right?
>
> There is also the rsh/ssh configuration, which I find the most
> confusing. How do I know whether I'm using rsh or ssh? Is following
> the instructions on http://www.open-mpi.org/faq/?category=rsh under
> "3: How can I make ssh not ask me for a password?" sufficient? Does
> this mean that when I'm using the 10 servers to run the MPI program,
> I'm login to them via ssh? Is this necessary in every case?
>
> Is doing all of the above all it takes to run MPI programs on all 11
> nodes, or is there something else I missed?

More or less. Though the first step is to setup password-less SSH
between all 11 machines. I'd completely skip the use of RSH as its very
insecure and shouldn't be used in non-dedicated cluster, and even
then... You should basically setup SSH so a user can SSH from one node
to another without specify a password or entering in any other information.

Then, the next is to setup NFS. NFS provides you with a way to share a
directory on one computer, to many other computers avoiding the hassel
of having to copy all your MPI programs to all of the nodes. This is
generally as easy as configuring /etc/exports, and then just mounting
the directory on the other computers. Be Sure you mount the directories
in the same place on every node though.

Lastly, give your MPI programs a shot. While you don't need to have a
hostlist, because you can specify the hostname (or IPs). on the mpirun
command line. But you your case its likely a good idea.

Hope that gets you started...

-Joshua Bernstein
Software Engineer
Penguin Computing