On Fri, Apr 15, 2011 at 9:17 AM, Juha Jäykkä <span dir="ltr"><<a href="mailto:J.Jaykka@leeds.ac.uk">J.Jaykka@leeds.ac.uk</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;">
Hi list!<br>
<br>
I keep getting strange errors when running a PETSc code:<br>
<br>
[6]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[6]PETSC ERROR: Object is in wrong state!<br>
[6]PETSC ERROR: Matrix must be set first!<br>
[6]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
<br>
This happens on one machine only, but it has OpenMPI just as the others, where<br>
it works correctly.<br>
<br>
More specifically, the error comes from<br>
<br>
[6]PETSC ERROR: PCSetUp() line 775 in src/ksp/pc/interface/precon.c<br>
[6]PETSC ERROR: PCApply() line 353 in src/ksp/pc/interface/precon.c<br>
[6]PETSC ERROR: KSPSolve_PREONLY() line 29 in<br>
src/ksp/ksp/impls/preonly/preonly.c<br>
[6]PETSC ERROR: KSPSolve() line 396 in src/ksp/ksp/interface/itfunc.c<br>
[6]PETSC ERROR: PCApply_BJacobi_Singleblock() line 777 in<br>
src/ksp/pc/impls/bjacobi/bjacobi.c<br>
[6]PETSC ERROR: PCApply() line 357 in src/ksp/pc/interface/precon.c<br>
[6]PETSC ERROR: KSPInitialResidual() line 65 in src/ksp/ksp/interface/itres.c<br>
[6]PETSC ERROR: KSPSolve_GMRES() line 240 in src/ksp/ksp/impls/gmres/gmres.c<br>
[6]PETSC ERROR: KSPSolve() line 396 in src/ksp/ksp/interface/itfunc.c<br>
[6]PETSC ERROR: SNES_KSPSolve() line 2944 in src/snes/interface/snes.c<br>
[6]PETSC ERROR: SNESSolve_LS() line 191 in src/snes/impls/ls/ls.c<br>
[6]PETSC ERROR: SNESSolve() line 2255 in src/snes/interface/snes.c<br>
[6]PETSC ERROR: TSStep_BEuler_Nonlinear() line 176 in<br>
src/ts/impls/implicit/beuler/beuler.c<br>
[6]PETSC ERROR: TSStep() line 1693 in src/ts/interface/ts.c<br>
[6]PETSC ERROR: TSSolve() line 1731 in src/ts/interface/ts.c<br>
<br>
Now, I do realize that the Jacobian and preconditioner matrices must be<br>
properly created before calling TSSolve, but, to the best of my knowledge,<br>
they are. If they were not, the code should never work.<br>
<br>
And this always comes from just one MPI rank, as if somehow its memory is<br>
corrupt or something. Funny thing is, it only happens under the batch queue<br>
system: interactively, on the same machine, it works fine.<br></blockquote><div><br></div><div>I would try valgrind on it first.</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;">
Any help is appreciated...<br>
<font color="#888888"><br>
-Juha<br>
</font></blockquote></div><br><br clear="all"><br>-- <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>