Menu

[cf3861]: / CI / proc.sh  Maximize  Restore  History

Download this file

66 lines (56 with data), 1.9 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
#!/bin/bash
# Directory containing the mapgraph executables.
BIN_DIR=../Algorithms
# Directory containing the graph datasets to be processed.
DATA_DIR=/data/xdata/GraphDatasets
# Directory containing the matching files of random vertices for the initial frontier.
RAND_DIR=/data/xdata/starting_vertices
# The algorithm type (accepts sampled starting vertices).
TYPES="SSSP"; # BFS SSSP PR CC BC
##
# NOTE: The .mtx data files MUST have the correct #of rows, cols, and edges (no -1, -1 in the header row of the file).
##
# Symmetric matrices.
#SYM_DATA="ak2010 belgium_osm coAuthorsDBLP delaunay_n13 delaunay_n21 kron_g500-logn20 bitcoin"
SYM_DATA="ak2010"
# Generalized (aka non-symmetric) matrices.
#GEN_DATA="webbase-1M wikipedia-20070206 twitter_d1";# traceroute"
# Set of all graphs to be run.
DATA="$SYM_DATA $GEN_DATA"
# Suffix for the matrix files.
suffix=".mtx"
# The #of random vertices to use (first N, up to how every many are in the file).
#N=100
N=1
#### end changable section
nerr=0
for TYPE in $TYPES
do
for graph in $DATA
do
# The name of the executable.
exec="$BIN_DIR/$TYPE/$TYPE"
# remove old log file for this graph.
rm -f out.$TYPE.$graph.log
# 1 iff this is an undirected graph (aka symmetric). 0 otherwise.
export directedGraph=`echo $SYM_DATA | grep -c "$graph"`
export vertices=`head -n $N "$RAND_DIR/$graph.rand_indices"`
#echo "graph=[$graph], directedGraph=[$directedGraph]"
for src in ${vertices}
do
cmd="$exec -g $DATA_DIR/$graph$suffix foo -p src=$src directed=$directedGraph"
echo "Running: $cmd"
$cmd >> out.$TYPE.$graph.log 2>&1
if [[ $rc != 0 ]] ; then
echo "Error: $cmd"
nerr=`expr $nerr + 1`
fi
done
done
done
if [[ $nerr != 0 ]] ; then
echo "There were $nerr errors."
exit 1
fi
echo "Success."
exit 0
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.