Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4dd0c87
Issue #419: add spmv
May 4, 2022
5f97c3f
Issue #419: removing the comment for output verification of SpMV so t…
aristeidis-mastoras May 4, 2022
3b7be46
Issue #419: adding the spmv.cpp performance test in the CMakeLists.tx…
aristeidis-mastoras May 4, 2022
0b99bfd
Issue #419: changing the size of the input and output vectors to m an…
aristeidis-mastoras May 5, 2022
3e96ec0
Issue #419: Add files spmspm and spmspv, update spmv output log
May 5, 2022
fdcdd2d
Issue #419: adding spmspv and spmspm in the CMakeLists.txt and perfor…
aristeidis-mastoras May 5, 2022
f49aa74
Issue #419: minor changes in spmv and spmspv, including printing the …
aristeidis-mastoras May 5, 2022
c56b4cf
Issue 419: fix bug related to pinned vector: nonzeroes() is used inst…
aristeidis-mastoras May 5, 2022
9cb28c3
Issue #419: fix bug in the index printed for the nonzeroes of the pin…
aristeidis-mastoras May 5, 2022
ae767a9
Issue #419: Add output for spmspm and remove macro
May 5, 2022
1b1fb16
Fix compiler warning
anyzelman May 5, 2022
7d11697
Some pedantic pretty(ier) printing
anyzelman May 5, 2022
196539b
Issue #419: Comment out inner iterations and remove temporary bug fix
May 6, 2022
06b9e29
Issue #419: Change output to number of non-zeroes in result
May 6, 2022
d657da4
Fix code style
anyzelman May 9, 2022
b793ec0
Forgot a comma, apologies
anyzelman May 9, 2022
80750b9
We should be timing a hot run, while it was previously timing a cold …
anyzelman May 9, 2022
ed880e1
Make similar changes to spmspv benchmark
anyzelman May 9, 2022
61c5141
Found some new issues in spmspv, also applying to spmv benchmark
anyzelman May 9, 2022
4bf92b5
Also ported changes to spmspm, and added one forgotten change in spmspv
anyzelman May 9, 2022
526ea3c
If auto-tuning the number of inner iterations, the grbProgram is expe…
anyzelman May 9, 2022
1db8180
Change the nnz to manual counting
May 11, 2022
826e62d
Issue #419: solving minor bug in the performancetests script, adding …
aristeidis-mastoras May 12, 2022
477612c
Issue #419: changing datasets in performance tests for spmv, spmspv, …
aristeidis-mastoras Sep 14, 2022
9dbafc0
Issue #419: fix typo
aristeidis-mastoras Sep 15, 2022
88a032b
Issue #419: removing comment from spmspm
aristeidis-mastoras Sep 15, 2022
8fbbf0b
fix wrong increment for the number of iterations in the CG algorithm
aristeidis-mastoras Sep 16, 2022
5d6217b
modifying CI file to reduce the size of executables
aristeidis-mastoras Sep 16, 2022
ee7a369
modifying CI file to reduce the size of executables
aristeidis-mastoras Sep 16, 2022
d95ba32
Issue #419: fixing issues reported by Albert-Jan
aristeidis-mastoras Sep 26, 2022
48e732e
Issue #419: adding comment about the existence of matrices in perform…
aristeidis-mastoras Sep 26, 2022
fa28d34
Reorder and add datasets.
anyzelman Oct 7, 2022
c3824bc
Performance test script update
anyzelman Oct 10, 2022
c2c00d8
Clearer performancetests.sh output
anyzelman Oct 10, 2022
9ce9d79
Final code review fix minor formatting / typos
anyzelman Oct 11, 2022
7785dc8
Enable new tests for hyperdags backend also (after rebase)
anyzelman Oct 11, 2022
71e3708
Fix typos in script resulting in incomplete output, and limit the mat…
anyzelman Oct 12, 2022
785f751
Two more typos fixed that resulted in incomplete output
anyzelman Oct 12, 2022
b59f061
Correct two minor output imperfections and add two more matrices to t…
anyzelman Oct 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,15 @@ build_test:
- apt update && apt -y install make cmake libnuma-dev coreutils
script:
- mkdir -p install build && cd ./build && ../bootstrap.sh --prefix=../install && make -j$(nproc) build_tests_all
- strip -s $(find tests/unit/ -type f -executable -print) $(find tests/smoke/ -type f -executable -print) $(find tests/performance/ -type f -executable -print)
artifacts:
paths:
- build/
exclude:
- build/**/*.o
- build/**/*.o.d
- build/**/CMakeFiles
- build/**/*.dir
expire_in: 30 minutes


Expand Down
2 changes: 1 addition & 1 deletion include/graphblas/algorithms/conjugate_gradient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ namespace grb {

sigma = beta;

} while( iter++ < max_iterations && ret == SUCCESS );
} while( ++iter < max_iterations && ret == SUCCESS );

// output
iterations = iter;
Expand Down
15 changes: 15 additions & 0 deletions tests/performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ add_grb_executables( driver_label ../smoke/label.cpp
ADDITIONAL_LINK_LIBRARIES test_utils_headers
)

add_grb_executables( driver_spmv spmv.cpp
BACKENDS reference reference_omp bsp1d hybrid hyperdags
ADDITIONAL_LINK_LIBRARIES test_utils_headers
)

add_grb_executables( driver_spmspv spmspv.cpp
BACKENDS reference reference_omp bsp1d hybrid hyperdags
ADDITIONAL_LINK_LIBRARIES test_utils_headers
)

add_grb_executables( driver_spmspm spmspm.cpp
BACKENDS reference reference_omp bsp1d hybrid hyperdags
ADDITIONAL_LINK_LIBRARIES test_utils_headers
)

# targets to list and build the test for this category
get_property( performance_tests_list GLOBAL PROPERTY tests_category_performance )
add_custom_target( "list_tests_category_performance"
Expand Down
110 changes: 109 additions & 1 deletion tests/performance/performancetests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ DATASET_SIZES=(497 4039 27770 334863 1134890 3774768 3072441)
KNN4SOLS=(118 499 2805 1 64 1 1048907)
KNN6SOLS=(357 547 5176 1 246 1 1453447)

#the following datasets are used for benchmarking SpMV, SpMSpV, and SpMSpM
MULTIPLICATION_DATASETS=(west0497.mtx fidap037.mtx cavity17.mtx s3rmt3m3.mtx bloweybq.mtx bcsstk17.mtx Pres_Poisson.mtx gyro_m.mtx memplus.mtx lhr34.mtx bcsstk32.mtx vanbody.mtx s3dkt3m2.mtx G2_circuit.mtx Stanford.mtx coPapersCiteseer.mtx bundle_adj.mtx Stanford_Berkeley.mtx apache2.mtx Emilia_923.mtx ldoor.mtx ecology2.mtx Serena.mtx cage14.mtx G3_circuit.mtx wikipedia-20051105.mtx wikipedia-20061104.mtx Freescale1.mtx wikipedia-20070206.mtx Queen_4147.mtx cage15.mtx adaptive.mtx rgg_n_2_24_s0.mtx uk-2002.mtx road_usa.mtx MOLIERE_2016.mtx europe_osm.mtx twitter.mtx com-Friendster.mtx)

#which command to use to run a GraphBLAS program
LPF=yes
if [ -z "${LPFRUN}" ]; then
Expand Down Expand Up @@ -277,6 +280,81 @@ runOtherBenchMarkTests()
echo >> ${TEST_OUT_DIR}/benchmarks
}

runMultiplicationKernels()
{
local runner=$1
local backend=$2
local dataSet=$3
local parseMode=$4
local i=$5

# the check for the matrices existence is assumed to have already passed

if [ -z "$EXPTYPE" ] || [ "$EXPTYPE" == "SPMV" ]; then

# ---------------------------------------------------------------------
# spmv
echo ">>> [ ] [x] Testing spmv using ${dataSet} dataset, $backend backend."
echo
$runner ${TEST_BIN_DIR}/driver_spmv_${backend} ${INPUT_DIR}/${dataSet} ${parseMode} &> ${TEST_OUT_DIR}/driver_spmv_${backend}_${dataSet}
head -1 ${TEST_OUT_DIR}/driver_spmv_${backend}_${dataSet}
if grep -q "Test OK" ${TEST_OUT_DIR}/driver_spmv_${backend}_${dataSet}; then
printf "Test OK\n\n"
else
printf "Test FAILED\n\n"
fi
echo "$backend spmv using the ${dataSet} dataset" >> ${TEST_OUT_DIR}/benchmarks
egrep 'Avg|Std' ${TEST_OUT_DIR}/driver_spmv_${backend}_${dataSet} >> ${TEST_OUT_DIR}/benchmarks
echo >> ${TEST_OUT_DIR}/benchmarks

fi

if [ -z "$EXPTYPE" ] || [ "$EXPTYPE" == "SPMSPV" ]; then

# ---------------------------------------------------------------------
# spmspv
echo ">>> [ ] [x] Testing spmspv using ${dataSet} dataset, $backend backend."
echo
$runner ${TEST_BIN_DIR}/driver_spmspv_${backend} ${INPUT_DIR}/${dataSet} ${parseMode} &> ${TEST_OUT_DIR}/driver_spmspv_${backend}_${dataSet}
head -1 ${TEST_OUT_DIR}/driver_spmspv_${backend}_${dataSet}
if grep -q "Test OK" ${TEST_OUT_DIR}/driver_spmspv_${backend}_${dataSet}; then
printf "Test OK\n\n"
else
printf "Test FAILED\n\n"
fi
echo "$backend spmspv using the ${dataSet} dataset" >> ${TEST_OUT_DIR}/benchmarks
egrep 'Avg|Std' ${TEST_OUT_DIR}/driver_spmspv_${backend}_${dataSet} >> ${TEST_OUT_DIR}/benchmarks
echo >> ${TEST_OUT_DIR}/benchmarks

fi

if [ -z "$EXPTYPE" ] || [ "$EXPTYPE" == "SPMSPM" ]; then

# ---------------------------------------------------------------------
# spmspm
echo ">>> [ ] [x] Testing spmspm using ${dataSet} dataset, $backend backend."
echo
if [ "$BACKEND" = "bsp1d" ] || [ "$BACKEND" = "hybrid" ]; then
echo "Test DISABLED: no sparse level-3 operations recommended for 1D distributions."
echo " "
elif [ "$i" -gt "14" ]; then
echo "Tests DISABLED: by default, long-running sparse matrix--sparse matrix multiplications are disabled (skipping dataset ${dataSet})."
echo " "
else
$runner ${TEST_BIN_DIR}/driver_spmspm_${backend} ${INPUT_DIR}/${dataSet} ${INPUT_DIR}/${dataSet} ${parseMode} &> ${TEST_OUT_DIR}/driver_spmspm_${backend}_${dataSet}
head -1 ${TEST_OUT_DIR}/driver_spmspm_${backend}_${dataSet}
if grep -q "Test OK" ${TEST_OUT_DIR}/driver_spmspm_${backend}_${dataSet}; then
printf "Test OK\n\n"
else
printf "Test FAILED\n\n"
fi
echo "$backend spmspm using the ${dataSet} dataset" >> ${TEST_OUT_DIR}/benchmarks
egrep 'Avg|Std' ${TEST_OUT_DIR}/driver_spmspm_${backend}_${dataSet} >> ${TEST_OUT_DIR}/benchmarks
echo >> ${TEST_OUT_DIR}/benchmarks
fi
fi
}

# end helper functions

if [ -z "$EXPTYPE" ] || ! [ "$EXPTYPE" == "KERNEL" ]; then
Expand Down Expand Up @@ -360,7 +438,8 @@ if [ -z "$EXPTYPE" ] || ! [ "$EXPTYPE" == "KERNEL" ]; then

# test for file
if [ ! -f ${INPUT_DIR}/${DATASET} ]; then
echo "Warning: dataset/${DATASET} not found. Provide the dataset to enable performance tests with it."
echo ">>> [x] [x] Test algorithms using ${DATASET} dataset, ${BACKEND} backend."
echo "Tests DISABLED: dataset/${DATASET} not found. Provide the dataset to enable performance tests with it."
echo " "
continue
fi
Expand Down Expand Up @@ -396,6 +475,35 @@ if [ -z "$EXPTYPE" ] || ! [ "$EXPTYPE" == "KERNEL" ]; then
fi
done

for ((i=0;i<${#MULTIPLICATION_DATASETS[@]};++i));
do
if [ ! -z "$DATASETTORUN" ] && [ "$DATASETTORUN" != "${MULTIPLICATION_DATASETS[i]}" ]; then
continue
fi

if [ "$BACKEND" = "hyperdags" ] && [ "$i" -gt "0" ]; then
echo "Info: hyperdags performance tests run only on the smallest dataset"
echo " "
break
fi

# initialise parameters
DATASET=${MULTIPLICATION_DATASETS[i]}
PARSE_MODE=direct

# test for file
if [ ! -f ${INPUT_DIR}/${DATASET} ]; then
echo ">>> [ ] [x] Test multiplication kernels using ${DATASET} dataset,"
echo " ${BACKEND} backend."
echo "Tests DISABLED: dataset/${DATASET} not found. Provide the dataset to enable performance tests with it."
echo " "
continue
fi

runMultiplicationKernels "$runner" "$BACKEND" "$DATASET" "$PARSE_MODE" "$i"

done

done

fi
Expand Down
Loading