[petsc-users] EPSGetEigenpair Problem

Matthew Knepley knepley at gmail.com
Sat Mar 9 12:11:11 CST 2019


On Sat, Mar 9, 2019 at 10:01 AM Eda Oktay <eda.oktay at metu.edu.tr> wrote:

> Dear Matt,
>
> 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:
>
> [0]PETSC ERROR: Argument out of range
> [0]PETSC ERROR: Argument 2 out of range
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.10.3, Dec, 18, 2018
> [0]PETSC ERROR: ./ENYENI_FINAL on a arch-linux2-c-debug named
> localhost.localdomain by edaoktay Sat Mar  9 17:55:23 2019
> [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
> [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
>
> I didn't understand why the arguments are out of range. I used this
> function as:
>
> ierr = EPSGetEigenpair(eps,0,&kr,NULL,vr,NULL);
>
> 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.
>

The error message makes it sound like you have no converged eigenvalues.
Then its no surprise that
its not setting a value. You need to use CHKERRQ() for all return values,
so that it stops after an
error since the values will not be set.

   Matt


> Thanks,
>
> Eda
>
>
> Matthew Knepley <knepley at gmail.com>, 8 Mar 2019 Cum, 16:41 tarihinde şunu
> yazdı:
>
>> On Fri, Mar 8, 2019 at 8:38 AM Eda Oktay <eda.oktay at metu.edu.tr> wrote:
>>
>>> Dear Matt,
>>>
>>> Thank you for your answer but I get an error even before compiling ex6.
>>> The error is:
>>>
>>> error: too many arguments to function ‘DMSetField’
>>>    ierr = DMSetField(dm, 0, NULL, (PetscObject) fe);CHKERRQ(ierr);
>>>
>>
>> You need PETSc master and slepc-dev.
>>
>>   Thanks,
>>
>>      Matt
>>
>>
>>> Eda
>>>
>>>
>>> Matthew Knepley <knepley at gmail.com>, 7 Mar 2019 Per, 15:07 tarihinde
>>> şunu yazdı:
>>>
>>>> On Thu, Mar 7, 2019 at 6:45 AM Eda Oktay via petsc-users <
>>>> petsc-users at mcs.anl.gov> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> 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.
>>>>>
>>>>> What could be the problem?
>>>>>
>>>>
>>>> Hi Eda,
>>>>
>>>> I have an example that does just this, and I am getting the correct
>>>> result. I have not yet checked it in,
>>>> but i attach it here. Are you setting the right target?
>>>>
>>>>   Thanks,
>>>>
>>>>     Matt
>>>>
>>>>
>>>>> Best regards,
>>>>>
>>>>> Eda
>>>>>
>>>>
>>>>
>>>> --
>>>> What most experimenters take for granted before they begin their
>>>> experiments is infinitely more interesting than any results to which their
>>>> experiments lead.
>>>> -- Norbert Wiener
>>>>
>>>> https://www.cse.buffalo.edu/~knepley/
>>>> <http://www.cse.buffalo.edu/~knepley/>
>>>>
>>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>> https://www.cse.buffalo.edu/~knepley/
>> <http://www.cse.buffalo.edu/~knepley/>
>>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190309/69f80082/attachment.html>


More information about the petsc-users mailing list