<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 10, 2015 at 9:04 AM, venkatesh g <span dir="ltr"><<a href="mailto:venkateshgk.j@gmail.com" target="_blank">venkateshgk.j@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Hi, <br><br></div>Yes I will try Elemental but there is lots of complex routines and functions with long codes in Matlab which goes in the creation of the A and B matrices, so re-writing in C will take a long time. <br><br></div><div>Even if Matlab takes 128 GB out of 256 GB, and the matrix A to be written is around 25 GB, then PetscBinaryWrite.m is using more than 100 GB just to run.. This is the problem. <br><br></div><div>so is there any other way ?<br></div></div></blockquote><div><br></div><div>Don't write it as a sparse matrix. Write it as a dense matrix. This is just a 4 integer header</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:Consolas,Menlo,'Liberation Mono',Courier,monospace;font-size:12px;line-height:1.4;color:rgb(51,51,51)"><span class="">MAT_FILE_CLASSID, M, N, nz</span></pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-family:Consolas,Menlo,'Liberation Mono',Courier,monospace;font-size:12px;line-height:1.4;color:rgb(51,51,51)"><span class=""><br></span></pre></div><div>and then the data.</div><div><br></div><div>  <a href="https://bitbucket.org/petsc/petsc/src/7fe65498eb3a5a672e8885998851e0d5742e4c1e/src/mat/impls/dense/mpi/mpidense.c?at=master#cl-1571">https://bitbucket.org/petsc/petsc/src/7fe65498eb3a5a672e8885998851e0d5742e4c1e/src/mat/impls/dense/mpi/mpidense.c?at=master#cl-1571</a></div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>cheers,<br></div><div>Venkatesh<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 10, 2015 at 7:07 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Wed, Jun 10, 2015 at 8:32 AM, venkatesh g <span dir="ltr"><<a href="mailto:venkateshgk.j@gmail.com" target="_blank">venkateshgk.j@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div>The size of the matrix is 84500 x 84500<br><br></div>the no. of non-zero elements is 2.7338e+09<br></div></div></div></blockquote><div><br></div></span><div>This matrix is not sparse, it has 40% fill. You should treat it as dense. For dense matrices of this size,</div><div>you should consider using Elemental. We have an interface to Elemental in PETSc.</div><div><br></div><div>I recommend writing the code to create these entries on the fly since it will probably be faster than loading</div><div>them from disk.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div></div>cheers,<br></div>Venkatesh<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 10, 2015 at 6:35 PM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Whats the size of the matrix? How many non-zeros?<br>
<span><font color="#888888"><br>
Satish<br>
</font></span><div><div><span><br>
On Wed, 10 Jun 2015, venkatesh g wrote:<br>
<br>
> Hi<br>
><br>
> I am trying to write very large sparse matrices A and B for solving<br>
> generalized Eigenvalue problem<br>
><br>
> so that I can use SLEPC ex7.c code.<br>
><br>
> I want to read matrices from file according to that code. And I generate<br>
> these matrices from Matlab using PetscBinaryWrite.m<br>
><br>
> However, it exceeds my 256 GB RAM in one of the machines. So I am unable to<br>
> generate these binary matrices.<br>
><br>
> Kindly let me know how to write them efficiently.<br>
><br></span>
> cheers,<br>
><br>
> Venkatesh<br>
><br>
<br>
</div></div></blockquote></div><br></div>
</blockquote></span></div><br><br clear="all"><span class=""><font color="#888888"><span><div><br></div>-- <br><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>
</span></font></span></div></div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>