forked from TACC/launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_launcher
executable file
·49 lines (44 loc) · 1.44 KB
/
init_launcher
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
#------------------------------------------------
# On host setup script to run multiple tasks/host
#
# 06/06/2019 - Si Liu
# 03/29/2019 - Si Liu
# 01/21/2011 - Luke Wilson
#
# Texas Advanced Computing Center
# The University of Texas at Austin
#------------------------------------------------
if [ "$LAUNCHER_BIND" == "1" ]
then
if [ "$LAUNCHER_BIND_HT" == "1" ]
then
bind_obj="pu"
else
bind_obj="core"
fi
for i in `seq 0 $(($LAUNCHER_PPN - 1))`
do
spu=$(($i * $LAUNCHER_PUPT))
epu=$(($spu + $LAUNCHER_PUPT - 1))
#Start the launcher script for every process to be spawned on this host and give it a unique task id
env `$LAUNCHER_DIR/pass_env` LAUNCHER_HWLOC_CMD="hwloc-bind ${bind_obj}:$spu-$epu" LAUNCHER_TSK_ID=$(($LAUNCHER_PPN * $LAUNCHER_HOST_ID + $i)) $LAUNCHER_DIR/launcher &
done
else
for i in `seq 0 $(($LAUNCHER_PPN - 1))`
do
#Start the launcher script for every process to be spawned on this host and give it a unique task id
env `$LAUNCHER_DIR/pass_env` LAUNCHER_TSK_ID=$(($LAUNCHER_PPN * $LAUNCHER_HOST_ID + $i)) $LAUNCHER_DIR/launcher &
done
fi
if [ ! "x$LAUNCHER_NPHI" == "x" ]
then
#Start the launcher on the Intel Xeon Phi cards in this box
for j in `seq 0 $(($LAUNCHER_NPHI - 1))`
do
ssh mic$j "env `$LAUNCHER_DIR/pass_env`
LAUNCHER_PHI_ID=$(($LAUNCHER_HOST_ID * $LAUNCHER_NPHI + $j))
$LAUNCHER_DIR/init_launcher_phi $*" &
done
fi
wait