From 1362861fabbaa1a2a61f14970032bb93482eea9a Mon Sep 17 00:00:00 2001 From: "Christian Robert Trott (-EXP)" Date: Mon, 5 Mar 2018 15:16:18 -0700 Subject: [PATCH 1/2] Add some more kernel names --- src/common/KokkosKernels_SimpleUtils.hpp | 6 +++--- src/graph/KokkosGraph_GraphColorHandle.hpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/KokkosKernels_SimpleUtils.hpp b/src/common/KokkosKernels_SimpleUtils.hpp index 4d42e6c5a9..d563f8bf04 100644 --- a/src/common/KokkosKernels_SimpleUtils.hpp +++ b/src/common/KokkosKernels_SimpleUtils.hpp @@ -115,7 +115,7 @@ struct InclusiveParallelPrefixSum{ template inline void kk_exclusive_parallel_prefix_sum(typename view_t::value_type num_elements, view_t arr){ typedef Kokkos::RangePolicy my_exec_space; - Kokkos::parallel_scan( my_exec_space(0, num_elements), ExclusiveParallelPrefixSum(arr)); + Kokkos::parallel_scan( "KokkosKernels::PrefixSum", my_exec_space(0, num_elements), ExclusiveParallelPrefixSum(arr)); } @@ -130,7 +130,7 @@ inline void kk_exclusive_parallel_prefix_sum(typename view_t::value_type num_ele template void kk_inclusive_parallel_prefix_sum(typename forward_array_type::value_type num_elements, forward_array_type arr){ typedef Kokkos::RangePolicy my_exec_space; - Kokkos::parallel_scan( my_exec_space(0, num_elements), InclusiveParallelPrefixSum(arr)); + Kokkos::parallel_scan( "KokkosKernels::PrefixSum", my_exec_space(0, num_elements), InclusiveParallelPrefixSum(arr)); } template @@ -296,7 +296,7 @@ struct ReduceMaxFunctor{ template void kk_view_reduce_max(size_t num_elements, view_type view_to_reduce, typename view_type::non_const_value_type &max_reduction){ typedef Kokkos::RangePolicy my_exec_space; - Kokkos::parallel_reduce( my_exec_space(0,num_elements), ReduceMaxFunctor(view_to_reduce), max_reduction); + Kokkos::parallel_reduce( "KokkosKernels::FindMax", my_exec_space(0,num_elements), ReduceMaxFunctor(view_to_reduce), max_reduction); } diff --git a/src/graph/KokkosGraph_GraphColorHandle.hpp b/src/graph/KokkosGraph_GraphColorHandle.hpp index ca3a559fa5..2dca443fa6 100644 --- a/src/graph/KokkosGraph_GraphColorHandle.hpp +++ b/src/graph/KokkosGraph_GraphColorHandle.hpp @@ -499,7 +499,7 @@ class GraphColoringHandle teamSizeMax, nv, ne); - Kokkos::parallel_for( + Kokkos::parallel_for("KokkosGraph::CountLowerTriangleTeam", team_policy_t(nv / teamSizeMax + 1 , teamSizeMax, vector_size), clt//, new_num_edge ); @@ -515,7 +515,7 @@ class GraphColoringHandle new_num_edge = hlower(); nnz_lno_persistent_work_view_t half_src (Kokkos::ViewAllocateWithoutInitializing("HALF SRC"),new_num_edge); nnz_lno_persistent_work_view_t half_dst (Kokkos::ViewAllocateWithoutInitializing("HALF DST"),new_num_edge); - Kokkos::parallel_for( + Kokkos::parallel_for("KokkosGraph::FillLowerTriangleTeam", team_policy_t(nv / teamSizeMax + 1 , teamSizeMax, vector_size), FillLowerTriangleTeam 0) { - Kokkos::parallel_reduce(my_exec_space(0,nv), + Kokkos::parallel_reduce("KokkosGraph::CountLowerTriangleTeam",my_exec_space(0,nv), CountLowerTriangle (nv, xadj, adj, lower_count), new_num_edge); } @@ -538,7 +538,7 @@ class GraphColoringHandle nnz_lno_persistent_work_view_t half_src (Kokkos::ViewAllocateWithoutInitializing("HALF SRC"),new_num_edge); nnz_lno_persistent_work_view_t half_dst (Kokkos::ViewAllocateWithoutInitializing("HALF DST"),new_num_edge); - Kokkos::parallel_for(my_exec_space(0,nv), FillLowerTriangle + Kokkos::parallel_for("KokkosGraph::FillLowerTriangleTeam",my_exec_space(0,nv), FillLowerTriangle (nv, xadj, adj, lower_count, half_src, half_dst)); @@ -578,7 +578,7 @@ class GraphColoringHandle nnz_lno_t get_num_colors(){ if (num_colors == 0){ typedef typename Kokkos::RangePolicy my_exec_space; - Kokkos::parallel_reduce(my_exec_space(0, vertex_colors.dimension_0()), + Kokkos::parallel_reduce("KokkosKernels::FindMax", my_exec_space(0, vertex_colors.dimension_0()), ReduceMaxFunctor(vertex_colors) ,num_colors); } return num_colors; From 33bee936dd988964d6acff360beae780e114a0e0 Mon Sep 17 00:00:00 2001 From: "Christian Robert Trott (-EXP)" Date: Mon, 5 Mar 2018 15:17:09 -0700 Subject: [PATCH 2/2] Make d2_graph_color use serial coloring by default --- src/graph/KokkosGraph_graph_color.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/graph/KokkosGraph_graph_color.hpp b/src/graph/KokkosGraph_graph_color.hpp index 1c03424d6c..8aab4c7794 100644 --- a/src/graph/KokkosGraph_graph_color.hpp +++ b/src/graph/KokkosGraph_graph_color.hpp @@ -211,7 +211,14 @@ void d2_graph_color( } default: + { + color_view_type colors_out = color_view_type("Graph Colors", num_rows); + BaseGraphColoring gc(num_rows, row_entries.dimension_0(), row_map, row_entries, gch); + gc.d2_color_graph/**/(colors_out, num_phases, num_cols, col_map, col_entries); + gch->set_num_phases(num_phases); + gch->set_vertex_colors(colors_out); break; + } }