Skip to content

Instantly share code, notes, and snippets.

@rieck
Last active August 29, 2015 14:04
Show Gist options
  • Save rieck/dc7156dfb8a3422865d5 to your computer and use it in GitHub Desktop.
Save rieck/dc7156dfb8a3422865d5 to your computer and use it in GitHub Desktop.
Harry: Split computation of large distance matrix
#!/bin/sh
# Need to compute a large distance matrix over a set of strings?
# Let Harry split the computations and use multiple hosts
ssh host01 harry -s 3:0 strings.txt distances-0.txt
ssh host02 harry -s 3:1 strings.txt distances-1.txt
ssh host03 harry -s 3:2 strings.txt distances-2.txt
# Simply join the outputs by concatenation
cat distances-?.txt > distances.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment