-
Notifications
You must be signed in to change notification settings - Fork 0
/
parallel_index.sh
executable file
·36 lines (28 loc) · 1.08 KB
/
parallel_index.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
#!/bin/bash
. ./env.sh
if [ $# -ne 1 ]
then
echo "Usage: $0 path_to_file"
exit 1
fi
data_dir=$1
echo "Data directory: $data_dir"
# 2 parallel procs
#./index_doc.py $( ./gen_m_of_n.sh 0 2 ./$data_dir/*.txt ) &
#./index_doc.py $( ./gen_m_of_n.sh 1 2 ./$data_dir/*.txt ) &
# 4 parallel procs
#./index_doc.py $( ./gen_m_of_n.sh 0 4 ./$data_dir/*.txt ) &
#./index_doc.py $( ./gen_m_of_n.sh 1 4 ./$data_dir/*.txt ) &
#./index_doc.py $( ./gen_m_of_n.sh 2 4 ./$data_dir/*.txt ) &
#./index_doc.py $( ./gen_m_of_n.sh 3 4 ./$data_dir/*.txt ) &
# 9 parallel procs
./index_doc.py $( ./gen_m_of_n.sh 0 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 1 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 2 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 3 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 4 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 5 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 6 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 7 9 ./$data_dir/*.txt ) &
./index_doc.py $( ./gen_m_of_n.sh 8 9 ./$data_dir/*.txt ) &
wait