<div dir="ltr"><div dir="ltr">On Sat, Aug 29, 2020 at 3:24 PM Eda Oktay <<a href="mailto:eda.oktay@metu.edu.tr">eda.oktay@metu.edu.tr</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I am trying to partition a sparse matrix by using ParMETIS. I am converting my matrix to adjacency type and then applying partitioning. Default, I understood that partitioning doesn't use edge-weights. However, when I used the following codes I saw from ex15 and used "-test_use_edge_weights 1", I am getting the same results as when I don't consider edge weights.</div><div><br></div><div>PetscBool use_edge_weights=PETSC_FALSE;<br>  PetscOptionsGetBool(NULL,NULL,"-test_use_edge_weights",&use_edge_weights,NULL);<br>  if (use_edge_weights) {<br>      MatPartitioningSetUseEdgeWeights(part,use_edge_weights);<br><br>      MatPartitioningGetUseEdgeWeights(part,&use_edge_weights);<br>      if (!use_edge_weights) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_INCOMP, "use_edge_weights flag does not setup correctly \n");<br>    }<br></div><div><br></div><div>My matrix does not consist of 1s and 0s, so I want partitioning to consider all the nonzero elements in the matrix as edge weights. Don't MatPartitioningSetUseEdgeWeights and MatPartitioningGetUseEdgeWeights do that? Should I add something more? In the page of MatPartitioningSetUseEdgeWeights, it is written that "If set use_edge_weights to TRUE, users need to make sure legal edge weights are stored in an ADJ matrix.". How can I make sure of this? </div></div></blockquote><div><br></div><div>This is a question for the ParMetis list. My memory says that the weights need to be non-negative, and for their optimization algorithm to work, they should be small, say < 10.</div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am trying to compare the use of ParMETIS with the spectral partitioning algorithm when I used a weighted Laplacian.</div><div><br></div><div>Thanks!</div><div><br></div><div>Eda</div><div><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>