diff --git a/.clang-format b/.clang-format index 48e6347..0f17b31 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + --- BasedOnStyle: LLVM PointerAlignment: Left diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b72344..742e2d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + name: "CI" on: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3541eaf --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: BSD-3-Clause + +scripts +venv +build +._* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bd722f..3c51596 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + repos: - repo: https://github.com/pre-commit/mirrors-clang-format @@ -12,3 +14,8 @@ repos: - id: end-of-file-fixer - id: mixed-line-ending - id: check-added-large-files + +- repo: https://github.com/fsfe/reuse-tool + rev: v2.1.0 + hooks: + - id: reuse diff --git a/CMakeLists.txt b/CMakeLists.txt index 3814370..fd9c6fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + cmake_minimum_required(VERSION 3.5) project(binsparse-rc) diff --git a/LICENSE b/LICENSES/BSD-3-Clause.txt similarity index 100% rename from LICENSE rename to LICENSES/BSD-3-Clause.txt diff --git a/README.md b/README.md index c008067..ce480c0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ + + # Binsparse C Reference Implementation This library is a reference implementation of the [binsparse Binary Sparse Format Specification](https://github.com/GraphBLAS/binsparse-specification) written using C. diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 98aea87..c61323b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + function(add_example example_name) add_executable(${example_name} ${example_name}.c) target_link_libraries(${example_name} binsparse-rc) @@ -10,6 +12,7 @@ add_example(simple_write) add_example(mtx2bsp) add_example(bsp2mtx) add_example(check_equivalence) +add_example(check_equivalence_parallel) add_example(bsp-ls) add_example(benchmark_read) add_example(benchmark_read_parallel) diff --git a/examples/benchmark_read.c b/examples/benchmark_read.c index 238e8de..862c3c6 100644 --- a/examples/benchmark_read.c +++ b/examples/benchmark_read.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include #include #include diff --git a/examples/benchmark_read_parallel.c b/examples/benchmark_read_parallel.c index 2ecd495..1c208fb 100644 --- a/examples/benchmark_read_parallel.c +++ b/examples/benchmark_read_parallel.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include #include #include @@ -61,8 +65,9 @@ int main(int argc, char** argv) { char* file_name = argv[1]; printf("Opening %s\n", file_name); + fflush(stdout); - const int num_trials = 2; + const int num_trials = 10; int num_threads = 6; @@ -71,11 +76,10 @@ int main(int argc, char** argv) { size_t nbytes = 0; // To flush the filesystem cache before each trial, change to `true`. - bool cold_cache = true; + bool cold_cache = false; // If running warm cache experiments, read once to warm cache. - if (!cold_cache && false) { - printf("Warm cache read...\n"); + if (!cold_cache) { bsp_matrix_t mat = bsp_read_matrix_parallel(file_name, NULL, num_threads); bsp_destroy_matrix_t(mat); } @@ -84,6 +88,7 @@ int main(int argc, char** argv) { if (cold_cache) { flush_cache(); } + fflush(stdout); double begin = gettime(); bsp_matrix_t mat = bsp_read_matrix_parallel(file_name, NULL, num_threads); double end = gettime(); @@ -95,6 +100,7 @@ int main(int argc, char** argv) { double gbytes = ((double) nbytes) / 1024 / 1024 / 1024; double gbytes_s = gbytes / durations[i]; printf("FORPARSER: %s,%lf,%lf\n", file_name, durations[i], gbytes_s); + fflush(stdout); } printf("["); diff --git a/examples/benchmark_write.c b/examples/benchmark_write.c index 4c92f04..61d6ad8 100644 --- a/examples/benchmark_write.c +++ b/examples/benchmark_write.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include #include #include diff --git a/examples/bsp-ls.c b/examples/bsp-ls.c index 9862222..fd49ea2 100644 --- a/examples/bsp-ls.c +++ b/examples/bsp-ls.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include herr_t visit_group(hid_t loc_id, const char* name, const H5L_info_t* linfo, diff --git a/examples/bsp2mtx.c b/examples/bsp2mtx.c index e253c90..09d9929 100644 --- a/examples/bsp2mtx.c +++ b/examples/bsp2mtx.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include #include diff --git a/examples/check_equivalence.c b/examples/check_equivalence.c index 0706d45..00dec03 100644 --- a/examples/check_equivalence.c +++ b/examples/check_equivalence.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include int check_array_equivalence(bsp_array_t array1, bsp_array_t array2) { diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index cdd5d3d..9783f3d 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + function(add_example example_name) add_executable(${example_name}-cpp ${example_name}.cpp) target_link_libraries(${example_name}-cpp binsparse-rc) diff --git a/examples/cpp/benchmark_read.cpp b/examples/cpp/benchmark_read.cpp index 8694b75..7f41550 100644 --- a/examples/cpp/benchmark_read.cpp +++ b/examples/cpp/benchmark_read.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include #include #include diff --git a/examples/cpp/benchmark_write.cpp b/examples/cpp/benchmark_write.cpp index 49beab5..fe950d9 100644 --- a/examples/cpp/benchmark_write.cpp +++ b/examples/cpp/benchmark_write.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include #include #include diff --git a/examples/cpp/bsp-ls.cpp b/examples/cpp/bsp-ls.cpp index 9862222..9337af3 100644 --- a/examples/cpp/bsp-ls.cpp +++ b/examples/cpp/bsp-ls.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include herr_t visit_group(hid_t loc_id, const char* name, const H5L_info_t* linfo, diff --git a/examples/cpp/bsp2mtx.cpp b/examples/cpp/bsp2mtx.cpp index e253c90..7f8ebde 100644 --- a/examples/cpp/bsp2mtx.cpp +++ b/examples/cpp/bsp2mtx.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include #include diff --git a/examples/cpp/check_equivalence.cpp b/examples/cpp/check_equivalence.cpp index 0706d45..84cb421 100644 --- a/examples/cpp/check_equivalence.cpp +++ b/examples/cpp/check_equivalence.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include int check_array_equivalence(bsp_array_t array1, bsp_array_t array2) { diff --git a/examples/cpp/mtx2bsp.cpp b/examples/cpp/mtx2bsp.cpp index 7de6d8f..bc13c03 100644 --- a/examples/cpp/mtx2bsp.cpp +++ b/examples/cpp/mtx2bsp.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include #include diff --git a/examples/cpp/simple_matrix_read.cpp b/examples/cpp/simple_matrix_read.cpp index aaa8884..e0fcac9 100644 --- a/examples/cpp/simple_matrix_read.cpp +++ b/examples/cpp/simple_matrix_read.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include int main(int argc, char** argv) { diff --git a/examples/cpp/simple_matrix_write.cpp b/examples/cpp/simple_matrix_write.cpp index bf551d2..cb1b236 100644 --- a/examples/cpp/simple_matrix_write.cpp +++ b/examples/cpp/simple_matrix_write.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include int main(int argc, char** argv) { diff --git a/examples/cpp/simple_read.cpp b/examples/cpp/simple_read.cpp index 37249f9..a84d96d 100644 --- a/examples/cpp/simple_read.cpp +++ b/examples/cpp/simple_read.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include int main(int argc, char** argv) { diff --git a/examples/cpp/simple_write.cpp b/examples/cpp/simple_write.cpp index 15e3b36..46cd650 100644 --- a/examples/cpp/simple_write.cpp +++ b/examples/cpp/simple_write.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #include int main(int argc, char** argv) { diff --git a/examples/mtx2bsp.c b/examples/mtx2bsp.c index 7de6d8f..617bf62 100644 --- a/examples/mtx2bsp.c +++ b/examples/mtx2bsp.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include #include diff --git a/examples/simple_matrix_read.c b/examples/simple_matrix_read.c index aaa8884..042adc1 100644 --- a/examples/simple_matrix_read.c +++ b/examples/simple_matrix_read.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include int main(int argc, char** argv) { diff --git a/examples/simple_matrix_write.c b/examples/simple_matrix_write.c index bf551d2..edbd601 100644 --- a/examples/simple_matrix_write.c +++ b/examples/simple_matrix_write.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include int main(int argc, char** argv) { diff --git a/examples/simple_read.c b/examples/simple_read.c index 225ea54..c1dd544 100644 --- a/examples/simple_read.c +++ b/examples/simple_read.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include int main(int argc, char** argv) { diff --git a/examples/simple_write.c b/examples/simple_write.c index 15e3b36..3225a45 100644 --- a/examples/simple_write.c +++ b/examples/simple_write.c @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #include int main(int argc, char** argv) { diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 6e6266e..6f3c932 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,2 +1,4 @@ +# SPDX-License-Identifier: BSD-3-Clause + add_library(binsparse-rc INTERFACE) target_include_directories(binsparse-rc INTERFACE .) diff --git a/include/binsparse/array.h b/include/binsparse/array.h index 6919f74..73d9fbc 100644 --- a/include/binsparse/array.h +++ b/include/binsparse/array.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/binsparse.h b/include/binsparse/binsparse.h index 7fa58e2..718ccc7 100644 --- a/include/binsparse/binsparse.h +++ b/include/binsparse/binsparse.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #define BINSPARSE_VERSION "0.1" diff --git a/include/binsparse/convert_matrix.h b/include/binsparse/convert_matrix.h index a045209..cd6eefd 100644 --- a/include/binsparse/convert_matrix.h +++ b/include/binsparse/convert_matrix.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/detail/cpp/array.hpp b/include/binsparse/detail/cpp/array.hpp index 2c9d268..8e2da04 100644 --- a/include/binsparse/detail/cpp/array.hpp +++ b/include/binsparse/detail/cpp/array.hpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: BSD-3-Clause + #pragma once #ifdef __cplusplus diff --git a/include/binsparse/detail/declamp_values.h b/include/binsparse/detail/declamp_values.h index ca257ec..fdac775 100644 --- a/include/binsparse/detail/declamp_values.h +++ b/include/binsparse/detail/declamp_values.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/detail/detail.h b/include/binsparse/detail/detail.h index 4cebf43..98ded9b 100644 --- a/include/binsparse/detail/detail.h +++ b/include/binsparse/detail/detail.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/detail/parse_dataset.h b/include/binsparse/detail/parse_dataset.h index 53123c8..cefd60d 100644 --- a/include/binsparse/detail/parse_dataset.h +++ b/include/binsparse/detail/parse_dataset.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/detail/shm_tools.h b/include/binsparse/detail/shm_tools.h index 65e6b90..9b3316a 100644 --- a/include/binsparse/detail/shm_tools.h +++ b/include/binsparse/detail/shm_tools.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/generate.h b/include/binsparse/generate.h index 61883a3..abe1c40 100644 --- a/include/binsparse/generate.h +++ b/include/binsparse/generate.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/hdf5_wrapper.h b/include/binsparse/hdf5_wrapper.h index 89e84e9..a32a31f 100644 --- a/include/binsparse/hdf5_wrapper.h +++ b/include/binsparse/hdf5_wrapper.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/matrix.h b/include/binsparse/matrix.h index 2bc3470..1d4336e 100644 --- a/include/binsparse/matrix.h +++ b/include/binsparse/matrix.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/matrix_formats.h b/include/binsparse/matrix_formats.h index baeb837..cb8c522 100644 --- a/include/binsparse/matrix_formats.h +++ b/include/binsparse/matrix_formats.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/matrix_market/coo_sort_tools.h b/include/binsparse/matrix_market/coo_sort_tools.h index 805ee0e..8113424 100644 --- a/include/binsparse/matrix_market/coo_sort_tools.h +++ b/include/binsparse/matrix_market/coo_sort_tools.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/matrix_market/matrix_market_inspector.h b/include/binsparse/matrix_market/matrix_market_inspector.h index 724b691..276b2d9 100644 --- a/include/binsparse/matrix_market/matrix_market_inspector.h +++ b/include/binsparse/matrix_market/matrix_market_inspector.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/matrix_market/matrix_market_read.h b/include/binsparse/matrix_market/matrix_market_read.h index d6745e4..e4e9799 100644 --- a/include/binsparse/matrix_market/matrix_market_read.h +++ b/include/binsparse/matrix_market/matrix_market_read.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/matrix_market/matrix_market_type_t.h b/include/binsparse/matrix_market/matrix_market_type_t.h index f13de27..79062e4 100644 --- a/include/binsparse/matrix_market/matrix_market_type_t.h +++ b/include/binsparse/matrix_market/matrix_market_type_t.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once typedef enum bsp_matrix_market_type_t { diff --git a/include/binsparse/matrix_market/matrix_market_write.h b/include/binsparse/matrix_market/matrix_market_write.h index 75f9aeb..bc906cc 100644 --- a/include/binsparse/matrix_market/matrix_market_write.h +++ b/include/binsparse/matrix_market/matrix_market_write.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/minimize_values.h b/include/binsparse/minimize_values.h index b200e89..0ccac9c 100644 --- a/include/binsparse/minimize_values.h +++ b/include/binsparse/minimize_values.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/read_matrix.h b/include/binsparse/read_matrix.h index 4664be0..cf89fa7 100644 --- a/include/binsparse/read_matrix.h +++ b/include/binsparse/read_matrix.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/structure.h b/include/binsparse/structure.h index c6793c8..71ec17a 100644 --- a/include/binsparse/structure.h +++ b/include/binsparse/structure.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/types.h b/include/binsparse/types.h index 386d75c..0e44775 100644 --- a/include/binsparse/types.h +++ b/include/binsparse/types.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/include/binsparse/write_matrix.h b/include/binsparse/write_matrix.h index 76dd7c7..35ce649 100644 --- a/include/binsparse/write_matrix.h +++ b/include/binsparse/write_matrix.h @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once #include diff --git a/requirements.txt b/requirements.txt index 416634f..bdf5129 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ +# SPDX-License-Identifier: BSD-3-Clause + pre-commit diff --git a/scripts/read_cold_benchmarks.sh b/scripts/read_cold_benchmarks.sh index 1ab2dfe..4f33aed 100755 --- a/scripts/read_cold_benchmarks.sh +++ b/scripts/read_cold_benchmarks.sh @@ -1,14 +1,14 @@ # COO No Compression -./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_coo_noz.out 2>&1 +./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_coo_noz.out 2>&1 # COO GZip 1 Compression -./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_coo_gzip1_primary > br_coo_gz1.out 2>&1 +./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_coo_gzip1_primary > br_coo_gz1.out 2>&1 # CSR No Compression -./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_csr_noz_primary > br_csr_noz.out 2>&1 +./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_csr_noz_primary > br_csr_noz.out 2>&1 # CSR GZip 1 Compression -./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_csr_gzip1_primary > br_csr_gz1.out 2>&1 +./test.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_csr_gzip1_primary > br_csr_gz1.out 2>&1 # MTX No Compression -./test_fastmm.sh /home/xiii/src/fast_mm_benchmarks/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_MM_noz_primary /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_mtx_noz.out 2>&1 +# ./test_fastmm.sh /home/xiii/src/fast_mm_benchmarks/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_MM_noz_primary /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_mtx_noz.out 2>&1 diff --git a/scripts/read_warm_benchmarks.sh b/scripts/read_warm_benchmarks.sh index d0b4499..cf25128 100755 --- a/scripts/read_warm_benchmarks.sh +++ b/scripts/read_warm_benchmarks.sh @@ -1,14 +1,14 @@ # COO No Compression -./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_coo_noz.out 2>&1 +./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_coo_noz.out 2>&1 # COO GZip 1 Compression -./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_coo_gzip1_primary > br_coo_gz1.out 2>&1 +./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_coo_gzip1_primary > br_coo_gz1.out 2>&1 # CSR No Compression -./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_csr_noz_primary > br_csr_noz.out 2>&1 +./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_csr_noz_primary > br_csr_noz.out 2>&1 # CSR GZip 1 Compression -./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_csr_gzip1_primary > br_csr_gz1.out 2>&1 +./test_warm.sh /home/xiii/src/binsparse-reference-c/build/examples/benchmark_read_parallel /media/xiii/zunyingdie/data/SuiteSparse_csr_gzip1_primary > br_csr_gz1.out 2>&1 # MTX No Compression -./test_fastmm_warm.sh /home/xiii/src/fast_mm_benchmarks/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_MM_noz_primary /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_mtx_noz.out 2>&1 +# ./test_fastmm_warm.sh /home/xiii/src/fast_mm_benchmarks/build/examples/benchmark_read /media/xiii/zunyingdie/data/SuiteSparse_MM_noz_primary /media/xiii/zunyingdie/data/SuiteSparse_coo_noz_primary > br_mtx_noz.out 2>&1 diff --git a/scripts/test_fastmm.sh b/scripts/test_fastmm.sh index 3a38b3b..e4d683b 100755 --- a/scripts/test_fastmm.sh +++ b/scripts/test_fastmm.sh @@ -36,9 +36,9 @@ do sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches" sleep 0.1 dataset=`echo ${file} | sed -E "s/.+\/(.+\/.+)\.mtx/\1/"` - binsparse_file=${BINSPARSE_DIR}/${dataset}*.bsp.h5 + binsparse_file=${BINSPARSE_DIR}/${dataset}.coo.bsp.h5 echo "${dataset} ${file} ${binsparse_file}" - $BENCHMARK_BINARY $file ${binsparse_file} + $BENCHMARK_BINARY $file ${binsparse_file} 6 done done diff --git a/scripts/test_fastmm_warm.sh b/scripts/test_fastmm_warm.sh index 9f6e08c..771f59e 100755 --- a/scripts/test_fastmm_warm.sh +++ b/scripts/test_fastmm_warm.sh @@ -29,9 +29,9 @@ echo "Benchmarking Binsparse using ${EXPERIMENT_DIR}" for file in $(find ${EXPERIMENT_DIR} -iname "*.mtx") do dataset=`echo ${file} | sed -E "s/.+\/(.+\/.+)\.mtx/\1/"` - binsparse_file=${BINSPARSE_DIR}/${dataset}*.bsp.h5 + binsparse_file=${BINSPARSE_DIR}/${dataset}.coo.bsp.h5 echo "${dataset} ${file} ${binsparse_file}" - $BENCHMARK_BINARY $file ${binsparse_file} + $BENCHMARK_BINARY $file ${binsparse_file} 6 done if [ -z "$4" ] diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e8882f0..5fe2be3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1 +1,3 @@ +# SPDX-License-Identifier: BSD-3-Clause + add_subdirectory(bash) diff --git a/test/bash/CMakeLists.txt b/test/bash/CMakeLists.txt index b6fee76..a8d65a4 100644 --- a/test/bash/CMakeLists.txt +++ b/test/bash/CMakeLists.txt @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause + function(download_data url file_name) set(DATASET_ARCHIVE ${CMAKE_BINARY_DIR}/data/${file_name}) diff --git a/test/bash/test-cpp.sh b/test/bash/test-cpp.sh index 907a7c9..41f053a 100644 --- a/test/bash/test-cpp.sh +++ b/test/bash/test-cpp.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash + +# SPDX-License-Identifier: BSD-3-Clause + set -e convert_ssmc() { diff --git a/test/bash/test.sh b/test/bash/test.sh index 6a10607..8675fd6 100644 --- a/test/bash/test.sh +++ b/test/bash/test.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash + +# SPDX-License-Identifier: BSD-3-Clause + set -e convert_ssmc() {