Skip to content

Commit

Permalink
missed MG tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckHastings committed Oct 23, 2024
1 parent 52bcb53 commit d0170ae
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 121 deletions.
20 changes: 10 additions & 10 deletions cpp/tests/c_api/legacy_spectral_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ int generic_spectral_test(vertex_t* h_src,
cugraph_graph_t* graph = NULL;
cugraph_clustering_result_t* result = NULL;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

handle = cugraph_create_resource_handle(NULL);
TEST_ASSERT(test_ret_value, handle != NULL, "resource handle creation failed.");
Expand Down Expand Up @@ -170,11 +170,11 @@ int generic_balanced_cut_test(vertex_t* h_src,
cugraph_error_code_t ret_code = CUGRAPH_SUCCESS;
cugraph_error_t* ret_error;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

cugraph_resource_handle_t* handle = NULL;
cugraph_graph_t* graph = NULL;
Expand Down
40 changes: 20 additions & 20 deletions cpp/tests/c_api/mg_biased_neighbor_sample_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ typedef int32_t vertex_t;
typedef int32_t edge_t;
typedef float weight_t;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

int generic_biased_neighbor_sample_test(const cugraph_resource_handle_t* handle,
vertex_t* h_src,
Expand Down Expand Up @@ -1227,11 +1227,11 @@ int test_biased_neighbor_sample_sort_by_hop(const cugraph_resource_handle_t* han

int test_biased_neighbor_sample_dedupe_sources(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down Expand Up @@ -1277,11 +1277,11 @@ int test_biased_neighbor_sample_dedupe_sources(const cugraph_resource_handle_t*

int test_biased_neighbor_sample_unique_sources(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down Expand Up @@ -1327,11 +1327,11 @@ int test_biased_neighbor_sample_unique_sources(const cugraph_resource_handle_t*

int test_biased_neighbor_sample_carry_over_sources(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down
10 changes: 5 additions & 5 deletions cpp/tests/c_api/mg_count_multi_edges_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ typedef int32_t vertex_t;
typedef int32_t edge_t;
typedef float weight_t;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

/*
* Create graph and count multi-edges
Expand Down
18 changes: 9 additions & 9 deletions cpp/tests/c_api/mg_create_graph_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ int test_create_mg_graph_simple(const cugraph_resource_handle_t* handle)
properties.is_symmetric = FALSE;
properties.is_multigraph = FALSE;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

cugraph_type_erased_device_array_t* src;
cugraph_type_erased_device_array_t* dst;
Expand Down Expand Up @@ -159,9 +159,9 @@ int test_create_mg_graph_multiple_edge_lists(const cugraph_resource_handle_t* ha
properties.is_symmetric = FALSE;
properties.is_multigraph = FALSE;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

const size_t num_local_arrays = 2;

Expand Down Expand Up @@ -355,9 +355,9 @@ int test_create_mg_graph_multiple_edge_lists_multi_edge(const cugraph_resource_h
properties.is_symmetric = FALSE;
properties.is_multigraph = FALSE;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

const size_t num_local_arrays = 2;

Expand Down
12 changes: 6 additions & 6 deletions cpp/tests/c_api/mg_generate_rmat_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ int test_rmat_generation(const cugraph_resource_handle_t* handle)
TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "rng_state create failed.");
TEST_ALWAYS_ASSERT(ret_code == CUGRAPH_SUCCESS, cugraph_error_message(ret_error));

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

ret_code = cugraph_generate_rmat_edgelist(
handle, rng_state, 5, 30, 0.57, 0.19, 0.19, FALSE, &coo, &ret_error);
Expand Down Expand Up @@ -342,9 +342,9 @@ int test_rmat_list_generation(const cugraph_resource_handle_t* handle)
TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "rng_state create failed.");
TEST_ALWAYS_ASSERT(ret_code == CUGRAPH_SUCCESS, cugraph_error_message(ret_error));

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

ret_code = cugraph_generate_rmat_edgelists(
handle, rng_state, num_lists, 4, 6, 4, UNIFORM, POWER_LAW, FALSE, &coo_list, &ret_error);
Expand Down
6 changes: 3 additions & 3 deletions cpp/tests/c_api/mg_induced_subgraph_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ int generic_induced_subgraph_test(const cugraph_resource_handle_t* handle,

cugraph_induced_subgraph_result_t* result = NULL;

data_type_id_t vertex_tid = INT32;
data_type_id_t size_t_tid = SIZE_T;
size_t num_subgraph_vertices = h_subgraph_offsets[num_subgraph_offsets - 1];
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t size_t_tid = SIZE_T;
size_t num_subgraph_vertices = h_subgraph_offsets[num_subgraph_offsets - 1];

ret_code = create_mg_test_graph(
handle, h_src, h_dst, h_wgt, num_edges, store_transposed, FALSE, &graph, &ret_error);
Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/c_api/mg_k_truss_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ int generic_k_truss_test(const cugraph_resource_handle_t* handle,

cugraph_induced_subgraph_result_t* result = NULL;

data_type_id_t vertex_tid = INT32;
data_type_id_t size_t_tid = SIZE_T;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t size_t_tid = SIZE_T;

ret_code = create_mg_test_graph(
handle, h_src, h_dst, h_wgt, num_edges, store_transposed, TRUE, &graph, &ret_error);
Expand Down
10 changes: 5 additions & 5 deletions cpp/tests/c_api/mg_lookup_src_dst_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ typedef int32_t edge_type_t;

typedef float weight_t;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

int generic_lookup_src_dst_test(const cugraph_resource_handle_t* handle,
vertex_t* h_srcs,
Expand Down
22 changes: 11 additions & 11 deletions cpp/tests/c_api/mg_negative_sampling_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ typedef int32_t vertex_t;
typedef int32_t edge_t;
typedef float weight_t;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

int generic_negative_sampling_test(const cugraph_resource_handle_t* handle,
vertex_t* h_src,
Expand Down Expand Up @@ -210,9 +210,9 @@ int generic_negative_sampling_test(const cugraph_resource_handle_t* handle,

int test_negative_sampling_uniform(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down Expand Up @@ -243,9 +243,9 @@ int test_negative_sampling_uniform(const cugraph_resource_handle_t* handle)

int test_negative_sampling_biased(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down
8 changes: 4 additions & 4 deletions cpp/tests/c_api/mg_pagerank_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ int generic_personalized_pagerank_test(const cugraph_resource_handle_t* handle,
cugraph_type_erased_device_array_view_t* personalization_vertices_view = NULL;
cugraph_type_erased_device_array_view_t* personalization_values_view = NULL;

data_type_id_t vertex_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

ret_code = create_mg_test_graph(
handle, h_src, h_dst, h_wgt, num_edges, store_transposed, FALSE, &p_graph, &ret_error);
Expand Down Expand Up @@ -311,8 +311,8 @@ int generic_personalized_pagerank_nonconverging_test(const cugraph_resource_hand
cugraph_type_erased_device_array_view_t* personalization_vertices_view = NULL;
cugraph_type_erased_device_array_view_t* personalization_values_view = NULL;

data_type_id_t vertex_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

ret_code = create_mg_test_graph(
handle, h_src, h_dst, h_wgt, num_edges, store_transposed, FALSE, &p_graph, &ret_error);
Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/c_api/mg_similarity_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ int generic_similarity_test(const cugraph_resource_handle_t* handle,
bool_t use_weight,
similarity_t test_type)
{
int test_ret_value = 0;
data_type_id_t vertex_tid = INT32;
int test_ret_value = 0;
cugraph_data_type_id_t vertex_tid = INT32;

cugraph_error_code_t ret_code = CUGRAPH_SUCCESS;
cugraph_error_t* ret_error;
Expand Down
38 changes: 19 additions & 19 deletions cpp/tests/c_api/mg_test_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ extern "C" int create_mg_test_graph(const cugraph_resource_handle_t* handle,
properties.is_symmetric = is_symmetric;
properties.is_multigraph = FALSE;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

cugraph_type_erased_device_array_t* src;
cugraph_type_erased_device_array_t* dst;
Expand Down Expand Up @@ -241,9 +241,9 @@ extern "C" int create_mg_test_graph_double(const cugraph_resource_handle_t* hand
properties.is_symmetric = is_symmetric;
properties.is_multigraph = FALSE;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT64;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT64;

cugraph_type_erased_device_array_t* src;
cugraph_type_erased_device_array_t* dst;
Expand Down Expand Up @@ -334,9 +334,9 @@ extern "C" int create_mg_test_graph_with_edge_ids(const cugraph_resource_handle_
properties.is_symmetric = is_symmetric;
properties.is_multigraph = FALSE;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

cugraph_type_erased_device_array_t* src;
cugraph_type_erased_device_array_t* dst;
Expand Down Expand Up @@ -428,11 +428,11 @@ extern "C" int create_mg_test_graph_with_properties(const cugraph_resource_handl
properties.is_symmetric = is_symmetric;
properties.is_multigraph = FALSE;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t index_tid = INT32;
data_type_id_t type_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t index_tid = INT32;
cugraph_data_type_id_t type_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;

cugraph_type_erased_device_array_t* src = NULL;
cugraph_type_erased_device_array_t* dst = NULL;
Expand Down Expand Up @@ -541,15 +541,15 @@ extern "C" int create_mg_test_graph_with_properties(const cugraph_resource_handl
}

int create_mg_test_graph_new(const cugraph_resource_handle_t* handle,
data_type_id_t vertex_tid,
data_type_id_t edge_tid,
cugraph_data_type_id_t vertex_tid,
cugraph_data_type_id_t edge_tid,
void* h_src,
void* h_dst,
data_type_id_t weight_tid,
cugraph_data_type_id_t weight_tid,
void* h_wgt,
data_type_id_t edge_type_tid,
cugraph_data_type_id_t edge_type_tid,
void* h_edge_type,
data_type_id_t edge_id_tid,
cugraph_data_type_id_t edge_id_tid,
void* h_edge_id,
size_t num_edges,
bool_t store_transposed,
Expand Down
10 changes: 5 additions & 5 deletions cpp/tests/c_api/mg_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ int create_mg_test_graph_with_properties(const cugraph_resource_handle_t* p_hand
cugraph_error_t** ret_error);

int create_mg_test_graph_new(const cugraph_resource_handle_t* handle,
data_type_id_t vertex_tid,
data_type_id_t edge_tid,
cugraph_data_type_id_t vertex_tid,
cugraph_data_type_id_t edge_tid,
void* h_src,
void* h_dst,
data_type_id_t weight_tid,
cugraph_data_type_id_t weight_tid,
void* h_wgt,
data_type_id_t edge_type_tid,
cugraph_data_type_id_t edge_type_tid,
void* h_edge_type,
data_type_id_t edge_id_tid,
cugraph_data_type_id_t edge_id_tid,
void* h_edge_id,
size_t num_edges,
bool_t store_transposed,
Expand Down
Loading

0 comments on commit d0170ae

Please sign in to comment.