-
Notifications
You must be signed in to change notification settings - Fork 1
/
mass-charmpp.sh
45 lines (37 loc) · 868 Bytes
/
mass-charmpp.sh
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
#!/bin/bash
function build_submit() {
bin=$1
nprocs=$2
node=1
ntasks_per_node=$2
if [ $nprocs -eq 32 ] ; then
node=4
ntasks_per_node=8
fi
if [ $nprocs -eq 16 ] ; then
node=2
ntasks_per_node=8
fi
run_dir="$(pwd)/charmpp"
script_name=submit-${bin}-${node}-${nprocs}.sh
num_chares=$(( 1*nprocs ))
echo "#!/bin/bash
#SBATCH -N $node
#SBATCH --ntasks-per-node=$ntasks_per_node
#SBATCH -t 05:00
#SBATCH -p debug
#SBATCH --constraint=rhel8
cd $run_dir
for m in openmpi/3.1.5/gcc/ charmpp ; do
module load \$m
done
echo running ${bin} with ${node} nodes and ${nprocs} processes
mpirun -np $nprocs ./${bin} $num_chares" > ${script_name}
chmod +x ${script_name}
sbatch ${script_name}
}
for bin in astar ; do
for nprocs in 1 2 4 8 16 32 ; do
build_submit $bin $nprocs
done
done