<div dir="ltr">On Thu, Jul 25, 2013 at 6:46 AM, Toby <span dir="ltr"><<a href="mailto:T.W.Searle@sms.ed.ac.uk" target="_blank">T.W.Searle@sms.ed.ac.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Ok, it looks like the -st_pc_factor_shift_type option is now being used, thanks. Unfortunately it hasn't fixed the problem.<br>
<br>
if I use the NONZERO type and a shift amount, the shift amount option is not recognised and I still get the zero pivot error. If I use the POSITIVE_DEFINITE type I also get the pivot error. Output is below<br>
<br>
Thanks,<br>
Toby<br>
<br>
tobymac:SLEPC toby$ mpiexec ./ex7 -f1 LHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -f2 RHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -st_pc_type lu -st_pc_factor_shift_type NONZERO -st_pc_shift_type_amount 1<br>
<br>
Generalized eigenproblem stored in file.<br>
<br>
Reading COMPLEX matrices from binary files...<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------<u></u>------<br>
[0]PETSC ERROR: Detected zero pivot in LU factorization:<br>
see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot" target="_blank">http://www.mcs.anl.gov/petsc/<u></u>documentation/faq.html#<u></u>ZeroPivot</a>!<br>
[0]PETSC ERROR: Empty row in matrix: row in original ordering 2395 in permuted ordering 3600!<br></blockquote><div><br></div><div>1) You misspelled the option: -st_pc_factor_shift_amount 1</div><div><br></div><div>2) It was used, and fixed you problem on row 0, now you have a problem on row 2395, namely that it is missing. No</div>
<div> LU factorization routine will succeed here. You must at least put a diagonal 0.0 on all rows.</div><div><br></div><div>3) Same goes for the run below.</div><div><br></div><div>4) A completely empty row means your matrix is indeed rank deficient. I have no idea what results are coming out of</div>
<div> scipy, but they are not using factorization.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 5, Sat Dec 1 15:10:41 CST 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: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: ./ex7 on a arch-darw named tobymac by toby Thu Jul 25 12:41:57 2013<br>
[0]PETSC ERROR: Libraries linked from /opt/local/lib<br>
[0]PETSC ERROR: Configure run at Tue Jul 23 15:11:27 2013<br>
[0]PETSC ERROR: Configure options --prefix=/opt/local --with-valgrind-dir=/opt/local --with-shared-libraries --with-scalar-type=complex --with-clanguage=C++ --with-superlu-dir=/opt/local --with-blacs-dir=/opt/local --with-scalapack-dir=/opt/<u></u>local --with-mumps-dir=/opt/local --with-metis-dir=/opt/local --with-parmetis-dir=/opt/local --COPTFLAGS=-O2 --CXXOPTFLAGS=-O2 --FOPTFLAGS=-O2 --LDFLAGS=-L/opt/local/lib --CFLAGS="-O2 -mtune=native" --CXXFLAGS="-O2 -mtune=native"<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/mat/<u></u>impls/aij/seq/aijfact.c<br>
[0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/mat/<u></u>interface/matrix.c<br>
[0]PETSC ERROR: PCSetUp_LU() line 135 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/ksp/pc/<u></u>impls/factor/lu/lu.c<br>
[0]PETSC ERROR: PCSetUp() line 832 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/ksp/pc/<u></u>interface/precon.c<br>
[0]PETSC ERROR: KSPSetUp() line 278 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/ksp/ksp/<u></u>interface/itfunc.c<br>
[0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c<br>
[0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c<br>
[0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c<br>
[0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c<br>
Number of iterations of the method: 0<br>
Number of linear iterations of the method: 0<br>
Number of requested eigenvalues: 1<br>
Stopping condition: tol=1e-08, maxit=750<br>
Number of converged approximate eigenpairs: 0<br>
<br>
WARNING! There are options you set that were not used!<br>
WARNING! could be spelling mistake, etc!<br>
Option left: name:-st_pc_shift_type_amount value: 1<br>
<br>
mpiexec ./ex7 -f1 LHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -f2 RHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -st_pc_type lu -st_pc_factor_shift_type POSITIVE_DEFINITE<br>
<br>
Generalized eigenproblem stored in file.<br>
<br>
Reading COMPLEX matrices from binary files...<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------<u></u>------<br>
[0]PETSC ERROR: Detected zero pivot in LU factorization:<br>
see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot" target="_blank">http://www.mcs.anl.gov/petsc/<u></u>documentation/faq.html#<u></u>ZeroPivot</a>!<br>
[0]PETSC ERROR: Empty row in matrix: row in original ordering 2395 in permuted ordering 3600!<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 5, Sat Dec 1 15:10:41 CST 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: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: ./ex7 on a arch-darw named tobymac by toby Thu Jul 25 12:40:20 2013<br>
[0]PETSC ERROR: Libraries linked from /opt/local/lib<br>
[0]PETSC ERROR: Configure run at Tue Jul 23 15:11:27 2013<br>
[0]PETSC ERROR: Configure options --prefix=/opt/local --with-valgrind-dir=/opt/local --with-shared-libraries --with-scalar-type=complex --with-clanguage=C++ --with-superlu-dir=/opt/local --with-blacs-dir=/opt/local --with-scalapack-dir=/opt/<u></u>local --with-mumps-dir=/opt/local --with-metis-dir=/opt/local --with-parmetis-dir=/opt/local --COPTFLAGS=-O2 --CXXOPTFLAGS=-O2 --FOPTFLAGS=-O2 --LDFLAGS=-L/opt/local/lib --CFLAGS="-O2 -mtune=native" --CXXFLAGS="-O2 -mtune=native"<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/mat/<u></u>impls/aij/seq/aijfact.c<br>
[0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/mat/<u></u>interface/matrix.c<br>
[0]PETSC ERROR: PCSetUp_LU() line 135 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/ksp/pc/<u></u>impls/factor/lu/lu.c<br>
[0]PETSC ERROR: PCSetUp() line 832 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/ksp/pc/<u></u>interface/precon.c<br>
[0]PETSC ERROR: KSPSetUp() line 278 in /opt/local/var/macports/build/<u></u>_Users_toby_MyPorts_<u></u>scienceports_math_petsc/petsc/<u></u>work/petsc-3.3-p5/src/ksp/ksp/<u></u>interface/itfunc.c<br>
[0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c<br>
[0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c<br>
[0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c<br>
[0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c<br>
Number of iterations of the method: 0<br>
Number of linear iterations of the method: 0<br>
Number of requested eigenvalues: 1<br>
Stopping condition: tol=1e-08, maxit=750<br>
Number of converged approximate eigenpairs: 0<br>
<br>
<br>
<br>
<br>
On 25/07/2013 12:34, Jose E. Roman wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
El 25/07/2013, a las 13:30, Toby escribió:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Matt,<br>
<br>
Thanks for the speedy reply. I tried using the options you suggested:<br>
<br>
mpiexec ./ex7 -f1 LHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -f2 RHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -st_pc_factor_shift_type NONZERO -st_pc_shift_type_amount 1<br>
<br>
But I still get the warnings:<br>
Option left: name:-st_pc_factor_shift_type value: NONZERO<br>
Option left: name:-st_pc_shift_type_amount value: 1<br>
</blockquote>
By default, ST is using PCREDUNDANT. In order to use the above options you must change it to e.g. PCLU.<br>
That is, add -st_pc_type lu<br>
<br>
Jose<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I have tried it with just the -st_pc_type jacobi and -st_ksp_view. This gives me some eigenvalues, but I don't believe them (they do not appear on the spectrum which I solve using LAPACK where all eigenvalues have a real part less than 0). The output was very large, but consists of repetitions of this:<br>
<br>
mpiexec ./ex7 -f1 LHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -f2 RHS-N7-M40-Re0.0-b0.1-Wi5.0-<u></u>amp0.02.petsc -st_pc_type jacobi -st_ksp_view<br>
<br>
Generalized eigenproblem stored in file.<br>
<br>
Reading COMPLEX matrices from binary files...<br>
KSP Object:(st_) 1 MPI processes<br>
type: preonly<br>
maximum iterations=10000, initial guess is zero<br>
tolerances: relative=1e-08, absolute=1e-50, divergence=10000<br>
left preconditioning<br>
using NONE norm type for convergence test<br>
PC Object:(st_) 1 MPI processes<br>
type: jacobi<br>
linear system matrix = precond matrix:<br>
Matrix Object: 1 MPI processes<br>
type: seqaij<br>
rows=6000, cols=6000<br>
total: nonzeros=3600, allocated nonzeros=3600<br>
total number of mallocs used during MatSetValues calls =0<br>
using I-node routines: found 4080 nodes, limit used is 5<br>
<br>
...<br>
<br>
Number of iterations of the method: 189<br>
Number of linear iterations of the method: 1520<br>
Number of requested eigenvalues: 1<br>
Stopping condition: tol=1e-08, maxit=750<br>
Number of converged approximate eigenpairs: 2<br>
<br>
k ||Ax-kBx||/||kx||<br>
----------------- ------------------<br>
1388.774454+0.001823 i 0.751726<br>
1388.774441+0.001820 i 0.912665<br>
<br>
<br>
Thanks again,<br>
Toby<br>
</blockquote>
<br><span class=""><font color="#888888">
</font></span></blockquote><span class=""><font color="#888888">
<br>
<br>
-- <br>
The University of Edinburgh is a charitable body, registered in<br>
Scotland, with registration number SC005336.<br>
<br>
</font></span></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
</div></div>