<p>Yes, the matrix is dense. So, you mean that there is no way to evaluate the matrix, exactly? .... I have run the code for smaller size of Ypcq and it&#39;s working. But for larger sizes I get the error that I mentioned.</p>

<div class="gmail_quote">On Jan 2, 2012 6:24 PM, &quot;Jed Brown&quot; &lt;<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">On Mon, Jan 2, 2012 at 17:16, Reza Madankan <span dir="ltr">&lt;<a href="mailto:rm93@buffalo.edu" target="_blank">rm93@buffalo.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>I am trying to compose a covariance matrix which is of size 72576 x 72576, by multiplication of a vector and its transpose, i.e.</div><div><br></div><div>MatMatMult(Ypcq,YpcqT,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&amp;InnProd)</div>


<div><br></div><div>where, Ypcq is a vector with 72576 elements and YpcqT is its transpose. </div></blockquote><div><br></div><div>This matrix is dense, right? Would you consider something less than the full covariance matrix, such as a low rank approximation?</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Unfortunately Petsc returns out of memory message while running the code:</div><div><br></div><div><br>

</div><div><div>
[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>[0]PETSC ERROR: Out of memory. This could be due to allocating</div><div>[0]PETSC ERROR: too large an object or bleeding by not properly</div>


<div>[0]PETSC ERROR: destroying unneeded objects.</div><div>[0]PETSC ERROR: Memory allocated 0 Memory used by process <a href="tel:15732801536" value="+15732801536" target="_blank">15732801536</a></div><div>[0]PETSC ERROR: Try running with -malloc_dump or -malloc_log for info.</div>

<div>
[0]PETSC ERROR: Memory requested 18446744068420534272!</div></div></blockquote><div><br></div><div>These huge numbers indicate memory corruption somewhere. I suggest running a smaller problem size under Valgrind.</div><div>

 </div></div><br>
</blockquote></div>