On Fri, Sep 28, 2012 at 4:21 AM, Paul Cruise <span dir="ltr"><<a href="mailto:paul.cruise.paul@gmail.com" target="_blank">paul.cruise.paul@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Jose,<br><br>Thanks for your reply. Unfortunately, I still get the same error if I do what you suggested.<br><br>Please see the code below;<br><b><br> call MatCreate(PETSC_COMM_WORLD,A,ierr)<br>      call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,3*natoms,3*natoms,ierr)<br>

      call MatSetFromOptions(A,ierr)<br>      call MatSetUp(A,ierr)<br><br>      do n=1,number_of_elements<br>              call MatSetValues(A,3*natoms,indices(n,1),3*natoms,indices(n,2),elements(n),INSERT_VALUES,ierr)<br>

              call MatSetValues(A,3*natoms,indices(n,2),3*natoms,indices(n,1),elements(n),ADD_VALUES,ierr)<br>      end do<br><br>      call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)<br>      call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)<br>

<br>      call MatGetVecs(A,v,w,ierr)<br>      call MatMult(A,v,w,ierr)<br>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>!     Create the eigensolver and display info<br>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>

<br>!     ** Create eigensolver context<br>      call EPSCreate(PETSC_COMM_WORLD,eps,ierr)<br><br>!     ** Set operators. In this case, it is a standard eigenvalue problem<br>      call EPSSetOperators(eps,A,PETSC_NULL_OBJECT,ierr)<br>

      call EPSSetProblemType(eps,EPS_HEP,ierr)<br><br>!     ** Set solver parameters at runtime<br>      call EPSSetFromOptions(eps,ierr)<br><br>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>

!     Solve the eigensystem<br>! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br><br>      call EPSSolve(eps,ierr)</b><br><br>Could you suggest  a workaround?<br></blockquote><div><br></div><div>
Is it EXACTLY the same error, or an error in the MatMult you added? Please</div><div>send the entire error output each time or we are just guessing blindly.</div><div><br></div><div>Also, you can use the debugger to see exactly what the value is.</div>
<div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks,<br>Paul<br><br><br><div class="gmail_quote">
On Thu, Sep 27, 2012 at 3:39 PM, Jose E. Roman <span dir="ltr"><<a href="mailto:jroman@dsic.upv.es" target="_blank">jroman@dsic.upv.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Before using EPS, try something like this and see if you get the same error:<br>
<br>
call MatGetVecs(A,v,w,ierr)<br>
call MatMult(A,v,w,ierr)<br>
<br>
Jose<br>
<br>
El 27/09/2012, a las 14:55, Paul Cruise escribió:<br>
<div><div><br>
> The error messages that I have is,<br>
><br>
> [0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
> [0]PETSC ERROR: Floating point exception!<br>
> [0]PETSC ERROR: Vec entry at local location 0 is not-a-number or infinite at beginning of function: Parameter number 2!<br>
> [0]PETSC ERROR: ------------------------------------------------------------------------<br>
> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 2, Fri Jul 13 15:42:00 CDT 2012<br>
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
> [0]PETSC ERROR: See docs/index.html for manual pages.<br>
> [0]PETSC ERROR: ------------------------------------------------------------------------<br>
> [0]PETSC ERROR: /gpfs/home/swayamjyoti_s/slepc-3.3/src/eps/examples/tutorials/Test/ex1f on a arch-linu named merlinc19 by swayamjyoti_s Thu Sep 27 14:20:49 2012<br>
> [0]PETSC ERROR: Libraries linked from /gpfs/home/swayamjyoti_s/petsc-3.3/arch-linux2-c-debug/lib<br>
> [0]PETSC ERROR: Configure run at Tue Aug 21 15:47:21 2012<br>
> [0]PETSC ERROR: Configure options --with-fc=ifort --download-f-blas-lapack --download-mpich<br>
> [0]PETSC ERROR: ------------------------------------------------------------------------<br>
> [0]PETSC ERROR: MatMult() line 2081 in /gpfs/home/swayamjyoti_s/petsc-3.3/src/mat/interface/matrix.c<br>
> [0]PETSC ERROR: STApply_Shift() line 41 in src/st/impls/shift/shift.c<br>
> [0]PETSC ERROR: STApply() line 67 in src/st/interface/stsolve.c<br>
> [0]PETSC ERROR: EPSFullLanczos() line 179 in src/eps/impls/krylov/krylov.c<br>
> [0]PETSC ERROR: EPSSolve_KrylovSchur_Symm() line 58 in src/eps/impls/krylov/krylovschur/ks-symm.c<br>
> [0]PETSC ERROR: EPSSolve() line 130 in src/eps/interface/solve.c<br>
><br>
> Could someone please help how to fix these?<br>
><br>
><br>
> On Thu, Sep 27, 2012 at 2:12 PM, Paul Cruise <<a href="mailto:paul.cruise.paul@gmail.com" target="_blank">paul.cruise.paul@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> I input a hessian matrix of size (5148 X 5148 size) into SLEPc to find it's eigenvalues (using EPS) as follows:<br>
><br>
> call MatCreate(PETSC_COMM_WORLD,A,ierr)<br>
>       call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,3*natoms,3*natoms,ierr)<br>
>       call MatSetFromOptions(A,ierr)<br>
>       call MatSetUp(A,ierr)<br>
><br>
>       do n=1,number_of_elements<br>
>               call MatSetValues(A,3*natoms,indices(n,1),3*natoms,indices(n,2),elements(n),INSERT_VALUES,ierr)<br>
>       end do<br>
><br>
>       call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr)<br>
>       call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr)<br>
><br>
> But somehow, the eigenvalues do not seem to converge as I find the following output:<br>
><br>
>  Number of iterations of the method:   1<br>
>  Solution method: krylovschur<br>
>  Number of requested eigenvalues: 1<br>
>  Number of iterations of the method:   1<br>
>  Solution method: krylovschur<br>
>  Number of requested eigenvalues: 1<br>
>  Stopping condition: tol=1.0000E-08, maxit= 648<br>
>  Number of converged eigenpairs: 0<br>
><br>
> Can someone please tell me what's the problem, because this matrix for sure has eigenvalues as I have obtained before without using SLEPc?<br>
><br>
> Thanks & Regards,<br>
> Paul<br>
><br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>