<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="direction: ltr;">
<div style="direction: ltr;">I am trying to multiply two dense matrices using the Elemental interface. I fill the matrix using MatSetValue( ) like below:</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">
<div style="direction: ltr;"> for ( i = 0; i < Matrix.M; i++){</div>
<div style="direction: ltr;">        for ( j = 0; j < Matrix.N; j++) {</div>
<div style="direction: ltr;">             PetscScalar temp = i + one + (j*three);</div>
<div style="direction: ltr;">             MatSetValue(Matrix.A, i, j, temp, INSERT_VALUES);</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">      }</div>
<div style="direction: ltr;">   }</div>
<div><br>
</div>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">However, I seem to get the following error:</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">[0]PETSC ERROR: No support for this operation for this object type</div>
<div style="direction: ltr;">[0]PETSC ERROR: Only ADD_VALUES to off-processor entry is supported</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">But if I use ADD_VALUES, I get a different matrix depending on the number of processors used. The entries become multiplied by the number of processors. How do I reconcile this?</div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 10pt;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 10pt;">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px; font-family:Tahoma">
<p><br>
<a href="redir.aspx?REF=hVEx-ekIltbV6NDJuYjzplTZG3ymEirNPcO9eR2dIGrvJzCyE4XTCAFtYWlsdG86ZXJpYy5yb2JlcnRzb25AY2ZkcmMuY29t" target="_blank"></a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>