LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   URGENT: "how to let mpirun work with SSH" (https://www.linuxquestions.org/questions/linux-server-73/urgent-how-to-let-mpirun-work-with-ssh-639911/)

math_physics 05-04-2008 10:44 PM

URGENT: "how to let mpirun work with SSH"
 
I install mpich-1.2.5 on my RH9.0.
I generate RAS key pair using command
Code:

ssh-keygen -t rsa
Then I copy id_rsa.pub to .ssh/authorized_keys:
Code:

mv id_rsa.pub authorized_keys
Now I can log in my machine without password using SSH.

But when I run a MPI program, I got these error messages:
Code:

mpirun -np 2 ddscat
Permission denied.
p0_4657:  p4_error: Child process exited while making connection to remote process on t0.lz.cn: 0

"t0.lz.cn" is my hostname.

I added "t0.lz.cn" to file /etc/hosts.equiv, the problem is solved.

But if you add hostnames to /etc/hosts.equiv, then there is no need to use RSA keys.

Could anyone give me some ideas, if I do not use the file /etc/hosts.equiv?

Thank you!

beadyallen 05-05-2008 03:37 PM

You need the id_rsa.pub key to be in all the slave machine's home directories as well. Copy it to all the slave node's ~/.ssh/authorized_keys and you should be able to log into each one without a password. Also, depending on what MPI version you're running (I can't remember off the top of my head for mpich), you'll need to set an environment variable to tell mpi to SSH instead of RSH.

edit: Just re-read your post, and you're trying to run 2 procs on the same machine. In that case I'd look for the environment variable to set.

math_physics 05-05-2008 09:29 PM

beadyallen:
Thank you!
In fact, I have done what you said. But the problem is still there.


All times are GMT -5. The time now is 10:10 AM.