<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 15.06.2012 14:46, Matthew Knepley wrote:
<blockquote
cite="mid:CAMYG4GkZG239CqBJo+YvSBCmRhOAF6Q1gWd0+vBRUn_hNhzckQ@mail.gmail.com"
type="cite">On Fri, Jun 15, 2012 at 8:31 PM, Alexander Grayver <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:agrayver@gfz-potsdam.de" target="_blank">agrayver@gfz-potsdam.de</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> Matt,<br>
<br>
According to that code:<br>
<br>
<pre width="80"><a moz-do-not-send="true" name="137f0222fdf86feb_line486">486: </a><strong><font color="#4169e1"><a moz-do-not-send="true" name="137f0222fdf86feb_MatMult_MPIDense"></a><a moz-do-not-send="true">PetscErrorCode</a> MatMult_MPIDense(<a moz-do-not-send="true">Mat</a> mat,<a moz-do-not-send="true">Vec</a> xx,<a moz-do-not-send="true">Vec</a> yy)</font></strong>
<a moz-do-not-send="true" name="137f0222fdf86feb_line487">487: </a>{
<a moz-do-not-send="true" name="137f0222fdf86feb_line488">488: </a> Mat_MPIDense *mdn = (Mat_MPIDense*)mat->data;
<a moz-do-not-send="true" name="137f0222fdf86feb_line492">492: </a> <a moz-do-not-send="true">VecScatterBegin</a>(mdn->Mvctx,xx,mdn->lvec,<a moz-do-not-send="true">INSERT_VALUES</a>,<a moz-do-not-send="true">SCATTER_FORWARD</a>);
<a moz-do-not-send="true" name="137f0222fdf86feb_line493">493: </a> <a moz-do-not-send="true">VecScatterEnd</a>(mdn->Mvctx,xx,mdn->lvec,<a moz-do-not-send="true">INSERT_VALUES</a>,<a moz-do-not-send="true">SCATTER_FORWARD</a>);
<a moz-do-not-send="true" name="137f0222fdf86feb_line494">494: </a> MatMult_SeqDense(mdn->A,mdn->lvec,yy);
<a moz-do-not-send="true" name="137f0222fdf86feb_line495">495: </a> <font color="#4169e1">return</font>(0);
<a moz-do-not-send="true" name="137f0222fdf86feb_line496">496: </a>}
</pre>
Each process has its own local copy of the vector? <br>
</div>
</blockquote>
<div><br>
</div>
<div>I am not sure what your point is. VecScatter is just an
interface that has many implementations. </div>
</div>
</blockquote>
<br>
I'm trying to estimate the amount of data needs to be communicated
over all processes during this operation. <br>
In debugger I see VecScatter from the code above reduces to the
MPI_Allgatherv and results in (assuming vector is distributed
uniformly)<br>
<br>
bytes_send_received = num_of_proc * ((num_of_proc - 1) *
vec_size_local) * 2 * sizeof(PetscScalar)<br>
<br>
Does that look reasonable?<br>
Thanks.<br>
<pre class="moz-signature" cols="72">--
Regards,
Alexander</pre>
</body>
</html>