3

The cluster I am using has several host types - different distributions/versions of Linux, some 32 bit, some 64 bit, different versions of GCC. I know that I should compile my program with platform specific MPI wrapper for GCC. This step is more or less clear to me.

My program uses fixed number of hosts and each host runs exactly 1 process. Shared memory threads are handled by TBB, so basically I need MPI only for work distribution between hosts.

The last step would be to run the program on all hosts. It turns out that it is the part I am not sure how to do and my IT folks couldn't help me.

What I have is a list of host IP addresses (local addresses to be precise, something like 192.168.1.xxx) and user name and password for each host. What are the step to run my program on all hosts, provided it was compiler with platform specific compiler and copied into each host? Any help appreciated.

1 Answer 1

3

You need passwordless SSH access to all machines, a hostfile, the executable on all machines. Make sure the executable has the same (relative) path on all machines.

Hostfile (on the master machine):

# my_hostfile 
192.168.0.205
192.168.0.208

Command for Open MPI:

mpirun --hostfile my_hostfile programname

For passwordless SSH access create a masterkey under ~/.ssh

ssh-keygen -t rsa

Add the (one line) content of ~/.ssh/rsa.pub from your master machine to a new line in ~/.ssh/authorized_keys2 on your target machines. (Instead of RSA you can use another SSH cryptosystem.)

Sign up to request clarification or add additional context in comments.

2 Comments

I've never used mpi but don't you need to startup something on the hosts?
I'm gonna try that out on the local cluster tomorrow morning. ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.