From 7d8b5add63d27ac4dfd77ff085bddff3a7d0e62d Mon Sep 17 00:00:00 2001 From: jnke2016 Date: Fri, 20 Sep 2024 17:10:12 -0700 Subject: [PATCH] undo changes to tests --- cpp/tests/community/k_truss_test.cpp | 54 ++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/cpp/tests/community/k_truss_test.cpp b/cpp/tests/community/k_truss_test.cpp index af34958f0de..424d52f2067 100644 --- a/cpp/tests/community/k_truss_test.cpp +++ b/cpp/tests/community/k_truss_test.cpp @@ -262,6 +262,7 @@ class Tests_KTruss : public ::testing::TestWithParam; +using Tests_KTruss_Rmat = Tests_KTruss; TEST_P(Tests_KTruss_File, CheckInt32Int32Float) { @@ -269,16 +270,57 @@ TEST_P(Tests_KTruss_File, CheckInt32Int32Float) override_File_Usecase_with_cmd_line_arguments(GetParam())); } +TEST_P(Tests_KTruss_File, CheckInt64Int64Float) +{ + run_current_test( + override_File_Usecase_with_cmd_line_arguments(GetParam())); +} + +TEST_P(Tests_KTruss_Rmat, CheckInt32Int32Float) +{ + run_current_test( + override_Rmat_Usecase_with_cmd_line_arguments(GetParam())); +} + +TEST_P(Tests_KTruss_Rmat, CheckInt64Int64Float) +{ + run_current_test( + override_Rmat_Usecase_with_cmd_line_arguments(GetParam())); +} + INSTANTIATE_TEST_SUITE_P( simple_test, Tests_KTruss_File, ::testing::Combine( // enable correctness checks - ::testing::Values(KTruss_Usecase{5, false, false}), - ::testing::Values( - cugraph::test::File_Usecase("/raid/jnke/optimize_ktruss/datasets/test_datasets_.mtx") - //cugraph::test::File_Usecase("/raid/jnke/optimize_ktruss/cugraph/datasets/dolphins.mtx"), - //cugraph::test::File_Usecase("/raid/jnke/optimize_ktruss/cugraph/datasets/netscience.mtx") - ))); + ::testing::Values(KTruss_Usecase{5, true, false}, + KTruss_Usecase{4, true, false}, + KTruss_Usecase{9, true, true}, + KTruss_Usecase{7, true, true}), + ::testing::Values(cugraph::test::File_Usecase("test/datasets/netscience.mtx"), + cugraph::test::File_Usecase("test/datasets/dolphins.mtx")))); + +INSTANTIATE_TEST_SUITE_P(rmat_small_test, + Tests_KTruss_Rmat, + // enable correctness checks + ::testing::Combine(::testing::Values(KTruss_Usecase{5, false, true}, + KTruss_Usecase{4, false, true}, + KTruss_Usecase{9, true, true}, + KTruss_Usecase{7, true, true}), + ::testing::Values(cugraph::test::Rmat_Usecase( + 10, 16, 0.57, 0.19, 0.19, 0, true, false)))); + +INSTANTIATE_TEST_SUITE_P( + rmat_benchmark_test, /* note that scale & edge factor can be overridden in benchmarking (with + --gtest_filter to select only the rmat_benchmark_test with a specific + vertex & edge type combination) by command line arguments and do not + include more than one Rmat_Usecase that differ only in scale or edge + factor (to avoid running same benchmarks more than once) */ + Tests_KTruss_Rmat, + // disable correctness checks for large graphs + // FIXME: High memory footprint. Perform nbr_intersection in chunks. + ::testing::Combine( + ::testing::Values(KTruss_Usecase{12, false, false}), + ::testing::Values(cugraph::test::Rmat_Usecase(14, 16, 0.57, 0.19, 0.19, 0, true, false)))); CUGRAPH_TEST_PROGRAM_MAIN()