<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Sep 14, 2018 at 12:19 PM Jose E. Roman <<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>El 14 sept 2018, a las 17:45, Jan Grießer <<a href="mailto:griesser.jan@googlemail.com" target="_blank">griesser.jan@googlemail.com</a>> escribió:<br></div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Hey there,<div>first i want to say thanks to <span style="color:rgb(0,0,0);white-space:pre-wrap"><span id="m_-290301358860726103:1br.1">Satish</span> and </span><font color="#000000"><span style="white-space:pre-wrap">Matt for helping with with my last problem with the <span id="m_-290301358860726103:1br.2">mpi</span> compilation. I have two <span id="m_-290301358860726103:1br.3">questions</span> related to solving a big, <span id="m_-290301358860726103:1br.4">hermitian</span>, standard eigenvalue problem using SLEPc4py., compiled with Intel <span id="m_-290301358860726103:1br.5">MKL</span> and Intel <span id="m_-290301358860726103:1br.7">MPI</span>. </span></font><font color="#000000"><span style="white-space:pre-wrap">
- I am using slepc4py with <span id="m_-290301358860726103:1br.8">mpi</span> and run it with around -n 20 cores at the moment and how i wanted to ask if there is an easy way to retrieve the <span id="m_-290301358860726103:1br.9">eigenvectors</span>? When i run my code and print </span></font>
<font color="#000000"><span style="white-space:pre-wrap">for i in range(<span id="m_-290301358860726103:1br.10">nconv</span>):</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">          </span>for i in range(<span id="m_-290301358860726103:1br.11">nconv</span>):<span style="white-space:pre-wrap">
                        val = E.<span id="m_-290301358860726103:1br.12">getEigenpair</span>(i, <span id="m_-290301358860726103:1br.13">vr</span>, vi)
                        Print(<span id="m_-290301358860726103:1br.14">vr</span>.<span id="m_-290301358860726103:1br.15">getArray</span>())</span></font>
 </div><div><font color="#000000"><span style="white-space:pre-wrap"> i get the parts of the <span id="m_-290301358860726103:1br.16">eigenvectors</span> according to the partition of the matrix. Is there any easy way to put them together in an array and write them to file ? (I am struggling a little bit with the building them in the correct order)</span></font></div></div></div></div></div></blockquote><div><br></div><div>You need <a name="m_-290301358860726103_VecScatterCreateToZero"><h1 style="display:inline!important"><font color="#000000"><span style="font-size:19px;background-color:rgba(255,255,255,0)">VecScatterCreateToZero. </span></font></h1></a>There must be an equivalent in python.</div></div></blockquote><div><br></div><div>An alternative to this which you should consider, because it is simpler, is to write the vector to a file</div><div>using some format that PETSc understands, Then you just need vr.view(viewer) for a viewer like</div><div>the binary viewer or some ASCII format you like.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font color="#000000"><span style="white-space:pre-wrap">- I need to solve eigenvalue problems up to a dimension of 100000 degrees of freedom and i need all eigenvalues and <span id="m_-290301358860726103:1br.17">eigenvectors</span>. I think solving all eigenvalues in one process is far too much and i thought about if it is possible to apply the spectrum slicing described in Chap. 3.4.5.  Due to the nature of my problem, i am able to simulate smaller systems of 10000 <span id="m_-290301358860726103:1br.18">DOF</span> and extract the biggest eigenvalue, which will be the same for larger systems sizes. Is this in general possible since i have a standard HEP problem or is there a better and faster <span id="m_-290301358860726103:1br.20">possibility</span> to do this?</span></font></div></div></div></div></div></blockquote><div><br></div><div>In general, SLEPc is not intended for computing the whole spectrum. You can try with spectrum slicing but this will be competitive if computing just a percentage of eigenvalues, 50% say. </div><div><br></div><div>Jose</div><br><blockquote type="cite"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Thank you very much!</span></font></div></div></div></div>
</div></blockquote></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>