public
Created

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.