Skip to content

Instantly share code, notes, and snippets.

@sebhtml
Created September 21, 2011 20:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sebhtml/1233173 to your computer and use it in GitHub Desktop.
#!/bin/bash
# how to use:
# first execute the on node1
# then run it on node2
# you have to change node1 and node2
firstPort=18515
lastPort=18525
iterations=1000000
node1=colosse1
node2=colosse2
hostname=$(hostname)
for port in $(seq $firstPort $lastPort)
do
if test $hostname = $node1
then
(
echo "$(date) start $hostname $port "
ibv_rc_pingpong --port $port --iters $iterations
echo "$(date) end $hostname $port"
) &> $0.$hostname.$port.txt &
else
(
echo "$(date) start $hostname $port"
ibv_rc_pingpong --port $port --iters $iterations $node1
echo "$(date) end $hostname $port"
) &> $0.$hostname.$port.txt &
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment