KMR
wc.kvgen.sh
1 #! /bin/sh
2 #
3 # wc.kvgen.sh (2014-10-31)
4 #
5 # The combination of wc.mapper.py, wc.kvgen.sh and wc.reducer.py performs
6 # word counting of files in a specified directory.
7 #
8 # How to run this program.
9 #
10 # 1. Prepare input files
11 # $ mkdir ./inp
12 # $ cp ../file1 ./inp
13 # $ cp ../file2 ./inp
14 #
15 # There are two files so that two mappers will be run to process them.
16 #
17 # 2. Execute kmrrun
18 # $ mpiexec -machinefile machines -np 2 ./kmrrun \
19 # -m ./wc.mapper.py -k ./wc.kvgen.sh -r ./wc.reducer.py ./inp
20 #
21 
22 file=$1.out
23 
24 cat $file
25 rm $file