cugraph icon indicating copy to clipboard operation
cugraph copied to clipboard

[ENH] Add tiny graphs to test suites to better cover corner cases

Open seunghwak opened this issue 4 years ago • 3 comments

Describe the solution you'd like Testing on tiny graphs often reveals corner cases (e.g. in multi-GPU execution, some graph partitions may have 0 vertices/edges) and also quick to test and easy to debug.

We need to add few tiny graphs to our test suites.

e.g.

  1. a graph with only one edge
  2. a graph with only one vertex and no edge (if we can take vertex lists in addition to edge lists)

Make this a DataSets option

seunghwak avatar Apr 01 '21 15:04 seunghwak

Question @seunghwak: Do you want to address this in C++ unit tests, Python unit tests or both?

We don't strictly need to use file based data in the C++ unit tests, we could use some of the graph generators to generate tiny graphs.

I'm thinking we should split this issue into a C++ issue and a python issue. The C++ issue is probably very easy to address, the python issue might take a bit more work (perhaps after #1544 is incorporated exposing the graph generators to python).

ChuckHastings avatar Nov 15 '21 20:11 ChuckHastings

I guess for both (and eventually, we may better use the same data set for Python and C++ testing).

The main rationale behind this is to test for multiple corner cases with the smallest possible graphs. E.g. only one vertex with no edge, two isolated vertices, two vertex with multi-edges, two vertices with only self-loops, and any other cases we identify as a corner case in debugging/testing.

I guess once we switch to the csv format, creating files can be easier than tweaking generators to cover all these corner cases.

seunghwak avatar Nov 16 '21 14:11 seunghwak

And if we can cover sufficient corner cases with tiny graphs, we may skip testing with large files (which takes long to read & parse and increase our C++ testing time; especially the ljournal file) and cover scale-testing only with generated graphs.

seunghwak avatar Nov 16 '21 14:11 seunghwak