Repository navigation
Expand file tree
/
Copy pathrun_dpu-thor.sh
More file actions
executable file
·90 lines (72 loc) · 1.86 KB
/
Copy pathrun_dpu-thor.sh
File metadata and controls
executable file
·90 lines (72 loc) · 1.86 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
#SBATCH -N4
#SBATCH -p thor
#SBATCH -t 15:00
#SBATCH -J "Ialltoall demo"
#SBATCH -o "%j-ialltoall-output.txt"
#SBATCH -w thor[017-018],thorbf3a[017,018]
##SBATCH
if [[ $SLURM_NODEID != 0 ]]; then
exit;
fi
SUB="bf"
ppn=16
hosts=()
hostfile="$HOME/hosts-$SLURM_JOBID"
dpufile="$HOME/dpu-$SLURM_JOBID"
rm -f $hostfile
rm -f $dpufile
touch $hostfile
touch $dpufile
for i in `scontrol show hostname`; do
if [[ "$i" == *"$SUB"* ]] ; then
echo "$i" >> $dpufile
export MV2_IBA_HCA=mlx5_0
else
hosts+=($i);
for j in `seq 1 $ppn`; do
echo $i>>$hostfile
done
export MV2_IBA_HCA=mlx5_0
fi
done
np=`cat $hostfile | wc -l`
names=(
"No-DPU"
"With-DPU"
)
envs=(
"MV2_USE_DPU=0"
"MV2_USE_DPU=1 MV2_USE_DPU_IALLGATHER=1 MV2_USE_DPU_IBCAST=1 MV2_HYBRID_ENABLE_THRESHOLD=16384 MV2_ON_DEMAND_THRESHOLD=32768"
)
len=${#names[@]}
#cat $hostfile
#cat $dpufile
MPI=/global/home/users/benjaminm/MV2-DPU-Build
export PATH=$MPI/bin:$PATH
export LD_LIBRARY_PATH=$MPI/lib:$LD_LIBRARY_PATH
for (( i=0; i<$len; i++ ))
do
env=${envs[$i]}
name=${names[$i]}
echo -e "\n\nRunning MPI_Ialltoall with $np processes with $name"
set -x
$MPI/bin/mpirun_rsh --export-all -np $np -hostfile $hostfile -dpufile $dpufile -bf3 $env \
$MPI/libexec/osu-micro-benchmarks/mpi/collective/osu_ialltoall \
-f -m 16384:$((1*1024*1024)) 2>/dev/null
{ set +x; } 2>/dev/null
done
for (( i=0; i<$len; i++ ))
do
env=${envs[$i]}
name=${names[$i]}
echo -e "\n\nRunning MPI_Ibcast with $np processes with $name"
set -x
$MPI/bin/mpirun_rsh --export-all -np $np -hostfile $hostfile -dpufile $dpufile -bf3 $env \
$MPI/libexec/osu-micro-benchmarks/mpi/collective/osu_ibcast \
-f -m $((1024*1024)):$((32*1024*1024)) #2>/dev/null
{ set +x; } 2>/dev/null
done
rm $hostfile
rm $dpufile
exit 0