<div class="gmail_quote">On Thu, Oct 27, 2011 at 00:16, Paul Sicsic <span dir="ltr"><<a href="mailto:paul.sicsic@polytechnique.edu">paul.sicsic@polytechnique.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>The X you passed in is not a valid Mat (we could see that from the earlier call). More specifically, according to valgrind, it is uninitialized memory. The shift is still infinite coming into this function, which I don't understand.</div>




<div><br></div></blockquote></div><div>Why do you say the X matrix is not valid ? </div><div>If I run the program with -mat_view, our Mass (AppCtx%M) and rigidity matrix (AppCTx%K) are assembled. </div></div></blockquote>
<div><br></div><div>The Mat that makes it into MatAXPY is not valid. What does your code look like that makes that call?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div></div><div>From the singularity at 0, it looks like perhaps the initial time step size is being set to zero. Next time you get a stack trace, can you on ts->time_step?</div></blockquote></div></div></blockquote><div>
<br></div><div>Yes, it should.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

</blockquote></div></div><br><div>tssolve_ (ts=0x7fff42d866e0, x=0x7fff42d86388, ftime=0x7fff42d866f0, __ierr=0x7fff42d85adc) at /opt/HPC/petsc-dev/src/ts/interface/ftn-auto/tsf.c:397</div><div>397             (Vec)PetscToPointer((x) ),ftime);</div>



<div>(gdb) p ts->time_step</div><div>$1 = 6.9531990170672068e-310</div><div><br></div><div>Should ts->time_step be inizialized entering TSSolve ? </div><div><br></div><div>We had called (As in example ex22f) : </div>


<div>     Call TSSetInitialTimeStep(AppCtx%TS, 0.0, .01,  ierr); CHKERRQ(iErr)</div>
<div>     Call TSSetFromOptions(AppCtx%TS,  iErr); CHKERRQ(iErr)</div></blockquote></div><br><div>This is one reason why I HATE, HATE, HATE Fortran. When you pass the literals 0.0 and .01, they are passed as single instead of double precision. You need to define variables to hold these values:</div>
<div><br></div><div>PetscReal zero,dt</div><div><br></div><div>zero = 0.0</div><div>dt = .01</div><div>call TSSetInitialTimeStep(AppCtx%TS, zero, dt, ierr)</div>