<div dir="ltr"><div dir="ltr">On Wed, Dec 1, 2021 at 4:51 PM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</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 style="overflow-wrap: break-word;"><div><br></div><div>  It may not happen with one rank. Or it may.</div><div><br></div>  With more than one rank one may run a code and think it is working correctly but that does not mean the PetscSF is correct. It is generating "extra" degrees of freedom for these vertices each associated with a different edge and not properly connecting them. You can tell by doing a full DMView on the dmplex and PetscSF and seeing more roots than there should be listed. Hence the numerics will be wrong even though it does not crash or complain.</div></blockquote><div><br></div><div>Okay, I think we need specific tests to see what is going on.</div><div><br></div><div>Theoretically, having multiple edges between vertices does not make sense since the edge _means_ (v_i, v_j) topologically. You can certainly have many fields on a given edge, but I don't know what it would mean to have two edges since no topological query could tell the difference.</div><div><br></div><div>However, you can certainly tell Plex anything you want to tell it. DMPlexBuildFromCellListParallel() gets only cells and vertices, so you are saying that there is a duplicate cell. That is allowed and should work properly, EXCEPT if you wanted to identify a cell only by its cone (then you could not tell them apart). I do this for faces, but I did not think I ever did it for cells.</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 style="overflow-wrap: break-word;"><div><div><blockquote type="cite"><div>On Dec 1, 2021, at 4:37 PM, Abhyankar, Shrirang G <<a href="mailto:shrirang.abhyankar@pnnl.gov" target="_blank">shrirang.abhyankar@pnnl.gov</a>> wrote:</div><br><div><div style="font-family:Helvetica;font-size:18px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif">Barry,<u></u><u></u></span></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif">“</span>Is there anything we can do to support having multiple edges between the same two vertices”<u></u><u></u></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Some of my power grid datasets have multiple edges between the same two vertices and I’ve not faced an issue with DMNetwork. However, all the data was read on rank 0 only (and then distributed).<u></u><u></u></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Maybe the issue is with the edges being passed on different ranks?<span style="font-size:12pt;font-family:"Times New Roman",serif"><u></u><u></u></span></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></div><div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif">Thanks,<u></u><u></u></span></div><div style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;font-family:"Times New Roman",serif">Shri <u></u><u></u></span></div></div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0in 0in"><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><b><span style="font-size:12pt">From:<span> </span></span></b><span style="font-size:12pt">Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank">bsmith@petsc.dev</a>><br><b>Date:<span> </span></b>Wednesday, December 1, 2021 at 3:19 PM<br><b>To:<span> </span></b>"Knepley, Matthew G (VISIT)" <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>, PETSc Development <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>>, "Abhyankar, Shrirang G" <<a href="mailto:shrirang.abhyankar@pnnl.gov" target="_blank">shrirang.abhyankar@pnnl.gov</a>>, "Zhang, Hong" <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>>, Getnet Betrie <<a href="mailto:gbetrie@anl.gov" target="_blank">gbetrie@anl.gov</a>><br><b>Subject:<span> </span></b>DMPLEX cannot support two different edges for the same two vertices, hence DMPLEX cannot?<u></u><u></u></span></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Check twice before you click! This email originated from outside PNNL.<u></u><u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">   Matt,<u></u><u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">     If DMPlexBuildFromCellListParallel() is called with two edges that have the same two vertices what will happen? It looks like it ends up with an incorrect PetscSF if the two edges are passed on different ranks. Hence the DMPLEX is not valid and produces garbage.<u></u><u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">     Neurons can be connected to themselves which seems to be breaking DMPLEX and hence DMNETWORK.<u></u><u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">     Is there anything we can do to support having multiple edges between the same two vertices? If not is there a way we can have DMPlexBuildFromCellListParallel() generate an error automatically if there are such extra edges in the input data.<u></u><u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">   Thanks<u></u><u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">  Barry<u></u><u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">In this work, the neurons are represented by vertices in the network and each synapse is a graph edge.</div></div></div></div></blockquote></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>