Jose, I used:
MatCreateSeqAIJ(PETSC_COMM_SELF, n, n, 0, cnt, &A); MatSetValue(A, i, j, *(a+i*SIZE+j), INSERT_VALUES); to create the input matrices. Their sizes collapsed dramatically: from 192208072 to 239944. But again, using: ./ex7.exe -f1 k.dat -f2 m.dat -eps_gen_hermitian -eps_smallest_real > x.out 2>&1, I get: Generalized eigenproblem stored in file. Reading REAL matrices from binary files... Number of iterations of the method: 500 Number of linear iterations of the method: 4009 Solution method: krylovschur Number of requested eigenvalues: 1 Stopping condition: tol=1e-07, maxit=500 Number of converged approximate eigenpairs: 0 I'm really only interested in the least 50 eigenvalues. Smallest 10 eigenvalues -0.000019 -0.000004 -0.000000 0.000005 0.000012 0.000016 2.795284 2.795307 21.235339 21.235340 81.582017 Largest 10 eigenvalues 176431487319.625000 176431532012.467468 176431562378.361359 176435480628.136292 176435488209.944031 176435555689.747253 176435563270.922424 663312473823.916260 663312473823.917969 663312666285.928589 663312666285.929810 On Mon, Aug 1, 2011 at 1:46 PM, Jose E. Roman <jroman at dsic.upv.es> wrote: El 01/08/2011, a las 19:27, John Chludzinski escribi?: > > > I create 2 matrices using: > > > > MatCreateSeqDense(PETSC_COMM_SELF, n, n, Ka, &A); > > MatCreateSeqDense(PETSC_COMM_SELF, n, n, Kb, &B); > > > > These matrices are 99% zeros ( 16,016,004 entries and 18660 non-zeros). > They are symmetric and real. Their tri-diagonal elements are non-zero plus > a few other entries. > > > > I tried to use ex7 for the generalized eigenvalue problem: > > > > ./ex7.exe -f1 k.dat -f2 m.dat -eps_gen_hermitian -eps_smallest_real > > x.out 2>&1 > > > > without specifying an EPS and get: > > > > Generalized eigenproblem stored in file. > > > > Reading REAL matrices from binary files... > > Number of iterations of the method: 500 > > Number of linear iterations of the method: 4009 > > Solution method: krylovschur > > > > Number of requested eigenvalues: 1 > > Stopping condition: tol=1e-07, maxit=500 > > Number of converged approximate eigenpairs: 0 > > > > Is krylovschur inappropriate for this problem or have I set up the > problem incorrectly by using MatCreateSeqDense(...) to create the matrix > input files in PETSc binary form? > > > > ---John > > > > The solver has reached the maximum number of iterations. Do you want to > compute the leftmost part of the spectrum? Are those eigenvalues > (relatively) large in magnitude? I guess not. If you need the smallest > eigenvalues, instead of computing the smallest eigenvalues of (K,M) try > computing the largest eigenvalues of (M,K) and then compute the reciprocals. > Also, have a look at the chapter on spectral transformations. > > And of course do not use dense matrices, as pointed out by Matt. > Jose > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110802/76778720/attachment.htm>
