single_process.sh 529 Bytes
Newer Older
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
#!/bin/bash
lrank=$OMPI_COMM_WORLD_LOCAL_RANK
comm_rank=$OMPI_COMM_WORLD_RANK
comm_size=$OMPI_COMM_WORLD_SIZE
export MASTER_ADDR=${1}
 
APP="python3 tools/train.py configs/resnet/resnet18_b32x8_imagenet.py --launcher mpi"
case ${lrank} in
[0])
  numactl --cpunodebind=0 --membind=0 ${APP}
  ;;
[1])

  numactl --cpunodebind=1 --membind=1 ${APP}
  ;;
[2])
  
  numactl --cpunodebind=2 --membind=2 ${APP}
  ;;
[3])
  
  numactl --cpunodebind=3 --membind=3 ${APP}
  ;;
[4])
  
  numactl --cpunodebind=4 --membind=4 ${APP}
  ;;
esac