<div dir="ltr"><div dir="ltr">On Sat, Mar 9, 2019 at 10:01 AM Eda Oktay <<a href="mailto:eda.oktay@metu.edu.tr">eda.oktay@metu.edu.tr</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear Matt,<div><br></div><div>Thank you for your example. I didn't compile your program since I fixed my problem, now I get a value. However, now I get a different error:</div><div><br></div><div><div>[0]PETSC ERROR: Argument out of range</div><div>[0]PETSC ERROR: Argument 2 out of range</div><div>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</div><div>[0]PETSC ERROR: Petsc Release Version 3.10.3, Dec, 18, 2018 </div><div>[0]PETSC ERROR: ./ENYENI_FINAL on a arch-linux2-c-debug named localhost.localdomain by edaoktay Sat Mar  9 17:55:23 2019</div><div>[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-cxx-dialect=C++11 --download-openblas --download-metis --download-parmetis --download-superlu_dist --download-slepc --download-mpich</div><div>[0]PETSC ERROR: #1 EPSGetEigenpair() line 398 in /home/edaoktay/petsc-3.10.3/arch-linux2-c-debug/externalpackages/git.slepc/src/eps/interface/epssolve.c</div></div><div><br></div><div>I didn't understand why the arguments are out of range. I used this function as:</div><div><br></div><div>ierr = EPSGetEigenpair(eps,0,&kr,NULL,vr,NULL);<br></div><div><br></div><div>By the way, even though I get this error, I think EPSGetEigenpair computes something since I get 4.07265e-314 (which is obviously not true) as the second smallest eigenvalue.</div></div></div></div></div></blockquote><div><br></div><div>The error message makes it sound like you have no converged eigenvalues. Then its no surprise that</div><div>its not setting a value. You need to use CHKERRQ() for all return values, so that it stops after an </div><div>error since the values will not be set.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks,</div><div><br></div><div>Eda</div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>, 8 Mar 2019 Cum, 16:41 tarihinde şunu yazdı:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Fri, Mar 8, 2019 at 8:38 AM Eda Oktay <<a href="mailto:eda.oktay@metu.edu.tr" target="_blank">eda.oktay@metu.edu.tr</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Dear Matt,<div><br></div><div>Thank you for your answer but I get an error even before compiling ex6. The error is:</div><div><br></div><div><div>error: too many arguments to function ‘DMSetField’</div><div>   ierr = DMSetField(dm, 0, NULL, (PetscObject) fe);CHKERRQ(ierr);</div></div></div></div></blockquote><div><br></div><div>You need PETSc master and slepc-dev.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Eda</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>, 7 Mar 2019 Per, 15:07 tarihinde şunu yazdı:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Thu, Mar 7, 2019 at 6:45 AM Eda Oktay via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>I have a code finding Laplacian of a matrix and then I need to find this Laplacian's second smallest eigenpair. I used EPSGetEigenpair code but I get the values like "0." or "4." (I could not get decimals) when I used PetscPrintf(PETSC_COMM_WORLD," The second smallest eigenvalue: %g\n",kr) line.</div><div><br></div><div>What could be the problem?</div></div></div></blockquote><div><br></div><div>Hi Eda,</div><div><br></div><div>I have an example that does just this, and I am getting the correct result. I have not yet checked it in,</div><div>but i attach it here. Are you setting the right target?</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Best regards,</div><div><br></div><div>Eda</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-5019054953813415326gmail-m_-3591890665795688563gmail-m_-2034695725788897716gmail-m_7201301198072955334gmail_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>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-5019054953813415326gmail-m_-3591890665795688563gmail_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>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="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>