<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; ">
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">-----Original Message-----</div>
<div style="font-family: Calibri, sans-serif; ">From: Florian Meier <<a href="mailto:florian.meier@koalo.de">florian.meier@koalo.de</a>></div>
<div style="font-family: Calibri, sans-serif; ">Date: Fri, 14 Mar 2014 19:34:23 +0100</div>
<div style="font-family: Calibri, sans-serif; ">To: Shri <<a href="mailto:abhyshr@mcs.anl.gov">abhyshr@mcs.anl.gov</a>></div>
<div style="font-family: Calibri, sans-serif; ">Cc: petsc-users list <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>></div>
<div style="font-family: Calibri, sans-serif; ">Subject: Re: Extra Variable in DMCircuit</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="font-family: Calibri, sans-serif; border-left-color: rgb(181, 196, 223); border-left-width: 5px; border-left-style: solid; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; ">
<div>On 03/14/2014 06:24 PM, Abhyankar, Shrirang G. wrote:</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div></div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div><br>
</div>
</blockquote>
</blockquote>
<div><br>
</div>
<div>That sounds great! Although, this solution seems to be very specific to</div>
<div>the equations. Does this approach still work when the equations get more</div>
<div>complex (e.g. handling multiple variables like PRODUCT(1+t*(a-1)) or</div>
<div>SUM(R*q*(1-f)) )?</div>
</blockquote>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; "><span style="font-family: Helvetica; ">Managing custom needs is difficult to maintain hence what I'm planning to do is to provide a way for the user to define a own custom MPI_Op that can be called </span></div>
<div style="font-family: Calibri, sans-serif; "><span style="font-family: Helvetica; ">by DMLocalToGlobalXXX/DMGlobalToLocalXXX. So eventually you'll have to write the MPI_Op and we'll provide hooks to attach it to the DM.</span></div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="font-family: Calibri, sans-serif; border-left-color: rgb(181, 196, 223); border-left-width: 5px; border-left-style: solid; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; ">
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>Now I would like to add a single global variable (and a single equation)</div>
<div>to the equation system. Is there an elegant way to do this with DMCircuit?</div>
</blockquote>
<div></div>
<div>Is this akin to a "Ground" node for circuits? Is the variable value</div>
<div>constant?</div>
</blockquote>
<div><br>
</div>
<div>Maybe...</div>
<div>The additional equation is the multiplication of the reliability over a</div>
<div>specific path in the network (a rather arbitrary, but small subset of</div>
<div>the links (e.g. 55 links for a problem with 10000 links)) minus a</div>
<div>constant predefined value.</div>
<div>This gives me the possibility to convert the formerly constant packet</div>
<div>generation (g_i) into a variable.</div>
</blockquote>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; "><span style="font-family: Helvetica; ">I see..so it is like an equality constraint on a subset of links, not all the links. Presumably these links form a subnetwork that</span></div>
<div style="font-family: Calibri, sans-serif; "><span style="font-family: Helvetica; ">may get assigned to one processor/set of neighboring processors.</span></div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="font-family: Calibri, sans-serif; border-left-color: rgb(181, 196, 223); border-left-width: 5px; border-left-style: solid; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; ">
<div><br>
</div>
<div>When adding an additional vertex it works quite good. We will see how it</div>
<div>works out when running in parallel.</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>After working on your example I realized that specifying a bidirectional</div>
<div>edge as two unidirectional edges in the data may cause problems for the</div>
<div>partitioner. I observed that</div>
<div>the two undirectional edges may be assigned to different processors</div>
<div>although they are connected to the same vertices. This may be a problem</div>
<div>when communicating ghost</div>
<div>values. Hence, I've modified the data format in the attached links1.txt</div>
<div>file to only specify edges via their nodal connectivity and then to</div>
<div>specify the type information.</div>
<div>I've reworked your source code also accordingly and it gives the same</div>
<div>answer as your original code. It gives a wrong answer for parallel runs</div>
<div>because of the incorrect</div>
<div>ghost value exchanges. Once we have the ADD_PROD insertmode, this code</div>
<div>should work fine in parallel too. I think that going forward you should</div>
<div>use a similar data format.</div>
</blockquote>
<div><br>
</div>
<div>Good idea, but unfortunately it is not always guaranteed that the edge</div>
<div>is bidirectional for the extended formulation of the problem. </div>
</blockquote>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div>Are you saying that the directionality could change during the calculation?</div>
<div style="font-family: Calibri, sans-serif; "><span class="Apple-style-span" style="font-family: Helvetica; ">In your example, the INTERFERING edges are bidirectional</span></div>
<div style="font-family: Calibri, sans-serif; "><span style="font-family: Helvetica; ">while the INFLOWING links are unidirectional. By setting up the appropriate relations in the</span></div>
<div style="font-family: Calibri, sans-serif; "><span style="font-family: Helvetica; ">data attached with the edges , you can manage the equations for the </span></div>
<div style="font-family: Calibri, sans-serif; "><span style="font-family: Helvetica; ">edges/vertices. If there is some specific case that cannot be handled then we can take a look at it.</span></div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="font-family: Calibri, sans-serif; border-left-color: rgb(181, 196, 223); border-left-width: 5px; border-left-style: solid; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; ">
<div>What</div>
<div>exactly is the problem when the two unidirectional edges are assigned to</div>
<div>different processes?</div>
</blockquote>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div>I don't quite remember it right now but I recall seeing weird partitions and incorrect ghost exchanges. I'll have to run it once again</div>
<div>to produce specific details.</div>
<div><br>
</div>
<div>Shri</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="font-family: Calibri, sans-serif; border-left-color: rgb(181, 196, 223); border-left-width: 5px; border-left-style: solid; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; ">
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div></div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div></div>
<div>A hackish solution might be to add an additional imaginary vertex that</div>
<div>is excluded from all other calculations, but that does not seem to be</div>
<div>the right way to do it.</div>
<div></div>
<div>Greetings,</div>
<div>Florian</div>
</blockquote>
<div></div>
</blockquote>
<div><br>
</div>
</blockquote>
</body>
</html>