Newer
Older
Tomáš Oberhuber
committed
#!/usr/bin/env bash
BASE="ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/"
MATRIX_SOLVERS_BENCHMARK="tnl-matrix-solvers-benchmark-dbg"
Tomáš Oberhuber
committed
STOP_TIME="1"
export CUDA_PROFILE=0
export CUDA_PROFILE_CONFIG="$TNL_SOURCE_DIR/tests/cuda-profiler.conf"
PROCESS_CUDA_PROFILE="$TNL_SOURCE_DIR/tests/process-cuda-profile.pl"
source ./matrix-market
source ./florida-matrix-market
Tomáš Oberhuber
committed
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
export TNL_SPARSE_MATRIX_CHECK_CFG_DESC_FILE="$TNL_SOURCE_DIR/tests/tnl-sparse-matrix-check.cfg.desc"
#MM_MATRICES=""
#FLORIDA_MM_MATRICES=""
for link in $MM_MATRICES;
do
echo "###############################################################################################"
matrix=matrices`echo $link | sed 's/ftp:\/\/math.nist.gov\/pub//'`
unzipped_matrix=`echo $matrix | sed 's/.gz//'`
if test ! -e $matrix;
then
echo "Matrix $matrix is missing !!! Run the script 'get-matrices' first."
#echo "Matrix $matrix is missing !!! Run the script 'get-matrices' first." >> sparse-matrix-benchmark.log
else
if test ! -e $unzipped_matrix.double.bin.bz2;
then
echo "Missing $unzipped_matrix.double.bin.bz2 !!! Run the script 'convert-matrices'."
#echo "Missing $unzipped_matrix.double.bin.bz2 !!! Run the script 'convert-matrices'." >> sparse-matrix-benchmark.log
else
gunzip -f $matrix
echo "Checking with the matrix $unzipped_matrix in double precison ..."
export CUDA_PROFILE_LOG=$unzipped_matrix.double.log
$MATRIX_SOLVERS_BENCHMARK --input-file $unzipped_matrix.double.bin.bz2 --input-mtx-file $unzipped_matrix --log-file sparse-matrix-benchmark-double.log --stop-time $STOP_TIME --verbose 1
gzip $unzipped_matrix
fi
fi
done
for link in $FLORIDA_MM_MATRICES;
do
matrix=matrices`echo $link | sed 's/http:\/\/www.cise.ufl.edu\/research\/sparse//'`
if test ! -e $matrix;
then
echo "Matrix $matrix is missing !!! Run the script 'get-matrices' first."
#echo "Matrix $matrix is missing !!! Run the script 'get-matrices' first." >> sparse-matrix-benchmark.log
else
DIRNAME=`dirname $matrix`
FILENAME=`basename $matrix`
cd $DIRNAME
tar zxvf $FILENAME
cd $IWD
SUBDIRNAME=`echo $FILENAME | sed 's/.tar.gz//'`
rm -f $DIRNAME/$SUBDIRNAME/*_b.mtx # these are usualy in array format
for file in $DIRNAME/$SUBDIRNAME/*.mtx;
do
echo "###############################################################################################"
if test ! -e $file.double.bin.bz2;
then
echo "Missing $file.double.bin.bz2 !!! Run the script 'convert-matrices'."
else
echo "Checking with the matrix $file ..."
$MATRIX_SOLVERS_BENCHMARK --input-file $file.double.bin.bz2 --input-mtx-file $file --log-file sparse-matrix-benchmark-double.log --stop-time $STOP_TIME --verbose 1
fi
rm $file
done
fi
done