-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KokkosGraph: output colors assigned during graph coloring #444
Comments
@rohit-mp We will be happy to accept PRs for this. Just put me and @william76 on that PR, we can look at coloring related things. |
There is an interface in the distance-2 graph coloring handle to get the colors: kokkos-kernels/src/graph/KokkosGraph_Distance2ColorHandle.hpp Lines 325 to 327 in d86db11
I did put in a function in the handle as well to dump out the coloring into a graphviz file. You can find that routine here: kokkos-kernels/src/graph/KokkosGraph_Distance2ColorHandle.hpp Lines 376 to 395 in d86db11
It does more in there than you might want but it might be useful as a guide. An example of the graphviz writer being used lives in the distance-2 graph coloring perf test... if the graph has fewer than 1500 nodes, a .dot file will be output by the test application: kokkos-kernels/perf_test/graph/KokkosGraph_color_d2.cpp Lines 366 to 388 in d86db11
It should be pretty easy to get the node to color mapping out by having a look at what the dump_graphviz() function is doing... it could be copied and modified pretty easily into something that just dumps out a CSV file containing the node/color pairs. Hopefully this information is helpful... |
Thanks for the information! What I've done now is kinda similar. I've used the same I've also added another option to possible argument kokkos-kernels/test_common/KokkosKernels_TestParameters.hpp Lines 44 to 64 in d86db11
Could you have a look at the PR and let me know if it's fine or if I should change it to be similar to |
@rohit-mp : We do not close the issue until we merge changes into master as that is what most users to see. Whoever does the master merge will close it at that time. Let us leave it open till then. |
Ah sorry, my bad. |
Currently, KokkosGraph coloring programs provide no option to output the colors assigned by it during its execution. It would be nice to have an option to output the colors to a file for later reference.
I tinkered with the source code a bit and got the feature running. So if it's fine, I'd like to create a PR for the same.
The text was updated successfully, but these errors were encountered: