run_bert_pre2_4dcus.sh 447 Bytes
Newer Older
hepj987's avatar
hepj987 committed
1
2
#!/usr/bin/env bash
HOME_PATH=/work/home/hepj
hepj987's avatar
hepj987 committed
3
WORK_PATH=${HOME_PATH}/bert-pytorch/2node-run-pre
hepj987's avatar
hepj987 committed
4
which python3
hepj987's avatar
hepj987 committed
5
6
7
8
source env.sh
hostfile=./hostfile
node=$(cat $hostfile|sort|uniq |wc -l)
np=$(($node*8))
hepj987's avatar
hepj987 committed
9
10
11
12

nodename=$(cat $hostfile |sed -n "1p")
dist_url=`echo $nodename | awk '{print $1}'`

hepj987's avatar
hepj987 committed
13
mpirun -np ${np} --hostfile hostfile-$SLURM_JOB_ID  --bind-to none --mca btl_tcp_if_include $dist_url ${WORK_PATH}/2nodes_single_process_pre2.sh $dist_url $node
hepj987's avatar
hepj987 committed
14