File: start_mpds.sh

package info (click to toggle)
dmtcp 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,496 kB
  • sloc: cpp: 33,592; ansic: 28,099; sh: 6,735; makefile: 1,950; perl: 1,690; python: 1,241; asm: 138; java: 13
file content (32 lines) | stat: -rwxr-xr-x 559 bytes parent folder | download | duplicates (3)
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
32
#!/bin/sh
#this script was used to initialize a ring of MPDs on teracluster
#the mpd started scripts were too annoying
#it expects a file 'hosts' to list nodes in the cluster
#it takes one arg, the number of remote mpd's to start


set -m

MPD="dmtcp_launch $HOME/mpich2/bin/mpd "
HOST="teracluster"
PORT="7778"

if test -z "$1"
then
 echo "usage $0 N"
 exit 1
fi

#start local
$MPD --listenport=7778 &
sleep 1

for X in `head -n $1 < hosts`
do
  echo "Starting $X..."
  ssh $X "$MPD --host=$HOST --port=$PORT </dev/null >/dev/null 2>/dev/null"&
done

wait