Quantcast
Viewing latest article 13
Browse Latest Browse All 21

Answer by Ho1 for How to run a job in several machines that have Ubuntu as operating system

There are several tools for having a kind of "parallel ssh". As you use Python, pssh should be fine. Install it with pip:

$ sudo pip install pssh  

Create a pssh hosts file like this:

192.168.0.10:22192.168.0.11:22

and then invoke:

$ pssh -h pssh-hosts -l root -A echo "Hi!"

You will asked for your password, but you can use certificates to avoid manual entering of passwords.

See more:

http://www.tecmint.com/execute-commands-on-multiple-linux-servers-using-pssh/

One important note: If you want to solve a problem in parallel, you may need MPI (Message Passing Interface). I suggest MPICH. MPI provides a standard means of communication to solve a problem collaboratively with multiple machines in parallel. Although, writing fast applications to find prime numbers/factors is nothing new.

If you have a multicore machine, use multithreading. But if you are going to use multiple computers, you will need MPI.


Viewing latest article 13
Browse Latest Browse All 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>